分来了,号忘了……

又到一年查分时,可惜那可怜的准考证早已被扫如了垃圾堆中。于是破解准考证号的大戏拉开帷幕。

综合网上资料其实对准考证稍加组合还是可以暴力破解出来的。方法大致如下:

1、前3位是省份代码,一般都是该省省会身份证号的前3位;

2、第4-5位是学校代码;

3、第6位是学校的校区代码,有的从0开始,有的从1开始,甚至有的学校会有间隔,很不规律;

4、第7-8位是考试年份,例如2012年的就是12;

5、第9位是该年中第几次四六级考试,例如2012年6月份的考试是1;

6、第10位是四六级类别,四级是1,六级是2;

7、第11-13位是考场号,例如第1考场就是001;

8、第14-15位是座位号,例如1号座位就是01.

前十位是可以靠查资料组合出来的,至于后面较为随机的5位数就要交给计算机来办了。

以下以python为例,示范爆破最后5位准考号。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import re
import sys

def main():
print("===========================================")
print("Welcome to run this CET score query program")
print(" Created by messense<http://messense.me>")
print("===========================================\n\n")
code = raw_input("Please type the first 10 number of your ID(like 6100111211): ")
start_room = int(raw_input("Please type 3 number of starting exam room(like 001): "))
stop_room = int(raw_input("Please type 3 number of ending exam room(like 100): "))
seats = int(raw_input("Please type the count of people of one room(like 30): "))
name = unicode(raw_input("Please type your name: "), "gb2312").encode("utf-8")
print("Query name is %s" % urllib2.quote(name))

url = "http://www.chsi.com.cn/cet/query?zkzh=%s&xm=%s"
current_room = start_room
current_room_str = ''

while current_room if current_room < 10: current_room_str = '00' + str(current_room) elif current_room >= 10 and current_room < 100:
current_room_str = '0' + str(current_room)
else:
current_room_str = str(current_room)
current_seat = 1
current_seat_str = ''
while current_seat if current_seat < 10:
current_seat_str = '0' + str(current_seat)
else:
current_seat_str = str(current_seat)
num = "%s%s%s" % (code, current_room_str, current_seat_str)
query_url = url % (num, urllib2.quote(name))
print("Now querying ID %s" % num)
try:
req = urllib2.Request(query_url)
req.add_header("Referer", "http://www.chsi.com.cn/cet/")
html = urllib2.urlopen(req).read()
except:
print("Open query url(%s) error" % query_url)
continue
if html.find('cetTable') == -1:
print("Can not find your score, try next.")
current_seat += 1
else:
print("\n\nWow! I've found your score!")
print("Your ID is %s" % num)
print("Please open http://www.chsi.com.cn/cet/ with your browser then type the ID and your name to view your CET score.")
sys.exit(1)

current_room += 1

if __name__ == '__main__':
main()

以上抛砖引玉希望同样悲剧的童鞋早日找回自己的准考证号,并且再次强烈谴责只提供准考证查分的2B系统!!!

分来了,号忘了……》有3个想法

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注