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-20 19:01
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to extract QQ numbers from Info.db of QQ2009 (Solved) View 6,850 Replies 30
Original Poster Posted 2009-03-02 10:29 ·  中国 吉林 延边朝鲜族自治州 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
The uploaded QQ2009 information info.db file http://upload.cn-dos.net/img/1348.rar

For example, there are the following garbled codes:

Sky dream? Avoid: J Yang come]CF K- Yin Yan sky dream? Avoid: Zhen s? Dead ⑽ Exquisite? 
NF 
 515187266 9TD  Home and abroad
04  435853964 -TD Umbrella 18 Yan
?
 5? oYun Lei L(   } ~ Put and put blocks €8362-406
Duty scold and fear u39E Thump r 515187266 >TD 
ffffTA ?{-%/%//>PWf@=Oφ≌οη∠┫


Requirement: Display the digital strings line by line.
1. Since the QQ number and the numbers in the garbled code may be connected together due to directly filtering other characters, making it impossible to distinguish, I personally think that replacement should be used.
2. Because there are digital strings like 8362-406 in the garbled code, the - should not be filtered out during filtering.
3. Since there are numbers in this garbled code, the continuous digital strings with less than 5 digits are required to be deleted.
4. Because there are digital strings like 8362-406 in the garbled code, which are not QQ numbers, the digital strings containing - in the middle are deleted.
5. Delete duplicate digital strings

The sample effect after extracting the QQ number is as follows:

435853964
515187266




Originally posted by HAT at 2009-3-4 05:37:
@echo off
echo Processing, please wait for a few minutes...
sed "s//\n/g" Info.db>%temp%\a.txt
findstr ^*$ %temp%\a.txt>%temp%\b.txt
sort %temp%\b.txt>%temp%\c.txt
type nul>%temp%\d.txt
for /f "delims=" %%a in (%temp%\c.txt) do (
findstr /x /c:"%%a" %temp%\d.txt>nul 2>nul||echo.%%a>>%temp%\d.txt
)
start %temp%\d.txt


[ Last edited by Hanyeguxing on 2009-6-6 at 01:52 ]
Floor 2 Posted 2009-03-02 19:49 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Really 4 wants to play dead people or not

Use the FR tool to replace with just one command

fr -ric:"" -t:"A" 1.txt

Get the result like the following
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAA515187266AAA9AAAAAAAAAAAAAAA
04AAAAAAAAAAAAAAAAAAA435853964AAAAAAAAAAAAAA18AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAA5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA39AAAAAAAAAAAAAAAAA515187266AAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA


[ Last edited by yishanju on 2009-3-2 at 19:52 ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
Hanyeguxing +1 2009-03-03 12:44

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 3 Posted 2009-03-02 19:53 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Modify, do not replace spaces and with A

fr -ric:"" -t:"A" 1.txt

The result is as follows:

AAAAAAAAAAAAAAAAA  AAAAAAAAAAAAAAAAAAAAAAAA
AAAAA A
A 515187266 9AAAAA AA AAAAAA
04A A 435853964 AAAAAA AAAA18AA
AAA
A A5AAA AAAAAAA A AA A AAAAAAAAAAAAAAAA
AAAAAAA39AAAAAA 515187266 AAAAAA AA
AAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA


[ Last edited by yishanju on 2009-3-2 at 20:40 ]

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 4 Posted 2009-03-02 23:10 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
sed -i "s//A/g" a.txt
Recent Ratings for This Post ( 2 in total) Click for details
RaterScoreTime
yishanju +8 2009-03-03 09:05
Hanyeguxing +1 2009-03-03 12:44
Floor 5 Posted 2009-03-03 06:21 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
-_-_ I also wanted to use SED before, but later I found that the carriage returns and line feeds of the processed document all turned into black squares, which was really disgusting, so I didn't use SED anymore

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 6 Posted 2009-03-03 06:43 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
That's because you haven't found the right version ^_^
Floor 7 Posted 2009-03-03 06:45 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Please clarify the specific content that needs to be translated. The current text "给传个呗 我在GUNWIN32 上下的sed 4.15" is not a complete and clear sentence with specific technical content for a straightforward translation. Please provide more context or clarify the exact text to be translated precisely.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 8 Posted 2009-03-03 08:01 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Batch processing room attachment collection special post http://www.cn-dos.net/forum/viewthread.php?tid=25914
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
yishanju +8 2009-03-03 09:04
Floor 9 Posted 2009-03-03 12:42 ·  中国 吉林 延边朝鲜族自治州 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
Thanks to all great experts, I just want to use a batch script to complete it. Can it be done without relying on other tools?
This is for someone else. I can't just send someone a batch script and then send them a file...
Disdain myself, hehe.
Operating system: XP SP2 or SP3

[ Last edited by Hanyeguxing on 2009-3-3 at 12:46 ]
Floor 10 Posted 2009-03-03 13:18 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Is it really that difficult to pack them together and send them over?

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 11 Posted 2009-03-03 13:36 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
::Process files within 60K, can't handle larger ones. The assembly language part is assisted by batch processing COM development tools.
::Specify the file to modify at %1
@echo off
goto :begin
a 80
push bx
push cx
mov si,100
mov di,si
lodsb
cmp al,30
jb 0090
cmp al,39
jb 0092
mov al,41
stosb
loop 0087
pop cx
pop bx
nop

t=80
g 97

w
q
q
:begin
debug %1<%~nx0

[ Last edited by netbenton on 2009-3-3 at 11:37 ]
精简
=> 个人网志
Floor 12 Posted 2009-03-03 14:01 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
@echo off
goto :bengin
a 80
db, 53 51 BE 00 01 89 F7 AC 3C 30 72 04 3C 39 72 02 B0 41 AA E2
db, F2 59 5B 90

t=80
g 97

w
q
q
:bengin
debug %1<%~nx0
精简
=> 个人网志
Floor 13 Posted 2009-03-03 14:16 ·  中国 吉林 延边朝鲜族自治州 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
Originally posted by netbenton at 2009-3-3 13:36:
::Process files within 60K or less; larger ones can't be handled. The assembly language part is assisted by batch processing com development tools to write.
::Specify the file to be modified at %1
@echo off
goto :begin
a 80
push bx
push cx
mov si,10...
This file to be processed is at least 170kb, and 350kb is very common.

Originally posted by yishanju at 2009-3-3 13:18:
Is it very difficult to upload all together?
Sir, give a download address of the fr tool, I'll use it, thank you
Floor 14 Posted 2009-03-03 14:23 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 15 Posted 2009-03-03 14:41 ·  中国 吉林 延边朝鲜族自治州 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
Originally posted by yishanju at 2009-3-3 14:23:
fr download address:
http://baiy.cn/utils/fr/index.htm

Now start learning fr and sed, hehe

Using fr, there are still a small number of black blocks left 5555555555555555
Dear upstairs, test with info.db in QQ2009 version to know

[ Last edited by Hanyeguxing on 2009-3-3 at 14:59 ]
Forum Jump: