Using Snoopy to impersonate a login-Login failed-multi-domain Jump workaround

Source: Internet
Author: User
Log on with Snoopy-Login failed-multi-domain jump
The code is as follows:

Require_once ("Snoopy.class.php");
$snoopy = new Snoopy;
$snoopy->agent = "mozilla/5.0 (Windows NT 6.1; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/38.0.2125.122 safari/537.36 SE 2.X METASR 1.0 ";
$snoopy->referer = "http://agent.fang.com/";
$snoopy->rawheaders["Pragma"] = "No-cache";
$snoopy->maxredirs = number of 2;//redirects
$snoopy->offsiteok = false;
$snoopy->user = "esf-agen42249";
$snoopy->pass = "dlesf2010";
$submit _url = "http://agent.fang.com/DealLoginAjax.aspx";
$submit _vars["str_username"] = "esf-agen42249";
$submit _vars["str_userpwd"] = "dlesf2010";
$submit _vars["Str_imgcode"] = "Please enter the verification code";
$snoopy->submit ($submit _url, $submit _vars);
$snoopy->setcookies ();
if ($snoopy->fetch ("http://b.agent.fang.com/magent/HomePage.aspx")) {
Print_r ($snoopy->headers);
Print_r ($snoopy->cookies);
Echo (" ");
Print_r ($snoopy->results);//Unable to get login to see the page
}else
echo "Error:" $snoopy->error. " \ n ";
?>


Ask the big God to point out, as if the login failed to get the main interface after login
------to solve the idea----------------------
You can't read a document without playing. Don't play at least you should look at the HTTP request data first?

Normal login, see HTTP data transfer:
Remote address:111.40.195.21:80
Request url:http://agent.fang.com/dealloginajax.aspx?str_username=esf-agen42249&str_userpwd= 571c041891354cc5b51725f0b37170f80efb4f27ba8c897e4ff67ebe17b4ce599f28ac5f7eceeb5ff2d9755c62a57db74f206d3c52ccb79b71c24e385 8f29ac7d49dfb8d77192529ac387b4e9c6426ecf70f3003ce348dcd6bd4d1af84e9293164516745c654d2c9bc0089c80f02ba5f69aeaac1e142c8af8e 000ac7b1a4a278&str_imgcode=%e8%af%b7%e8%be%93%e5%85%a5%e9%aa%8c%e8%af%81%e7%a0%81
Request Method:get
Status code:200 OK



Str_username=esf-agen42249&str_userpwd= 571c041891354cc5b51725f0b37170f80efb4f27ba8c897e4ff67ebe17b4ce599f28ac5f7eceeb5ff2d9755c62a57db74f206d3c52ccb79b71c24e385 8f29ac7d49dfb8d77192529ac387b4e9c6426ecf70f3003ce348dcd6bd4d1af84e9293164516745c654d2c9bc0089c80f02ba5f69aeaac1e142c8af8e 000ac7b1a4a278&str_imgcode=%e8%af%b7%e8%be%93%e5%85%a5%e9%aa%8c%e8%af%81%e7%a0%81



Did you see it clearly? Get landed?
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.