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-07-31 19:14
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Batch Version of Single-User Mobile Number Location Query View 3,896 Replies 8
Original Poster Posted 2007-06-06 13:04 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Yesterday, when talking about the matter of making mobile phone information queries in the group, vkill immediately sent out a batch processing script of the curl + sed network version ( Professional Mobile Phone Number Locality Query.bat), and I admire his efficiency.

To make batch processing scripts for information query, database support is required. The usual situation is that it's easy to make the batch processing script, but hard to find the database. It's even much harder to search for unencrypted mobile phone databases online.

However, as the saying goes, "Hard work pays off". After more than a week of arduous search, I finally found a text - format, unencrypted database online before the New Year.

The organized database (please click here to download). The relevant information is as follows:

; The original information header of the mobile phone information database is as follows:
; -- phpMyAdmin SQL Dump
; -- version 2.8.1
; -- http://www.phpmyadmin.net
; The posting date is July 18, 2006, and the specific address is no longer traceable

; The area code information is from the network and was added to the original mobile phone information database after being sorted out by me
; The data covers the 130 - 139, 159 number segments
; The data format is: serial number, mobile phone number, area code, province/municipality directly under the Central Government, city, brand
; There are a total of 110,000 data entries, among which 98,107 are valid data entries and 11,893 are invalid data entries

Yesterday, I just started to organize this database and made a simple stand - alone mobile phone information query tool, which has no technical content and is just for everyone's amusement:

@echo off
title Mobile Phone Number Locality Query
mode con lines=10 cols=31

:Main
cls
echo.&echo.
echo Please enter the mobile phone number:
echo.
set input=
set /p input=
if not defined input exit
if "%input:~10%"=="" goto Main
if not "%input:~11%"=="" goto Main
echo %input%|findstr "^1*$">nul||goto Main
cls
echo.
set ID=%input:~0,7%
for /f "tokens=2,4,6,8,10 delims='" %%i in ('findstr /r "%ID%" Phone Information Database.txt') do (
echo ━━━━━━━━━━━━━━━
echo From: %%k %%l
echo.
echo Brand:%%m
echo.
echo Area code:%%j
echo ━━━━━━━━━━━━━━━
)
pause>nul
goto Main


[ Last edited by namejm on 2007 - 6 - 6 at 01:05 PM ]
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 2 Posted 2007-06-06 13:07 ·  中国 广东 东莞 电信
初级用户
Credits 107
Posts 48
Joined 2006-11-30 12:06
19-year member
UID 72174
Gender Male
Status Offline
Well, this one I can understand a bit, but what vkill made I don't understand! Still need to improve!
她希望我把粪土变黄金,我希望她视黄金如粪土!
Floor 3 Posted 2007-06-06 19:59 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Well, the database is really hard to find~ There are also many advantages to making local queries, heh~ It's more convenient, but there's no way to update it.
Floor 4 Posted 2007-06-06 22:31 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 301
Posts 135
Joined 2007-05-15 16:49
19-year member
UID 88615
Gender Male
Status Offline
Good stuff! I saw one for checking ID cards before. It's really a classic among the essentials. Thanks, moderator for your hard work! Just don't know where to download the updated database.
Floor 5 Posted 2007-06-07 05:16 ·  中国 广东 广州 黄埔区 电信
中级用户
★★
Credits 326
Posts 152
Joined 2007-05-04 06:16
19-year member
UID 87412
Gender Male
Status Offline
Good stuff... Collected............. Thanks for sharing
Floor 6 Posted 2007-06-07 17:44 ·  中国 辽宁 本溪 联通
银牌会员
★★★
Credits 1,212
Posts 464
Joined 2006-12-13 21:11
19-year member
UID 73417
Gender Male
Status Offline
The data cannot be downloaded...
Floor 7 Posted 2007-06-07 21:05 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
At the time of sending the attachment, I tested it and it could be downloaded, but now it can't be downloaded either. Maybe it's an issue with the download site. I'll contact the webmaster when I have time.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 8 Posted 2008-12-07 20:45 ·  中国 山西 忻州 电信
初级用户
★★
Credits 87
Posts 63
Joined 2008-08-23 11:28
17-year member
UID 123947
Gender Male
Status Offline
The data is not easy to download. I wrote an automatic download from the web according to plp626. It's just that the speed is a bit slow. Hope to be improved.
@echo off||author:plp626&<%~s0 more +9>%tmp%\gtxt.vbs
md 手机号数据库 2>nul & set n=0
title 手机号数据下载
color 3e
for /l %%i in (1300000,1,1399999) do (cscript //NoLogo //e:vbscript %tmp%\gtxt.vbs "http://www.poptool.net/enet/mobile.asp?key=%%i"|findstr "号码"|more +6 >>手机号数据.db )
for /l %%i in (1530000,1,1539999) do (cscript //NoLogo //e:vbscript %tmp%\gtxt.vbs "http://www.poptool.net/enet/mobile.asp?key=%%i"|findstr "号码"|more +6 >>手机号数据.db )
for /l %%i in (1590000,1,1599999) do (cscript //NoLogo //e:vbscript %tmp%\gtxt.vbs "http://www.poptool.net/enet/mobile.asp?key=%%i"|findstr "号码"|more +6 >>手机号数据.db )
echo 下载完毕!
pause
Set oDOM = WScript.GetObject(WScript.Arguments(0))
do until oDOM.readyState = "complete"
WScript.sleep 100
loop
WScript.echo oDOM.documentElement.outerText
Floor 9 Posted 2008-12-10 14:53 ·  中国 山西 忻州 电信
初级用户
★★
Credits 87
Posts 63
Joined 2008-08-23 11:28
17-year member
UID 123947
Gender Male
Status Offline
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
HAT -2 2008-12-10 17:58
Forum Jump: