昨天在群里谈到做手机信息查询的事情,vkill立马就发了个curl+sed网络版的批处理出来(
手机号码归属地专业查询.bat),赞叹一下他的效率。
要做信息查询类的批处理,是需要数据库支持的。经常的状况就是:批处理好做,数据库难寻。网上搜索未加密的手机数据库更是难上加难。
不过,功夫不负有心人,经过长达一个多星期的艰苦搜寻,在年前的时候,我终于在网上找到了一个文本格式的、未加密的数据库。
整理后的数据库(请点击
这里下载)相关信息如下:
; 手机信息数据库原始信息头部如下:
; -- phpMyAdmin SQL Dump
; -- version 2.8.1
; -- http://www.phpmyadmin.net
; 张贴日期为 2006-7-18,具体地址已经无从考证
; 电话区号信息来自网络,由本人整理之后添加到原有的手机信息数据库中
; 数据覆盖130-139、159号段
; 数据格式为:序号 手机号码 电话区号 省/直辖市 市 品牌
; 共计11万条数据,其中有效数据98107条,无效数据11893条
昨天才开始着手整理这个数据库,并做了一个简单的单机版手机信息查询器出来,没什么技术含量,博大家一笑罢了:
@echo off
title 手机号码归属地查询
mode con lines=10 cols=31
:Main
cls
echo.&echo.
echo 请输入手机号码:
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%" 手机信息数据库.txt') do (
echo ━━━━━━━━━━━━━━━
echo 来自: %%k %%l
echo.
echo 品牌:%%m
echo.
echo 电话区号:%%j
echo ━━━━━━━━━━━━━━━
)
pause>nul
goto Main
Last edited by namejm on 2007-6-6 at 01:05 PM ]
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 ]