Follow us on Twitter!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Monday, April 27, 2015
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 19
Guests Online: 19
TeamSpeak Online : 5 Members Online: 0

Registered Members: 88069
Newest Member: margeryjessica
Latest Articles
Our sponsor needs your help!


One of our sponsors needs your help, http://www.virginmediabusiness.co.uk/pitch-to-rich/grow/krystal-hosting/
Go check out their video and Don't forget to vote !


~ Thanks for your help
HBH
View Thread

HellBound Hackers | Computer General | Programming

Author

appending a binary file (C/++)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 29-10-06 01:31
well im trying to append to a binary file like so
Code

if(!(elf = fopen(file, "a+b"))){  return;}
   fseek(elf,elfpheader->offset+address,SEEK_SET);
   printf("offset 0x%0x\n",elfpheader->offset+address);
   fwrite((void*)value, sizeof(u32), 1, elf);




the offset is the line in the file i want to edit and the value is obviously the new value i want to append, but when i try this it runs smoothely until it trys to write the value. ive had to cast the value from a "unsigned int" to "void*" VC Express just gives me an error inside the fread.c line 93 saying "Expression: buffer != NULL" this also happens when i try to read from here aswell.

Edited by on 29-10-06 01:32