The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help on runing a script mig28mx UNIX for Dummies Questions & Answers 1 01-06-2006 05:24 PM
Edit and insert character in a text file negixx Shell Programming and Scripting 3 06-10-2005 02:36 PM
do i need this runing ? amicrawler2000 UNIX for Dummies Questions & Answers 2 10-16-2003 07:02 AM
Wich one is beter Linux or Windows Radionstorm Windows & DOS: Issues & Discussions 3 05-10-2002 10:16 AM
process runing automatically lsquillacioti UNIX for Dummies Questions & Answers 2 04-12-2001 09:41 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-23-2003
ssahu ssahu is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 2
how To edit exe to insert a serial no wich can be usd by runing exe

At time of installation I have to open the resource. and i have to insert a string serial number in the exe.
please provide me code to edit the exe (in solaris) to insert a serial number which can be used by exe at run time.
  #2 (permalink)  
Old 10-23-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
Ummm, ssahu, a couple of things need some clarification....

First, we have a few rules here and one of them states....
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting.

I will delete your duplicate thread. Now a lot of newbies stumble over our rules on a first post. So while this is annoying, it is not really a big deal.

But I'm alarmed by what you're trying to do. Edit an executable? To insert a serial number? This sounds like you're trying to install software licensed to another user. And you're trying to make us your partner in crime. That is a big deal. We don't do that here.

I suggest that you contact the author or the owner of the software and ask for assistance.
  #3 (permalink)  
Old 10-23-2003
ssahu ssahu is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 2
you are bleming me with out asking me why are your requirement.
This requirement is given me by company so that they can insure that the Executale and installed version are same. this is requirement is make safe your seft against cheeting by customer.

in window version of our software we are able to do this. so they directed me to do this in solaris.
  #4 (permalink)  
Old 10-23-2003
mbb mbb is offline
Registered User
  
 

Join Date: Aug 2001
Location: UK
Posts: 104
Just a guess, but if you are trying to verify the version of an executable you have supplied then make sure you use some sort of source control for each source file e.g. RCS

Then include an identifier string. For RCS you might use:

static char ident="$Header$";

RCS will replace the $Header$ part with actual information on the source file. When compiled this information will be included to the executable.

With RCS you could then use the ident command to verify the version of the executable.

A serial number/key could be encoded in a similar way for a specific compilation for a client or the version number of the source could be reserved specifically for that compilation for a client.

You might try something a little bit more elaborate. Like reading the value from an encrypted file.

Is this what you mean?
  #5 (permalink)  
Old 10-23-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
Quote:
Originally posted by ssahu
this is requirement is make safe your seft against cheeting by customer.

in window version of our software we are able to do this. so they directed me to do this in solaris.
What if a customer signed on to this site and posed the same question? Do you think that we should help him insert a serial number?

What if the customer claimed to be you...how would we know?

What if someone posts some code for you....maybe your customers will see too. We have over 30,000 members and a lot of them use Solaris. Is this the way to protect your product?
  #6 (permalink)  
Old 10-24-2003
DreamWarrior DreamWarrior is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 70
Look into the what command, it may gave you a decent starting point to include version information into your software. You would of course have to execute the what command from inside the executable, or find the source for the what command and place it inside of it.

As for editting that value at run-time (or install-time), that's kind of shifty - and not exactly portable. However, if you can read the information, you can write it...provided you do not change the string's size (or be faced with possibly corrupting the string table in your executable).

That's about as much as I can give you. However just realize everything you would be doing is very non-portable considering the differing executable structures on various platforms.
  #7 (permalink)  
Old 10-24-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
ill also add that even if it is a legitimate reason for you to do this, (im not saying that it is or it isnt...) its not something easily talked through. youd have to learn the concepts and methods of finding this information on your own.
Closed Thread

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0