China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 09:43
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Binary File Handling Tool STR (Updated on 2020.11.16) View 40,057 Replies 72
Floor 16 Posted 2008-12-14 16:10 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by chenall at 2008-12-14 10:14:
There seems to be some problems with the find and replace function..
Content of file A.TXT

Exe =$1\TEST
Exe =$1\TEST2

strw a.txt 0 0 /r /asc:$1 /asc:j: /a
The resulting result is garbled and characters are lost

Correct...


Has been corrected, see the attachment on the first floor
Floor 17 Posted 2008-12-14 16:41 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
I said why it didn't work when I renamed grldr a few days ago, the file size changed after renaming. The corrected one is okay now.
Windows 一键还原
http://www.yjhy.com
Floor 18 Posted 2008-12-14 21:17 ·  中国 福建 泉州 电信
银牌会员
★★★
Credits 1,276
Posts 469
Joined 2002-12-23 13:00
23-year member
UID 586
Gender Male
From 福建泉州
Status Offline
#17
It is no problem to rename with grubutil now.
QQ:366840202
http://chenall.net
Floor 19 Posted 2008-12-18 09:43 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Hero, there's an error when writing 0.
str 1.exe 0x03 0 /e /hex:0011

When encountering 00, it can't be written.
Urgent need, can it be corrected as soon as possible?

[ Last edited by goli2008 on 2008-12-18 at 14:06 ]
Floor 20 Posted 2008-12-18 10:40 ·  中国 安徽 淮北 电信
新手上路
Credits 13
Posts 9
Joined 2008-11-28 09:38
17-year member
UID 132309
Gender Male
Status Offline
If you execute the command: str 1.txt 0 0 /f /asc:0000 /a
Then the execution result is:
Find string At:
0 0x0
4 0x4


How is this output achieved?
Floor 21 Posted 2008-12-19 22:31 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by chenall at 2008-12-14 09:43:
Well, the above can be achieved, but if it is placed in a batch file, calculating the character length will be more troublesome.

Another question, does the program return an error level value?
For example, for a search, what is returned on success? What is returned on failure?


#define SUCCESS 0
#define COMMON_USE_ERROR 1
#define OPEN_FILE_ERROR 2
#define PRG_MODIFIED 3
#define FILE_READ_ERROR 4
#define PARAMETER_ERROR 5
#define CREATE_FILE_ERROR 6
#define FILE_WRITE_ERROR 7
#define SRCFILE_DSTFILE_SAME 8
#define USER_CANCEL 9
#define FILE_NOT_EXIST 10
#define FILE_SEEK_ERROR 11
#define STRING_NOT_FOUND 12
Floor 22 Posted 2008-12-19 23:19 ·  中国 福建 泉州 电信
银牌会员
★★★
Credits 1,276
Posts 469
Joined 2002-12-23 13:00
23-year member
UID 586
Gender Male
From 福建泉州
Status Offline
Accepted, updated, it's convenient to use the return value for batch processing.
QQ:366840202
http://chenall.net
Floor 23 Posted 2008-12-24 12:46 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Can the antivirus software improve the issue of reporting viruses further?

Anti-virus engine Version Last update Scan result
Panda 9.0.0.4 2008.12.23 Suspicious file
eSafe 7.0.17.0 2008.12.23 Suspicious File
CAT-QuickHeal 10.00 2008.12.23 (Suspicious) - DNAScan
TrendMicro 8.700.0.1004 2008.12.23 PAK_Generic.001
Windows 一键还原
http://www.yjhy.com
Floor 24 Posted 2008-12-24 23:41 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by lianjiang2004 at 2008-12-24 12:46:
Can the problem of antivirus software reporting viruses be further improved?


Antivirus engine version Last update Scanning result
Panda 9.0.0.4 2008.12.23 Suspicious file
eSafe 7.0.17.0 2 ...


Is it a DOS version or a Win32 version?

Upload a re-compiled Win32 version and see if it still reports.

[ Last edited by 19951001 on 2008-12-24 at 23:59 ]
Attachments
strWin32.rar (6.83 KiB, Credits to download 1 pts, Downloads: 2)
Floor 25 Posted 2008-12-25 09:00 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
It's the Win32 version. There are still 4 false positives in the new version.

Refer to the result:
http://www.virustotal.com/zh-cn/analisis/b9c3a770b58c752acffa461f01a8ff3f
Windows 一键还原
http://www.yjhy.com
Floor 26 Posted 2008-12-26 20:33 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by lianjiang2004 at 2008-12-25 09:00:
It's the win32 version, and the new version still has 4 false positives.

For the result, please refer to:
http://www.virustotal.com/zh-cn/analisis/b9c3a770b58c752acffa461f01a8ff3f


Here, it is compiled with 3 compilers: vc6, vc2005, watcom_c_c++. Let's see if it still reports.
Attachments
str.rar (79.8 KiB, Credits to download 1 pts, Downloads: 6)
Floor 27 Posted 2008-12-26 21:09 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
I checked it myself, and here are the results:

VC6 version
http://www.virustotal.com/zh-cn/analisis/5b64b8f4f16b18888f3f99d8f67405e0

VC2005 version
http://www.virustotal.com/zh-cn/analisis/55bbdb7349a1e2b9d13bfcfcb02c61f9

Watcom_c_c++ version
http://www.virustotal.com/zh-cn/analisis/55eed4217d9b87f75aa497a3a946fb57

It seems that the false positive is likely the smallest when compiled with Watcom_c_c++.
Floor 28 Posted 2008-12-26 21:16 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
It's hard work. It seems this problem is a bit difficult to handle. Then there's no way, it can only be like this.
Windows 一键还原
http://www.yjhy.com
Floor 29 Posted 2008-12-26 22:10 ·  中国 北京 电信
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Finally solved the false positive, and used gcc to compile the program.
http://www.virustotal.com/zh-cn/analisis/de61cb640445ca8bb89b41affc255e91
Attachments
STR.rar (22.06 KiB, Credits to download 1 pts, Downloads: 30)
Floor 30 Posted 2008-12-26 22:20 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by 19951001 at 2008-12-26 22:10:
Finally solved the false positive, using gcc to compile the program.
http://www.virustotal.com/zh-cn/analisis/de61cb640445ca8bb89b41affc255e91


Great, so there won't be someone reporting it as a virus. Thanks.
If it's convenient, please recompile dspt and diskrw as well, as I need to use them in my GGhost.
Windows 一键还原
http://www.yjhy.com
Forum Jump: