-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from NullArray/dev-beta
Dev beta
- Loading branch information
Showing
36 changed files
with
5,976 additions
and
783 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,27 @@ | ||
<!-- | ||
In order for us to properly diagnose and troubleshoot your issue | ||
we will need you to follow this issue template | ||
--> | ||
|
||
# Running information | ||
|
||
<!-- Running detail, OS, arch, did you clone, etc --> | ||
- What branch did you download? | ||
- Clone, or docker run? | ||
- What OS are you running? | ||
|
||
# Exploit module information | ||
|
||
<!-- We will need this information to determine if it is a metasploit issue or not --> | ||
- What exploit was deployed? | ||
- Was a session generated for the target? | ||
- What version of metasploit are you running? | ||
|
||
# Program information | ||
|
||
<!-- Basic python information we will need --> | ||
- Python version number? | ||
- AutoSploit version number? | ||
- Any console output that is relevant to the issue: | ||
- Traceback (error) if any: | ||
|
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
*.pyc | ||
.idea/* | ||
api.p | ||
hosts.txt | ||
hosts.txt | ||
secret.p | ||
uid.p | ||
etc/tokens/* |
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
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
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
development: &pgsql | ||
adapter: postgresql | ||
database: postgres | ||
username: postgres | ||
password: s3cr3t | ||
host: msfdb | ||
port: 5432 | ||
pool: 200 | ||
timeout: 5 | ||
adapter: postgresql | ||
database: postgres | ||
username: postgres | ||
password: s3cr3t | ||
host: msfdb | ||
port: 5432 | ||
pool: 200 | ||
timeout: 5 | ||
|
||
production: &production | ||
<<: *pgsql | ||
production: &production | ||
<<: *pgsql |
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
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
Empty file.
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,44 @@ | ||
import requests | ||
|
||
import lib.settings | ||
from lib.errors import AutoSploitAPIConnectionError | ||
from lib.settings import ( | ||
HOST_FILE, | ||
API_URLS, | ||
write_to_file | ||
) | ||
|
||
|
||
class CensysAPIHook(object): | ||
|
||
""" | ||
Censys API hook | ||
""" | ||
|
||
def __init__(self, identity=None, token=None, query=None, proxy=None, agent=None, **kwargs): | ||
self.id = identity | ||
self.token = token | ||
self.query = query | ||
self.proxy = proxy | ||
self.user_agent = agent | ||
self.host_file = HOST_FILE | ||
|
||
def censys(self): | ||
""" | ||
connect to the Censys API and pull all IP addresses from the provided query | ||
""" | ||
discovered_censys_hosts = set() | ||
try: | ||
lib.settings.start_animation("searching Censys with given query '{}'".format(self.query)) | ||
req = requests.post( | ||
API_URLS["censys"], auth=(self.id, self.token), | ||
json={"query": self.query}, headers=self.user_agent, | ||
proxies=self.proxy | ||
) | ||
json_data = req.json() | ||
for item in json_data["results"]: | ||
discovered_censys_hosts.add(str(item["ip"])) | ||
write_to_file(discovered_censys_hosts, self.host_file) | ||
return True | ||
except Exception as e: | ||
raise AutoSploitAPIConnectionError(str(e)) |
Oops, something went wrong.