ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Apr 25, 2018 6:07 pm

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Copy and paste?
PostPosted: Tue Apr 28, 2015 5:17 pm 

Joined: Fri Feb 20, 2015 7:24 pm
Posts: 31
Is there any function in QBMS script to copy from file some bits and paste them to other place or other file?
Something like 838286568
copy "28" or copy 0x4-0x5
if not, it would be really useful, thanks :D

_________________
( ͡° ͜ʖ ͡ °)


Top
   
 Post subject: Re: Copy and paste?
PostPosted: Tue Apr 28, 2015 5:28 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7935
The String command allows to manipulate strings and you can use something like:
Code:
set VAR string "838286568"
string VAR << 3
string VAR >> 4
print "%VAR%"
The operators of the String command are not intuitive but with some tests you can reach your result.


Top
   
 Post subject: Re: Copy and paste?
PostPosted: Tue Apr 28, 2015 5:30 pm 

Joined: Fri Feb 20, 2015 7:24 pm
Posts: 31
Oh thanks, It's works nicely!
Also, is there a command to put var into a new file?

_________________
( ͡° ͜ʖ ͡ °)


Top
   
 Post subject: Re: Copy and paste?
PostPosted: Tue Apr 28, 2015 5:36 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7935
Yes, quickbms has both "get" and "put" commands :)
I suggest you to use Put with a memory file to make things easier:
Code:
set VAR string "838286568"
string VAR << 3
string VAR >> 4
print "%VAR%"

log MEMORY_FILE 0 0 # initialize
putct VAR string -1 MEMORY_FILE # because put string adds also a 0x00 byte
put 0x0d byte MEMORY_FILE # carriage-return (optional)
put 0x0a byte MEMORY_FILE # line-feed (optional)

get SIZE asize MEMORY_FILE
log "dump.txt" 0 SIZE MEMORY_FILE


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited