forked from Cl0udG0d/SZhe_Scan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspringboot_api.py
33 lines (27 loc) · 924 Bytes
/
springboot_api.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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
name: spring boot 路径泄露
referer: http://blog.csdn.net/u011687186/article/details/73457498
author: Lucifer
description: SpringBoot默认API会暴露出敏感接口
'''
import sys
import requests
class springboot_api_BaseVerify:
def __init__(self, url):
self.url = url
def run(self):
payload = "/mappings"
vulnurl = self.url + payload
try:
req = requests.get(vulnurl, timeout=10, verify=False)
if "resourceHandlerMapping" in req.text and r"springframework.boot.actuate" in req.text:
return True,vulnurl,"spring boot 路径泄露",payload,req.text
else:
return False, None, None, None, None
except:
return False, None, None, None, None
if __name__ == "__main__":
testVuln = springboot_api_BaseVerify(sys.argv[1])
testVuln.run()