Jump to content


Photo

Binary File Manipulation?


  • Please log in to reply
1 reply to this topic

#1 Brandonius

Brandonius
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 14 July 2006 - 11:16 PM

Is it possible to manipulate a binary file on the server with PHP?

For example, take an executable, seek to byte 1000, overwrite the next 6 bytes with new data, and save the modifed file?


Thanks!

#2 ShogunWarrior

ShogunWarrior
  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 14 July 2006 - 11:22 PM

PHP has binary safe file functions, binary operators and with fseek you can seek to a byte in a file so I'd say it's possible.
<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users