Patching/Reading Files: stdio or fstream? Programming Software Development by xikkub … as well (.open, .seekp, .put). I've had no problems patching file memory with stdio, but fstream/ofstream methods corrupt my… binary patching a file Programming Software Development by civilr … places and I couldn't find anything related to binary patching a file in C#. Google did give me some interesting… I am not creating anything to use this method of patching a file ATM but I want to learn. Any help… "difference patching" help Programming Software Development by ctlajoie "difference patching" is my word for the method used by patch … DOS EXE patching / far calls / relocations Programming Software Development by PaTchX I am playing around with "patching" an old DOS 16-bit real-mode .exe, trying … Re: Patching/Reading Files: stdio or fstream? Programming Software Development by thelamb I'm not entirely sure if put overwrites the content at the current position (although I see no reason why it shouldn't). Can you try using f.write with a size of 1 ? Re: Patching/Reading Files: stdio or fstream? Programming Software Development by vijayan121 Change [ICODE]ofstream f("test.exe", ios::out | ios::binary); [/ICODE] To [ICODE]ofstream f("test.exe", [COLOR=Red]ios::in |[/COLOR] ios::out | ios::binary);[/ICODE] The first is equivalent to the C mode string [B]"wb"[/B], the second is equivalent to [B]"r+b"[/B] which is what you need here. Re: Patching/Reading Files: stdio or fstream? Programming Software Development by xikkub Thanks, vijayan121! That fixed it. thelamb, I thought of doing that but I didn't know how to change the offset. Thanks all! Patching problem Programming Software Development by Sergei82 The problem: I have an executable and mylib.dll (C# class library) in the same directory. I have a subdirectory "Patch" in that directory containing another version of that mylib.dll. I need to make a sample application somehow that loads the first dll, than frees it (like LoadLibrary and FreeLibrary in Windows API, but here I use Domain.… Re: Patching problem Programming Software Development by LizR That sounds odd. Normally if its a newer version the .net framework will pick up the fact the versions changed and the cached version is updated. Re: Patching problem Programming Software Development by Sergei82 Simple code... maybe, something wrong here...:S [code=csharp] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; using System.IO; namespace PatchedApp { class Program { public static void LoadInvoke(string path) { AppDomain sandbox = … Re: Patching problem Programming Software Development by Sergei82 Well, anyway I found the solution to my problem at last: [url]http://adrianvintu.com/blogengine/post/Unloadable-plugins.aspx[/url] Re: "difference patching" help Programming Software Development by BountyX have you considered using recursion ;) think about it and post back if you need help setting it up Re: "difference patching" help Programming Software Development by infamous try comparing line by line, not bit by bit. Re: "difference patching" help Programming Software Development by BountyX [QUOTE=infamous]try comparing line by line, not bit by bit.[/QUOTE] comparing line by line might be errorneous, but if not its worth a shot. If your trying to patch a file by getting the asic contents of one exe and comparing it with the asci contents of another, that won't work. Re: DOS EXE patching / far calls / relocations Programming Software Development by Ryu 9A 06 00 70 00 == call far absolute 0070:0006h (706h) Typically the assemblers will generate relative calls insted of absolute, unless in the source you directly give it an abosute address, which is my guess to what is going on. If this is the case you should be using labels insted. If this isn't the case, there could be a problem with appending … Re: DOS EXE patching / far calls / relocations Programming Software Development by PaTchX Hey. Thanks for the reply. I think I understand the issue now - it's definitely relocation. Here's some good info on the subject (stolen off a newsgroup - this was a post by Jack Klein): The brief overview is this: The part of the exe format that contains the image of the code is put together with the assumption that the executable will be loaded… Re: DOS EXE patching / far calls / relocations Programming Software Development by mathematician Apart from engineering a system crash, what is the point of trying to patch machine code without access to the original source code? Re: DOS EXE patching / far calls / relocations Programming Software Development by PaTchX [quote=mathematician;278541]Apart from engineering a system crash, what is the point of trying to patch machine code without access to the original source code?[/quote] Don't laugh now, but I'm looking into reverse engineering an old DOS game, and am trying to patch some code to understand how it works, considering that this game is online-only … make (handbrake) Hardware and Software Linux and Unix by lewashby …/A00-dpl2.patch patching file include/a52.h patching file liba52/a52_internal.h patching file liba52/downmix.c…-thread-safe.patch patching file liba52/a52_internal.h patching file liba52/imdct.c patching file liba52/parse.…lt; ../contrib/a52dec/A02-imdct-shutup.patch patching file liba52/imdct.c Hunk #1 succeeded at… Warning: Linux security bashed by 22 year old remote code execution bug Hardware and Software Linux and Unix by happygeek …`env x='() { :;}; echo vulnerable' bash -c "echo start patching now"` If you see output of 'vulnerable - start…mean you will be able to patch everything that requires patching. Does your wireless router shell out to ping or…traceroute? Does your network use FTP or Telnet? Try patching those... This could be a major headache for admins and… Ye Bloody Gods!!! 74 percent of big business yet to fix Heartbleed flaw Hardware and Software Networking by happygeek …Heartbleed highlights the difficulty of basing security on patching production systems. Organizations have to balance the needs…way to address this challenge is to complement patching and effective system management with a layered approach…devices with another manufacturer that is responsible for patching their own devices by themselves. Every time … Re: Warning: Linux security bashed by 22 year old remote code execution bug Hardware and Software Linux and Unix by Gribouillis …='() { :;}; echo vulnerable' bash -c "start patching now" vulnerable start: Tâche inconnue : patching `Tâche inconnue` means `unknown task`. So… the `initctl` command. Fortunately, initctl does not know the subcommand `patching` and it aborted. Edit: After running the update manager, bash… Converting C# ideas to C++ (Binary) Programming Software Development by MasterGberry …map so, that originally larger resolutions stay larger even after patching. They _may_ become invalid though. // This is necessary … both horizontal and vertical // prefer the one that we are patching. // Both are true if (hor && ver) { if… Re: Warning: Linux security bashed by 22 year old remote code execution bug Hardware and Software Linux and Unix by mike_2000_17 Yeah, the test command should be: $ env x='() { :;}; echo vulnerable' bash -c "if [ $? -ne 0 ] ; then echo \"start patching now\"; fi" I tried it and it printed "vulnerable" for me, but I checked my updates and bash got updated to 4.3 and now the test command no longer shows it to be vulnerable. Yay! Searching within arrays problem Programming Web Development by bigmushy … held in a comma seperated column called asset_tags in the patching table). This is where it gets complicated I have two… want to search the assets tables with values from the patching table and the assets that have been patched should have… Subprocess Module Confusion Programming Software Development by bgk111 … tcltk When ready to quit enter: exit Patching vector map <countytest@PERMANENT>... Patching vector map <countytest2@PERMANENT>... Building… Five *nix Myths Busted Hardware and Software Linux and Unix by khess … some careful thought about what you're doing. It takes patching, updating and upgrading to prevent security issues. It also takes…'s why. The system administrators needed to do some major patching on that system but were afraid since it had been… java console application for truck dispatching Programming Software Development by Kajal_3 … Road Commission to write a Java console application that dispatches patching trucks on county roads. It reads truck and route data… truck with the lowest hours left and assign them the patching job. Use the route ID in the order to get… Re: Five *nix Myths Busted Hardware and Software Linux and Unix by cantbebothered … really was a problem, they could just reboot once before patching. If it was thrashing, fine, it may have needed more… Re: Five *nix Myths Busted Hardware and Software Linux and Unix by ihatewebforms Any machine left facing the internet without patching or proper firewalling, will, eventually be made use of by a 3rd party. That is what happened to khess's Sun box. Nobody is surprised and it reflects badly on your client more than it does Sun, BSD or *nix's security.