To write sig:
To locate sig:
I've got more complete code if you want.
;Open Test Executable fileout = OpenFile("test.exe") SeekFile fileout,FileSize("test.exe") ;Write Signature for locating start of data WriteByte fileout,Asc("R") WriteByte fileout,Asc("O") WriteByte fileout,Asc("B") CloseFile fileout End
To locate sig:
file = OpenFile("test.exe") While Not Eof(file) If ReadByte(file)=Asc("R") ;Found first If ReadByte(file)=Asc("O") ;Found second If ReadByte(file)=Asc("B") ;Found third found=FilePos(file) EndIf EndIf EndIf Wend While Not KeyHit(1) Text 20,20,Found Wend End
I've got more complete code if you want.