• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

How to write to a exe-file ?

Hi!

How can i read from a exe-file, and write this hole exe. Back to a new exe-file, that are the same as the exe-file read from. But the differents is that i like to change the original exefile, before i make the new one.

Hope sombody can give me source code that do this in vb6.0.

Or maby this is not possible ?

Thanks for fast answer's.

Tor
0
team2005
Asked:
team2005
  • 9
  • 3
  • 3
  • +2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
May I ask why you are trying to achieve this task?
also, what kind of changes to you want to achieve?
0
 
Patrick MatthewsCommented:
Hi Tor,

This is not possible.

Regards,

Patrick
0
 
vinnyd79Commented:
Have you tried this technique of writing to the end of the exe file?

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=39917&lngWId=1
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
team2005Author Commented:
Hi!

What i need is :

Have this little software, that i like to start from another exe.
Becource its only payd customers, that can start this exfile.
And thinking that i must then encode the exefile, and the decode it from
the other exe.

Hope that explane what i want.

Thanks for helping me out.

Tor
0
 
leclairmCommented:
Maybe you could pass the customer id to the command line of the executable when you call it and when it begins, it verifies that the customer is indeed a paid one, if not, the application stops.  This could be encrypted and the application you are calling decrypts it and then verifies it it is paid customer.


0
 
team2005Author Commented:
Hi leclairm!

Hmmmm, not shore what you trying to explane here.
But exefile 2 can the be started from anyone. If a customer is uploading this exe to internet.
So other people can use this exe, without paying...

???

Thanks for helping me out here.

Tor
0
 
leclairmCommented:
You can pass parameters to the executable.  In visual basic, when you want to use the parameters that were passed to it, you use the Command variable.

For instance, if you start the executable like this:

PaidCustomer.exe %$#G

Where %$#G is the encrypted customer id, your app will be able to see this using the Command variable.  It could then decrypt it and verify in the database if it is a paid customer.  If it isn't, it will exit.  Also, if no parameter is passed, it will also exit.

This is only possible if you have the source code for the executable though.  What exactly does this executable do??
0
 
team2005Author Commented:
Hi!

Can't use you metod, but thanks for trying...

The executable is a small program. Can't tell you what it does...Sorry

MUST run this from the first exefile. Its the only way i think.
Isent it a way to read line by line from a exefile.
And encode the lines, and make a new file ???

Thanks for helping me out

Tor

0
 
leclairmCommented:
No that can't be done (as far as I know anyways).

I was asking what it does because perhaps you could change it to a dll rather than an executable.
0
 
team2005Author Commented:
Hi!

Think that i accept your last answer. Becource maby a can make a dll-file here. :))

THANKS

Tor
0
 
team2005Author Commented:
Hi jimhorn!

Why will a crack into my own software ???
Just try to protect my software....

Tor
0
 
team2005Author Commented:
Hi!

I am not give hackers info on how to crack into exe files.
Trying to protext a software i am making. Try to change my program (exefile) to somthing different.
So no one can start this exefile, becource this file is encoded...
Then my second program will then decode this file.... That is what i asked for... Is that i crime ?

Accepted the asnwer from lecraim, becource its maby solve my problem. To protect my little software.

Tor

0
 
team2005Author Commented:
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
as from my opinion, the linked q is giving methods to do reverse engineering of programs, which is mostly used when hacking programs (which is prohibited). IMHO, that q should not have been PAQed, as it was never asked (not even by the admin/mod) for what means this operation is needed.

NOTE: it's not that we ASSUME that YOU (or someone else) is a hacker or trying to do bad things, but it's simply a matter of basic protection against such things.
It's quite simple to see from the reaction of people what their intention is/was.
0
 
team2005Author Commented:
Hi!

To protect my own software is not a crime.
To crack software is a BIG crime.

I tryed to figure out how to protect my software.

Have used EE for a long time now. And have been happy for all help in here.
But when you try to say to me that i try to crack exe files, i dont know if i want to
still use EE.

Tor
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>But when you try to say to me that i try to crack exe files, i dont know if i want to still use EE.
Who SAID that YOU try to crack files? We only ASKED what you are doing, not ASSUMING that you are DOING it.
that is a BIG difference. If you don't understand that, that's a BIG problem.

>I tryed to figure out how to protect my software.
the problem will be that once you changed the exe or launch an extract of it, it is quite easy to see this for experiences hackers. They will watch all file, registry and other operations your application is doing, and can trace that activity.
once they found what the application does to protect itself, they can reverse engineer it.

>I tryed to figure out how to protect my software.
against what / whom?
you cannot (really) protect your .exe file(s) being copied.
you cannot (really) protect your .exe file(s) from being reverse-engineered. it's only machine code which can be read quite easily.

Just to give you an idea that the efforts protecting a software is a huge investment in time and money which might not be worth it. As you don't tell us what your software is about, we cannot do a statement on that.

Regards
0
 
team2005Author Commented:
Hi!

I can anderstand you here in EE, becource its so many people out there that are HACKERS.
And i don't wont to give them things, so they can hack more software.

Sorry i have explaned me wrong, but my question was about protection of my own software.
Have made a solution to this, making a DLL-file. :))

So next time i ask a question, i will try to ask it in a right way.

Thanks for solving this issue.

Cheers,
Tor
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 9
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now