473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Modifying a dot net exe directly?

I have an app (single exe) in which I want to modify a few strings
depending on the type of user. I know I can set up an automatic
build process to take care of this (I actually have done this), but
it would be faster to use a little utility to directly modify a
template exe (i.e, only creating a new exe when the source code
changes). This would take about 1 second to directly modify an exe
vs a couple of minutes to build a new exe with a build utility.

The question is: how do you directly modify an exe? I can find the
strings I want to modify with no problem, but when I edit in a text
editor the exe is no longer runnable. Is there a special utility I
should be using for this? Is there some sort of checksum going on in
the exe which breaks when I modify a string?

Nov 22 '05 #1
4 3040
You might want to consider application configuration files. These are files
designed to hold settings for your application.

http://msdn.microsoft.com/library/de...ationfiles.asp
http://msdn.microsoft.com/library/de...et04222003.asp
"PseudoBill" <ps************@yahoo-dot-ca.no-spam.invalid> wrote in message
news:40**********@127.0.0.1...
I have an app (single exe) in which I want to modify a few strings
depending on the type of user. I know I can set up an automatic
build process to take care of this (I actually have done this), but
it would be faster to use a little utility to directly modify a
template exe (i.e, only creating a new exe when the source code
changes). This would take about 1 second to directly modify an exe
vs a couple of minutes to build a new exe with a build utility.

The question is: how do you directly modify an exe? I can find the
strings I want to modify with no problem, but when I edit in a text
editor the exe is no longer runnable. Is there a special utility I
should be using for this? Is there some sort of checksum going on in
the exe which breaks when I modify a string?

Nov 22 '05 #2
I wanted to do this by modifying the exe and not use any other files.
I don't want it easily changed after being distributed.

Nov 22 '05 #3
I kind of figured that. If you can't find out how to modify the exe, you
*could* encrypt the text in the application config files.

"PseudoBill" <ps************@yahoo-dot-ca.no-spam.invalid> wrote in message
news:40**********@127.0.0.1...
I wanted to do this by modifying the exe and not use any other files.
I don't want it easily changed after being distributed.

Nov 22 '05 #4

"Andy Gaskell" <pubb AT hotmail DOT com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl...
I kind of figured that. If you can't find out how to modify the exe, you
*could* encrypt the text in the application config files.
That'd probably be best, even with something as simple as ROT13. All you are
really doing is boosting the barrier to entry, anyone who can figure out
your encryption key\scheme will probably know enough to modify the strings
themselves or to find a utility to do it.

Most, if not all, of the libraries that you would need exist, simplist
solution might be just to modify the string in the string heap with a hex
editor(if the string is shorter), but you could load all hte metadata and
redump it as well, if you wanted to.
I would look into things like SharpAssembly and the tool developers docs.

"PseudoBill" <ps************@yahoo-dot-ca.no-spam.invalid> wrote in
message
news:40**********@127.0.0.1...
I wanted to do this by modifying the exe and not use any other files.
I don't want it easily changed after being distributed.


Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Japcuh | last post by:
How do you write self modifying code in Java? Japcuh (Just Another Perl C Unix Hacker) http://www.catb.org/~esr/faq/hacker-howto.htm#what_is ..0. ...0 000
6
by: Peter Ballard | last post by:
Whew. I hope that title is descriptive! Hi all, The python tutorial tells me "It is not safe to modify the sequence being iterated over in the loop". But what if my list elements are mutable,...
4
by: PseudoBill | last post by:
I have an app (single exe) in which I want to modify a few strings depending on the type of user. I know I can set up an automatic build process to take care of this (I actually have done this),...
4
by: Eric | last post by:
I have read that using const_cast to modify an object that was originally declared const can lead to undefined behavior. Would this be true in the case of a user defined object containing a const...
3
by: Chris Bingham | last post by:
Hi, I'm learning VB.Net at the moment, and while I'm doing it I'm writing a couple of programs for work! They all work with the same Access Database, but I'm having a problem with modifying...
0
by: ddman | last post by:
I'm writing a filtering application similar to a proxy server in vb.net. I need to intercept browser requests and modify them before throwing it back to the browser. How do I go about doing this?...
2
by: bandroo | last post by:
Hi Guys How can I modify the items within a hashtable "in situ" so to speak? At the moment, I am locating the item that I want, extracting it, modifying the item, deleting the hashtable item,...
3
by: benkollam | last post by:
Hi, I have problem updating the changes in the dataset to the database. I am using an Access database and following is the code used for adding a new row. Please help Private Sub...
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
6
by: John [H2O] | last post by:
I would like to write a function to write variables to a file and modify a few 'counters'. This is to replace multiple instances of identical code in a module I am writing. This is my approach:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.