Advertisement
jargon

HxD bytecode plain/text chopper

Jul 7th, 2011
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dim as uinteger m=freefile,i=0
  2. dim as string t=space(120),tt=space(0)
  3. open "dump.txt" for binary as m
  4. dim as uinteger mo=freefile
  5. open "out.txt" for binary as mo
  6. do while not(eof(m))
  7.     tt=space(0)
  8.     if lof(m)-seek(m)<120 then t=space(lof(m)-seek(m)+1)
  9.     if len(t)=0 then exit do
  10.     get #m,,t
  11.     for i=1 to len(t) step 3
  12.         tt=tt+mid(t,i,2)
  13.     next
  14.     put #mo,,hex(fix(seek(m)*2/3))+"/"+hex(fix(lof(m)*2/3))+":"+tt+chr(13)+chr(10)
  15.     print hex(seek(m)*2/3)+"/"+hex(lof(m)*2/3)+":"+tt
  16. loop
  17. close mo
  18. close m
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement