STR
File: A File to be Processed data. //File: A file to process data
Start: Offset to Process data. //Start: Offset to process data (the beginning of the file is 0)
Bytes: Bytes to Process. //Bytes: Bytes to process (if 0 is entered, it means from Start to the end of the file)
/C: Copy Bytes from File to dstFile. ///C: Copy bytes from the file to the destination file
/I: Insert Bytes to dstFile from File. ///I: Insert bytes from the file into the destination file, and the destination file will increase by Bytes bytes after insertion
dstFile: A File to Write Result data. //dstFile: A file to write result data
Address: Offset to Write Result data. //Address: Offset to write result data (if the destination file does not exist, this value is ignored)
STR
/D: Delete Bytes from File & Write Result to dstFile. ///D: Delete bytes from the file and write the result to the destination file
STR
/V: View File In Hex Style. ///V: View the file in hexadecimal style
/A: Show ASCII Value. ///A: Show ASCII value
/P: Pause Echo Screen. ///P: Pause the echo screen
STR :
Bytes: Must be 0. //Bytes: Must be 0
/F: Find String in File. ///F: Find string in the file
/Hex: Hex Style. ///Hex: Hexadecimal style
/Asc: ASCII Style. ///Asc: ASCII style
Value: Hex_Digital/ASCII String (40 Characters Maximum). //Value: Hexadecimal number/ASCII string (maximum 40 characters) (if it is a hexadecimal string, the length should be even)
/I: Ignore Case. ///I: Ignore case
/A: Process All Value in File. ///A: Process all values in the file (default to find once)
STR :
Bytes: Must be 0. //Bytes: Must be 0
/E: Edit File. ///E: Edit the file
STR
Bytes: Must be 0. //Bytes: Must be 0
/R: Relace SrcString with DstString. ///R: Replace SrcString with DstString
SrcString: :. //SrcString: :
DstString: :. //DstString: :
/A: Process All SrcString in File. ///A: Process all SrcString in the file (default to replace once)
Instructions:
1 When using the /C and /I commands, if the destination file does not exist, the value of Address will be ignored, and directly execute to write the Bytes bytes from Start in the source file to the newly created destination file
2 When using the /C and /I commands, if the destination file exists and Address is not entered, Address defaults to 0, which is the starting position of the file.
3 The size of a single file currently processed does not exceed 2G
Examples:
str 1.exe 0x100 0x10 /d 2.bin Execute to delete 16 bytes from position 256 in file 1.exe and write the result to 2.bin. The length of file 2.bin will be 16 bytes smaller than that of 1.exe
str 1.exe 0x100 0x10 /c 2.bin 20 Execute to write 16 bytes from position 256 in file 1.exe to position 20 of 2.bin, that is, 16 bytes starting from position 20 in file 2.bin will be overwritten
str 1.exe 0x100 0x10 /i 2.bin 20 Execute to insert 16 bytes from position 256 in file 1.exe into position 20 of 2.bin, and the length of the result file 2.bin will increase by 16 bytes
str 1.exe 0x100 0 /v /p /a Display the file content on the screen starting from file offset position 256. If Bytes is entered as 0, it means from Start to the end of the file.
str 1.exe 0x100 0 /e /hex:11223344 Modify 4 bytes starting from file offset position 256 to 0x11, 0x22, 0x33, 0x44.
str 1.exe 0x100 0 /e /asc:1234 Modify 4 bytes starting from file offset position 256 to 1234, that is, 0x31, 0x32, 0x33, 0x34
The search and replace algorithm uses the KMP algorithm, and does not count repeatedly. For example, the content of file 1.txt is 10 characters 0:
0000000000
If the command is executed: str 1.txt 0 0 /f /asc:0000 /a
Then the execution result is:
Find string At:
0 0x0
4 0x4
It will not be:
Find string At:
0 0x0
1 0x1
2 0x2
3 0x3
4 0x4
5 0x5
6 0x6
The compressed package contains DOS version and Win32 version
Corrected the problem in the replace string function on 2008.12.14
Corrected the problem on floor 19 on 2008.12.19
Test version on 2009.2.15 on floor 50
[ Last edited by 19951001 on 2020-11-16 at 17:01 ]
File: A File to be Processed data. //File: A file to process data
Start: Offset to Process data. //Start: Offset to process data (the beginning of the file is 0)
Bytes: Bytes to Process. //Bytes: Bytes to process (if 0 is entered, it means from Start to the end of the file)
/C: Copy Bytes from File to dstFile. ///C: Copy bytes from the file to the destination file
/I: Insert Bytes to dstFile from File. ///I: Insert bytes from the file into the destination file, and the destination file will increase by Bytes bytes after insertion
dstFile: A File to Write Result data. //dstFile: A file to write result data
Address: Offset to Write Result data. //Address: Offset to write result data (if the destination file does not exist, this value is ignored)
STR
/D: Delete Bytes from File & Write Result to dstFile. ///D: Delete bytes from the file and write the result to the destination file
STR
/V: View File In Hex Style. ///V: View the file in hexadecimal style
/A: Show ASCII Value. ///A: Show ASCII value
/P: Pause Echo Screen. ///P: Pause the echo screen
STR :
Bytes: Must be 0. //Bytes: Must be 0
/F: Find String in File. ///F: Find string in the file
/Hex: Hex Style. ///Hex: Hexadecimal style
/Asc: ASCII Style. ///Asc: ASCII style
Value: Hex_Digital/ASCII String (40 Characters Maximum). //Value: Hexadecimal number/ASCII string (maximum 40 characters) (if it is a hexadecimal string, the length should be even)
/I: Ignore Case. ///I: Ignore case
/A: Process All Value in File. ///A: Process all values in the file (default to find once)
STR :
Bytes: Must be 0. //Bytes: Must be 0
/E: Edit File. ///E: Edit the file
STR
Bytes: Must be 0. //Bytes: Must be 0
/R: Relace SrcString with DstString. ///R: Replace SrcString with DstString
SrcString: :. //SrcString: :
DstString: :. //DstString: :
/A: Process All SrcString in File. ///A: Process all SrcString in the file (default to replace once)
Instructions:
1 When using the /C and /I commands, if the destination file does not exist, the value of Address will be ignored, and directly execute to write the Bytes bytes from Start in the source file to the newly created destination file
2 When using the /C and /I commands, if the destination file exists and Address is not entered, Address defaults to 0, which is the starting position of the file.
3 The size of a single file currently processed does not exceed 2G
Examples:
str 1.exe 0x100 0x10 /d 2.bin Execute to delete 16 bytes from position 256 in file 1.exe and write the result to 2.bin. The length of file 2.bin will be 16 bytes smaller than that of 1.exe
str 1.exe 0x100 0x10 /c 2.bin 20 Execute to write 16 bytes from position 256 in file 1.exe to position 20 of 2.bin, that is, 16 bytes starting from position 20 in file 2.bin will be overwritten
str 1.exe 0x100 0x10 /i 2.bin 20 Execute to insert 16 bytes from position 256 in file 1.exe into position 20 of 2.bin, and the length of the result file 2.bin will increase by 16 bytes
str 1.exe 0x100 0 /v /p /a Display the file content on the screen starting from file offset position 256. If Bytes is entered as 0, it means from Start to the end of the file.
str 1.exe 0x100 0 /e /hex:11223344 Modify 4 bytes starting from file offset position 256 to 0x11, 0x22, 0x33, 0x44.
str 1.exe 0x100 0 /e /asc:1234 Modify 4 bytes starting from file offset position 256 to 1234, that is, 0x31, 0x32, 0x33, 0x34
The search and replace algorithm uses the KMP algorithm, and does not count repeatedly. For example, the content of file 1.txt is 10 characters 0:
0000000000
If the command is executed: str 1.txt 0 0 /f /asc:0000 /a
Then the execution result is:
Find string At:
0 0x0
4 0x4
It will not be:
Find string At:
0 0x0
1 0x1
2 0x2
3 0x3
4 0x4
5 0x5
6 0x6
The compressed package contains DOS version and Win32 version
Corrected the problem in the replace string function on 2008.12.14
Corrected the problem on floor 19 on 2008.12.19
Test version on 2009.2.15 on floor 50
[ Last edited by 19951001 on 2020-11-16 at 17:01 ]
Attachments
