A Curl mock Landing Forum script +cookie method of forgery

Source: Internet
Author: User

A few days ago played a game, the last off with a trick~ (analog submission data)

Think of the previous written a mock landing bupt (old version) of the program (because the first to find the address of login, as well as the need to pass which parameters, Wforum easy to meet my needs):

The idea is to use the Curl analog login once, get cookies, and then use this cookie to access the forum.


Implemented as follows:

<?php/** * @author: Wusuopubupt * @date: 2013-10-29 * @reference: http://v.youku.com/v_show/id_XMjg5ODQ1MzA0.htm
L * bbs.byr.cn Auto Login Script * * * * * * * $url = "http://bbs.byr.cn/wForum/logon.php";

$field _data = "id=yourid&passwd=yourpasswordcookiedate=2";
The Curl Request,get Cookie $ch = Curl_init ($url);

$cookie _jar = Tempnam (".", "Cookie");
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_returntransfer, 1); curl_setopt ($ch, Curlopt_cookiejar, $cookie _jar); Save Cookie curl_setopt ($ch, Curlopt_useragent, "mozilla/5.0" (Windows NT 6.1;
WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/27.0.1453.81 safari/537.36 ");
curl_setopt ($ch, Curlopt_post, 1);
curl_setopt ($ch, Curlopt_postfields, $field _data);
Curl_exec ($h);

Curl_close ();
Second time Curl request, use Formar getted cookie $url = "http://bbs.byr.cn/wForum/index.php";
$ch = Curl_init ($url);
curl_setopt ($ch, Curlopt_url, $url); curl_setopt ($ch, Curlopt_cookiefile, $coOkie_jar);
Use cookie curl_setopt ($ch, Curlopt_returntransfer, 0);
Curl_exec ($ch);

Curl_close ($ch); ?>

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

Next Step:

Look for a way to get rid of cookies directly in the browser to achieve a direct landing.

Update:

Found the method in 3:

1.Developer Tools (ctrl-shift-j or Tools-> Developer tools)-> Console

Input: document.cookie= "Keyofcookie=valueofcookie"


2. In the browser address bar input:

Javascript:void (document.cookie= "Username=wusuopubupt");

Reference: http://openzource.webs.com/javascripthacktutorial.htm


3. Reference (HTTP://SUPERUSER.COM/QUESTIONS/292952/CHROME-COOKIES-FOLDER-IN-WINDOWS-7)

Google Chrome:

Settings > Show Advanced settings > Privacy > Content settings > Cookie > All Cookies and Site Data

Or simply:

Chrome://settings/cookies


Address for storing cookies under WIN7:

C:\Users\Your User name\appdata\local\google\chrome\user data\default\local Storage

Go in and modify it.


4. More powerful tools:

Edit this Cookie, directly to the chrome installed on this plugin, can be very very convenient to change.

Attached: GitHub address: Https://github.com/wusuopubupt/Edit-This-Cookie


5.firefox below:

Cookie Injector


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

Update again:






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.