?
Solved

change/edit exe on the fly

Posted on 2001-09-05
2
Medium Priority
?
419 Views
Last Modified: 2008-02-26
Hi:-


Case 1:

I want to edit exe on the fiy.

Before user downloads a exe, i have to add a "KEY" value in the exe so that when user installs the exe,

that "KEY" value is entered in the registry.

For example,

x.exe is a file.

I will reserve 4 bytes in the exe.

When user clicks on exe to download, i will assign some random number in the 4 bytes of exe as KEY value.

Then user will download that file.

Any one have idea how to do this?

By chaning the exe 4 bytes, the exe can not be invalid. The checksum to be computed again to validate

that exe.


Case 2:
 instead of reserving the 4 bytes, a txt file is already added in the exe with blank data. I will assign
the user KEY value in the txt file.  Now i need not build the exe again. Then user will download the
exe.


NOTE:

1. Current installer for the exe is GHOST installer

2. Exe was built on Windows98 and editing will happen on Linux machine in both cases( it is the JSP
server which starts Download process of user )

Over all, any other solution to the problem:

Change the exe on the fly to add a KEY value for the user before download starts

Advanced thanks
0
Comment
Question by:Ravindra76
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
googlyralph earned 600 total points
ID: 6457071
A Random access file, writing known number of bytes, to a known location is what you are after, but im not sure about the check some for the win32 exe. Im fairly sure, that writing data wont prevent the exe from running, as i have "fixed" software by editing it with a hex editor, evan to the point of changing parts of the code section.

Look into RandomAccessFile in the JDK documentation.

(but it works something like this:)

import java.io.*;

final long OFFSET_TO_DATA = 9999;
byte[] data = {293,3,10, 127};

try{
   RandomAccessFile raf = new RandomAccessFile("a.exe", "rw");
   raf.seek(rag.length()-OFFSET_TO_DATA);
   raf.writeBytes(data);
   raf.close();
catch(Exception e){
}

Hope that helps,

GR.
0
 
LVL 7

Author Comment

by:Ravindra76
ID: 6542825
Upcousre my problem is solved with SFX of ZIP-PLUS 2001 in different way. Thanks for the response
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question