I need to edit an executable file from shoutcast, sc_serv.exe. If I just open this file in notepad, and save again without editing anything, after trying to run the program I get the message:
Program too big to fit in memory
How do I open and save the executable without interfering with its operation?
Thank you.
You can't just blindly edit an EXE, especially not with Notepad.
If you're trying to edit the admin interface for SHOUTcast, the best thing to do is proxy its returned data through PHP, or something else server-side, to create your own interface. I've done this, and found it to be fairly straight forward.
Related
I made a small program (App.exe) by (Visual Basic Language) that replaces some files, and a place those files in my preject recoures
the problem is when i build the program i can decompressing the App.exe and see those files like a archive with any decompressing software like a WinRAR or 7-zip, and me i don't want that, this is a image from my computer, someone can help me, thanks in advance
You may use ConfuserEx obfuscator (Google it to get that). After encrypting the app with it, it'll be almost impossible to decompile it or get its raw files (resources) even after extraction.
Simply drag and drop your application into it:
Use Compressing packer:
And finally protect it:
And you're good to go.
I am trying to running an executable without ".exe" extension, when I'm trying to run my ".bin" file (actually it's .exe but I renamed it with .bin for prevent confusion) It's shows to me program selector windows.
How can I avoid that?
If File.Exists("client.bin") Then
Process.Start("client.bin", param)
delay(100)
Terminate()
Else
MsgBox(Lang(6), MsgBoxStyle.Critical, TITLE)
Terminate()
End If
Your code is essentially asking the operating system's runtime to handle the file. It uses the file extension to determine what it should do. For example, a .doc extension would be opened with Word (ultimately the process handler would pass the file path as an argument to the target application: winword.exe {filepath}.doc).
Windows doesn't know how to handle a .bin file, so it turns to you for help - hence the program selector prompt.
You can only execute an executable, just change the file extension back to .exe.
What confusion are you trying to prevent? For example, if you're trying to stop users from accidentally running the application, can't you move it to a different place where it might be a little harder to find?
If you really want to call it something else (and this is really, really messy), you could rename the file just before and after you run it. However, I would highly recommend you don't do this, it's really bad design!
TextWranger comes with it's command-line tool, "edit", which allows me to open a file for editing on the command-line. The problem is, the "edit" program ends (returns control to the calling program) as soon as it sends the command to TextWrangler to open a file.
This can create a problem if I want to use TextWrangler as my editor-of-choice for a script designed with tools like "vi" in mind, which cause the shell that causes them to wait until the editing is complete and the file is closed.
Now, in theory, I know a way I can get around this. I can write a wrapper script which does three things: (1) calls "edit" with whichever file I am wishing to edit (2) continues it's run, checking over and over (no more frequently than every second - but could by preference be adjusted to do this less frequently) to see whether TextWrangler still has the file I asked it to edit open and (3) ending it's execution only once TextWrangler no longer has the file open.
Of course, this is something that I currently only can do in theory -- to bring the theory to actual practice there is one more thing I would need to know --- and that is, is there a way for a script to check from the command-line what files TextWrangler currently has open -- or better yet, whether or not it still has open the specific file that I am concerned with?
Use --wait for both twdiff and edit. I use this extensively with vim, as well as svn/git: without those flags, the temp files are immediately removed and diffing or editing them causes errors as the original file can't be found.
It also lets you cycle through multiple files and the next file won't be opened until the last one has been closed.
See twdiff -? or edit -? for more details.
I know i can use 7z or winrar but i want to learn this for myself.
How would i implement a self extracting archive? I can use C# or C++ but let me run down the problem.
When i open the exe i need some kind of GUI asking where to extract the files. Once the user says ok I should obviously extract them. I implemented a simple example in C# winforms already BUT my problem is HOW do i get the filenames and binary of the files into an exe?
One upon a time i ask Is it safe to add extra data to end of exe? and the answer suggested if i just add data to the end of the exe it may be picked up by a virus scanner. Now its pretty easy to write the length of the archive as the last 4bytes and just append the data to my generic exe and i do believe my process can read my own exe so this could work. But it feels hacky and i rather not have people accuse me of writing virus just because i am using this technique. Whats the proper way to implement this?
Note: I checked the self-extracting tag and many of the question is how to manipulate self extracting and not how to implement. Except this one which is asking something else Self-extracting self-checking executable
-edit- I made two self extracting with 7z and compared them. It looks like... well it IS the 7z.sfx file but with a regular 7z archive appended. So... there is nothing wrong with doing this? Is there a better way? I'm targeting windows and can use the C# compiler to help but i don't know how much extra work or how difficult it may be programmatically and maybe adding data to end of exe isnt bad?
It is possible. I used the following technique once, when we needed to distribute updates for the application, but the computers were configured so that the end user had no permissions to change application files. The update was supposed to log on to administrator account and update required files (so we came across identical problem: how to distribute many files as a single executable).
The solution were file resources in C#. All you need to do is:
Create a resource file in your C# project (file ending with .resx).
Add new resource of type "file". You can easily add existing files as byte[] resources.
In program you can simply extract resource as file:
System.IO.FileStream file = new System.IO.FileStream("C:\\PathToFile",
System.IO.FileMode.OpenOrCreate);
System.IO.BinaryWriter writer = new System.IO.BinaryWriter(file);
writer.Write(UpdateApplication.Data.DataValue, 0, UpdateApplication.Data.DataValue.Length);
(Here UpdateApplication.Data denotes binary resource).
Our solution lacked compression, but I believe this is easily achieved with libraries such as C#ZipLib.
I hope this solution is virus-scanner-safe, as this method creates complete, valid executable file.
How would one go about associating a file type with his application? I know how to read the command line arguments but I am not sure how I can "register" the file extension with Windows. Furthermore, my application is a stand-alone executable, so how would I keep Windows up-to-date on the location of my program?
I did a fair amount of searching and all I could find were old articles that didn't explain everything. How can I create file associations to a stand-alone executable in VB.NET?
Everything is handled by the registry. If you want to make your program self-register it's current location when run see this example.
http://www.codeproject.com/KB/dotnet/System_File_Association.aspx