Telnet using HTTP protocol + Rare form submission + Chat

Source: Internet
Author: User

Telnet Impersonation HTTP Request:

CMD enter after entering: Telnet 127.0.0.1 80 back to the car (if the program does not use, then go to the Control Panel, programs and functions, turn on or off the Windows feature, check the Telnet client can), and then press CTRL +], enter the

-------------------------

GET Request:

GET http://localhost/test.php http/1.1

Host:localhost

Note to have more than one line of space

------------------------

Next is the POST request:

POST http://localhost/test.php http/1.1

Host:localhost

content-type:application/x-www-form-urlencoded

Act=query&name=zzz

--------------------------

File_get_contents Demo Form submission (here is post submission)

<?PHP$postData=Array(        ' Title ' = ' I'm file_get_contents's structure data ', ' content ' = ' I'm file_get_contents's structured data content ', ' publish ' and ' release ',    ); $postData=Http_build_query($postData); $opts=Array(      ' http ' =Array(        ' Method ' = ' POST ', ' header ' = ' host:localhost\r\n '.                  "Content-type:application/x-www-form-urlencoded\r\n". "Content-length:".strlen($postData) . "\ r \ n", ' content ' =$postData,      )    ); $context=stream_context_create($opts); file_get_contents("http://localhost/http/index.php",false,$context);

Fopen Simulation Form Submission

<?PHP$postData=Array(        ' Title ' = ' I'm fopen's structure data ', ' content ' = ' I'm fopen's structured data content ', ' publish ' and ' release ',    ); $postData=Http_build_query($postData); $opts=Array(      ' http ' =Array(        ' Method ' = ' POST ', ' header ' = ' host:localhost\r\n '.                  "Content-type:application/x-www-form-urlencoded\r\n". "Content-length:".strlen($postData) . "\ r \ n", ' content ' =$postData,      )    ); $context=stream_context_create($opts); $fp=fopen("http://localhost/http/index.php", "R",false,$context); $fclose($fp);

Curl mode to simulate form submission

$url= "http://localhost/http/index.php"; $postData=Array(        ' Title ' = ' I'm curl's construction data ', ' content ' = ' I'm curl's structuring data ', ' publish ' + ' release ',    ); //initializing a Curl session    $ch=Curl_init (); //set the appropriate session optionscurl_setopt ($ch, Curlopt_url,$url);//set up submission URLscurl_setopt ($ch, Curlopt_post, 1);//set the Commit method with a value of 1 for positivecurl_setopt ($ch, Curlopt_postfields,$postData);//setting up submission data    $output= curl_setopt ($ch, Curlopt_returntransfer, 1);//returns data as String//execution after successful submissionCurl_exec ($ch); //CloseCurl_close ($ch); Echo $output;

Edit not completed, continuous update in ...

Telnet using HTTP protocol + Rare form submission + Chat

Related Article

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.