本帖最后由 .個朲綉√ 于 2010-9-13 00:51 编辑
Sorry技术不到家,555,关注一下,等高手吧。
不知道哪出错了,请高手再改进吧,试了半天没通过,郁闷。
可能是没有Cookie吧,我抓包没有抓到Cookie
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("登陆", 351, 133, 429, 352)
$Label1 = GUICtrlCreateLabel("账号", 24, 16, 46, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlCreateLabel("", 16, 72, 4, 4)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("密码", 24, 56, 46, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Input1 = GUICtrlCreateInput("Name", 80, 16, 209, 21)
$Input2 = GUICtrlCreateInput("Pass", 80, 56, 209, 21)
$Button1 = GUICtrlCreateButton("登陆", 80, 88, 97, 25)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Button2 = GUICtrlCreateButton("注册账号", 192, 88, 97, 25)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
_login(GUICtrlRead($Input1),GUICtrlRead($Input2))
Case $Button2
GUISetState(@SW_HIDE, $Form1)
$Form2 = GUICreate("账号注册", 314, 345, 486, 239)
$Label1 = GUICtrlCreateLabel("中文ID", 24, 136, 73, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Label2 = GUICtrlCreateLabel("密码", 24, 56, 73, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Label3 = GUICtrlCreateLabel("确认", 24, 96, 73, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Button3 = GUICtrlCreateButton("确定注册", 72, 288, 113, 33)
$Label4 = GUICtrlCreateLabel("QQ号", 24, 176, 73, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Label5 = GUICtrlCreateLabel("账号", 24, 16, 73, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Label6 = GUICtrlCreateLabel("签名", 24, 216, 73, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Input1 = GUICtrlCreateInput("", 104, 16, 169, 21)
$Input2 = GUICtrlCreateInput("", 104, 56, 169, 21)
$Input3 = GUICtrlCreateInput("", 104, 96, 169, 21)
$Input4 = GUICtrlCreateInput("", 104, 136, 177, 21)
$Input5 = GUICtrlCreateInput("", 104, 176, 177, 21)
$Input6 = GUICtrlCreateInput("", 104, 216, 177, 21)
$Button4 = GUICtrlCreateButton("返回登录", 208, 288, 73, 33)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button4
GUISetState(@SW_HIDE, $Form2)
GUISetState(@SW_SHOW, $Form1)
ExitLoop
Case $GUI_EVENT_CLOSE
Exit
Case $Button3
_reg(GUICtrlRead($Input1),GUICtrlRead($Input2),GUICtrlRead($Input4),GUICtrlRead($Input5),GUICtrlRead($Input6))
EndSwitch
WEnd
EndSwitch
WEnd
Func _login($name,$pass)
$xmlhttp=ObjCreate("Microsoft.XMLHTTP")
$xmlhttp.open("post","http://121.8.187.110:8181/login.php?action=login",false)
$xmlhttp.setRequestHeader("Cache-Control", "no-cache")
$xmlhttp.setRequestHeader("Connection", "Keep-Alive")
$xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
$xmlhttp.setRequestHeader("Referer","http://121.8.187.110:8181/index.php")
$xmlhttp.Send("auth="& $name &"password=" & $pass & "Submit.x=20&Submit.y=17")
ShellExecute("http://121.8.187.110:8181/index.php")
EndFunc
Func _reg($name,$pass,$cnid,$qq,$gx)
$oHTTP = ObjCreate("microsoft.xmlhttp")
$oHTTP.Open("post","http://121.8.187.110:8181/reg.php?action=adduser",false)
$oHTTP.setRequestHeader("Cache-Control", "no-cache")
$oHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Referer","http://121.8.187.110:8181/reg.php")
$oHTTP.setRequestHeader("Content-Length","115")
$oHTTP.Send("auth="& $name & "password=" & $pass & "password2=" & $pass & "cnid=" & $cnid & "qq=" & $qq & "sing="& $gx & "Submit=%C8%B7%B6%A8%D7%A2%B2%E1")
ShellExecute("http://121.8.187.110:8181/index.php")
EndFunc
|