mirror of
https://github.com/bellingcat/octosuite.git
synced 2026-06-12 05:18:33 +03:00
Compare commits
6 Commits
1.6.0-stab
...
1.7.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7980c0726 | ||
|
|
f8221d8f58 | ||
|
|
9d86c4cc7b | ||
|
|
67db855322 | ||
|
|
1b5cfa2ebf | ||
|
|
0d2a939388 |
13
README.md
13
README.md
@@ -1,14 +1,11 @@
|
|||||||

|
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|
|
||||||
|
|
||||||
> *Simply gather OSINT on Github users & organizations like a God🔥*
|
> *Simply gather OSINT on Github users & organizations like a God🔥*
|
||||||
|
|
||||||
@@ -29,6 +26,7 @@
|
|||||||
- [x] Searches commits
|
- [x] Searches commits
|
||||||
- [x] Easily updates with the 'update' command
|
- [x] Easily updates with the 'update' command
|
||||||
- [x] Automatically logs network activity (.logs folder)
|
- [x] Automatically logs network activity (.logs folder)
|
||||||
|
- [x] User can view, read and delete log files
|
||||||
|
|
||||||
# INSTALLATION
|
# INSTALLATION
|
||||||
## Clone from Github
|
## Clone from Github
|
||||||
@@ -119,6 +117,9 @@ octosuite
|
|||||||
| ``search:topics`` | *search topics(s)* |
|
| ``search:topics`` | *search topics(s)* |
|
||||||
| ``search:issues`` | *search issue(s)* |
|
| ``search:issues`` | *search issue(s)* |
|
||||||
| ``search:commits`` | *search commit(s)* |
|
| ``search:commits`` | *search commit(s)* |
|
||||||
|
| ``logs:view`` | *view octosuite log files* |
|
||||||
|
| ``logs:read`` | *read a specified log file* |
|
||||||
|
| ``logs:delete`` | *delete a specified log file* |
|
||||||
| ``update`` | *update octosuite* |
|
| ``update`` | *update octosuite* |
|
||||||
| ``changelog`` | *show changelog* |
|
| ``changelog`` | *show changelog* |
|
||||||
| ``help`` | *show usage/help* |
|
| ``help`` | *show usage/help* |
|
||||||
@@ -131,7 +132,9 @@ octosuite
|
|||||||
* *If you believe octosuite can be better, feel free to open a pull request with your improvements* ✌🏾🙂
|
* *If you believe octosuite can be better, feel free to open a pull request with your improvements* ✌🏾🙂
|
||||||
|
|
||||||
# PYPI
|
# PYPI
|
||||||
[PyPI](https://pypi.org/project/octosuite)
|
[PyPI Package](https://pypi.org/project/octosuite)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
# LICENSE
|
# LICENSE
|
||||||

|

|
||||||
|
|||||||
@@ -8,7 +8,7 @@ banner = f'''{red}
|
|||||||
░ ████▓▒░▒ ▓███▀ ░ ▒██▒ ░ ░ ████▓▒░▒██████▒▒▒█████▓ ░██░ ▒██▒ ░ ░▒████▒
|
░ ████▓▒░▒ ▓███▀ ░ ▒██▒ ░ ░ ████▓▒░▒██████▒▒▒█████▓ ░██░ ▒██▒ ░ ░▒████▒
|
||||||
░ ▒░▒░▒░ ░ ░▒ ▒ ░ ▒ ░░ ░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░░▒▓▒ ▒ ▒ ░▓ ▒ ░░ ░░ ▒░ ░
|
░ ▒░▒░▒░ ░ ░▒ ▒ ░ ▒ ░░ ░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░░▒▓▒ ▒ ▒ ░▓ ▒ ░░ ░░ ▒░ ░
|
||||||
░ ▒ ▒░ ░ ▒ ░ ░ ▒ ▒░ ░ ░▒ ░ ░░░▒░ ░ ░ ▒ ░ ░ ░ ░ ░
|
░ ▒ ▒░ ░ ▒ ░ ░ ▒ ▒░ ░ ░▒ ░ ░░░▒░ ░ ░ ▒ ░ ░ ░ ░ ░
|
||||||
░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░░░ ░ ░ ▒ {red_bg}v1.6.0-stable{reset}{red}
|
░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░░░ ░ ░ ▒ {red_bg}v1.7.0-dev{reset}{red}
|
||||||
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
|
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
|
||||||
░ {white}— Advanced Github {red}OSINT{white} Framework{reset}
|
░ {white}— Advanced Github {red}OSINT{white} Framework{reset}
|
||||||
|
|
||||||
|
|||||||
@@ -13,19 +13,25 @@ if not colors:
|
|||||||
reset = red = white = green = green_bg = white_bg = red_bg = ""
|
reset = red = white = green = green_bg = white_bg = red_bg = ""
|
||||||
|
|
||||||
else:
|
else:
|
||||||
try:
|
date_time = datetime.now()
|
||||||
date_time = datetime.now()
|
print(f"\n\t OCTOSUITE © 2022 Richard Mwewa\n\t{date_time.strftime('%A %d %B %Y, %H:%M:%S%p')}\n\n\nOS: {platform.system()}\nProcessor: {platform.processor()}\nNode: {platform.node()}\nRelease: {platform.release()}\nArchitecture: {platform.architecture()}\nVersion: {platform.version()}\n\n")
|
||||||
color_chooser = input(f"\t\t[OCTOSUITE] © 2022\n\t{date_time.strftime('%A %d %B %Y, %H:%M:%S%p')}\n\n\nOS: {platform.system()}\nProcessor: {platform.processor()}\nNode: {platform.node()}\nRelease: {platform.release()}\nArchitecture: {platform.architecture()}\nVersion: {platform.version()}\n\n[ ? ] Welcome {os.getlogin()}, would you like to enable colors for this session? [Y/n] ")
|
while True:
|
||||||
if color_chooser.lower() == "y":
|
try:
|
||||||
white = "\033[97m"
|
color_chooser = input(f"[ ? ] Welcome {os.getlogin()}, would you like to enable colors for this session? (y/n) ")
|
||||||
white_bg = "\033[47;30m"
|
if color_chooser.lower() == "y":
|
||||||
red = "\033[91m"
|
white = "\033[97m"
|
||||||
reset = "\033[0m"
|
white_bg = "\033[47;30m"
|
||||||
green = "\033[92m"
|
red = "\033[91m"
|
||||||
green_bg = "\033[42;37m"
|
reset = "\033[0m"
|
||||||
red_bg = "\033[41;37m"
|
green = "\033[92m"
|
||||||
else:
|
green_bg = "\033[42;37m"
|
||||||
red = white = green = green_bg = white_bg = red_bg = reset = ""
|
red_bg = "\033[41;37m"
|
||||||
|
break
|
||||||
except KeyboardInterrupt:
|
elif color_chooser.lower() == "n":
|
||||||
exit(f"[ ! ] Process interrupted with Ctrl+C")
|
red = white = green = green_bg = white_bg = red_bg = reset = ""
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
print(f"\n[ ! ] Your response ({color_chooser}) is invalid (expected y or n)")
|
||||||
|
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
exit(f"[ ! ] Process interrupted with Ctrl+C")
|
||||||
|
|||||||
65
src/main.py
65
src/main.py
@@ -42,6 +42,9 @@ class octosuite:
|
|||||||
('search:topics', self.topic_search),
|
('search:topics', self.topic_search),
|
||||||
('search:issues', self.issue_search),
|
('search:issues', self.issue_search),
|
||||||
('search:commits', self.commits_search),
|
('search:commits', self.commits_search),
|
||||||
|
('logs:view',self.view_logs),
|
||||||
|
('logs:read',self.read_log),
|
||||||
|
('logs:delete',self.delete_log),
|
||||||
('update', self.update),
|
('update', self.update),
|
||||||
('changelog', self.changelog),
|
('changelog', self.changelog),
|
||||||
('info:dev', self.author),
|
('info:dev', self.author),
|
||||||
@@ -213,7 +216,7 @@ class octosuite:
|
|||||||
subprocess.run(['clear'],shell=False)
|
subprocess.run(['clear'],shell=False)
|
||||||
|
|
||||||
print(banner)
|
print(banner)
|
||||||
command_input = input(f'''{white}┌───({red}{os.getlogin()}{white}@{red}octosuite{white})-[{green}{os.getcwd()}{white}]\n└─╼[{green}:~{white}]{reset} ''')
|
command_input = input(f'''{white}┌──({red}{os.getlogin()}{white}@{red}octosuite{white})-[{green}{os.getcwd()}{white}]\n└╼[{green}:~{white}]{reset} ''')
|
||||||
# Looping through the commands base to check if the user input command matches any command in the commands base, and return its functionality
|
# Looping through the commands base to check if the user input command matches any command in the commands base, and return its functionality
|
||||||
# If no match is found, we ignore it
|
# If no match is found, we ignore it
|
||||||
for command, functionality in self.commands_base:
|
for command, functionality in self.commands_base:
|
||||||
@@ -224,7 +227,7 @@ class octosuite:
|
|||||||
|
|
||||||
input(f'\n{white}[{green} ? {white}] Press {white_bg}any key{reset}{white} to continue{reset} ')
|
input(f'\n{white}[{green} ? {white}] Press {white_bg}any key{reset}{white} to continue{reset} ')
|
||||||
|
|
||||||
|
# Fetching organization info
|
||||||
def org_info(self):
|
def org_info(self):
|
||||||
organization = input(f'\n{white}[{white_bg}@Organization{reset}{white}] (username){reset} ')
|
organization = input(f'\n{white}[{white_bg}@Organization{reset}{white}] (username){reset} ')
|
||||||
api = f'https://api.github.com/orgs/{organization}'
|
api = f'https://api.github.com/orgs/{organization}'
|
||||||
@@ -269,8 +272,8 @@ class octosuite:
|
|||||||
|
|
||||||
# Get path contents
|
# Get path contents
|
||||||
def path_contents(self):
|
def path_contents(self):
|
||||||
username = input(f'\n{white}[{white_bg}@Owner{reset}{white}] (username){reset} ')
|
repo_name = input(f'\n{white}[{white_bg}%reponame{reset}{white}]{reset} ')
|
||||||
repo_name = input(f'{white}[{white_bg}%reponame{reset}{white}]{reset} ')
|
username = input(f'{white}[{white_bg}@Owner{reset}{white}] (username){reset} ')
|
||||||
path_name = input(f'{white}[{white_bg}/path/name{reset}{white}]{reset} ')
|
path_name = input(f'{white}[{white_bg}/path/name{reset}{white}]{reset} ')
|
||||||
api = f'https://api.github.com/repos/{username}/{repo_name}/contents/{path_name}'
|
api = f'https://api.github.com/repos/{username}/{repo_name}/contents/{path_name}'
|
||||||
response = requests.get(api)
|
response = requests.get(api)
|
||||||
@@ -284,7 +287,7 @@ class octosuite:
|
|||||||
print(f'{white}├─ {self.path_attr_dict[attr]}: {green}{item[attr]}{reset}')
|
print(f'{white}├─ {self.path_attr_dict[attr]}: {green}{item[attr]}{reset}')
|
||||||
|
|
||||||
|
|
||||||
# Fetching organozation repositories
|
# Fetching organization repositories
|
||||||
def org_repos(self):
|
def org_repos(self):
|
||||||
organization = input(f'\n{white}[{white_bg}@Organization{reset}{white}] (username){reset} ')
|
organization = input(f'\n{white}[{white_bg}@Organization{reset}{white}] (username){reset} ')
|
||||||
api = f'https://api.github.com/orgs/{organization}/repos?per_page=100'
|
api = f'https://api.github.com/orgs/{organization}/repos?per_page=100'
|
||||||
@@ -421,6 +424,35 @@ class octosuite:
|
|||||||
print(f'{white}{number}.{reset}')
|
print(f'{white}{number}.{reset}')
|
||||||
pprint(item['commit'])
|
pprint(item['commit'])
|
||||||
print('\n')
|
print('\n')
|
||||||
|
|
||||||
|
|
||||||
|
# View octosuite log files
|
||||||
|
def view_logs(self):
|
||||||
|
logs = os.listdir('.logs')
|
||||||
|
print(f"\n {red_bg}[LOG] [SIZE] {reset}")
|
||||||
|
for log in logs:
|
||||||
|
print(f" {log}\t ",os.path.getsize(".logs/"+log),"bytes")
|
||||||
|
print(f" {red_bg} {reset}")
|
||||||
|
|
||||||
|
|
||||||
|
# Delete a specified log file
|
||||||
|
def delete_log(self):
|
||||||
|
log_file = input(f"\n{white}[{white_bg}logfile{reset}{white}]{reset} ")
|
||||||
|
if sys.platform.lower().startswith(('win','darwin')):
|
||||||
|
subprocess.run(['del',f'{os.getcwd()}/.logs/{log_file}'])
|
||||||
|
else:
|
||||||
|
subprocess.run(['sudo','rm',f'.logs/{log_file}'],shell=False)
|
||||||
|
|
||||||
|
logging.info(f'Deleted log file: {log_file}')
|
||||||
|
print(f"{white}[{green} + {white}] Deleted log file: {green}{log_file}{reset}")
|
||||||
|
|
||||||
|
|
||||||
|
# Read a specified log file
|
||||||
|
def read_log(self):
|
||||||
|
log_file = input(f"\n{white}[{white_bg}logfile{reset}{white}]{reset} ")
|
||||||
|
with open(f'.logs/{log_file}', 'r') as log:
|
||||||
|
logging.info(f'Reading log file: {log_file}')
|
||||||
|
print("\n"+log.read())
|
||||||
|
|
||||||
|
|
||||||
# Update program
|
# Update program
|
||||||
@@ -442,10 +474,13 @@ class octosuite:
|
|||||||
# lol yes the changelog is hard coded
|
# lol yes the changelog is hard coded
|
||||||
changelog_text = f'''
|
changelog_text = f'''
|
||||||
|
|
||||||
{red_bg}v1.6.0-stable [CHANGELOG]{reset}
|
{red_bg}v1.7.0-dev [CHANGELOG] {reset}
|
||||||
• Minor improvements and bug fixes
|
• Changed (y/n) behavior in color chooser (where any input apart from 'y' was considered as 'n')
|
||||||
{red_bg} {reset}
|
• Added 'logs:view' command for viewing octosuite logs
|
||||||
'''
|
• Added 'logs:read' command for reading a specified log file
|
||||||
|
• Added 'logs:delete' command for deleting a specified log file
|
||||||
|
• Minor improvements
|
||||||
|
{red_bg} {reset}'''
|
||||||
print(changelog_text)
|
print(changelog_text)
|
||||||
|
|
||||||
|
|
||||||
@@ -455,12 +490,14 @@ class octosuite:
|
|||||||
for key,value in self.author_dict.items():
|
for key,value in self.author_dict.items():
|
||||||
print(f'{white}├─ {key}: {green}{value}{reset}')
|
print(f'{white}├─ {key}: {green}{value}{reset}')
|
||||||
|
|
||||||
|
|
||||||
|
# Close session
|
||||||
def exit_session(self):
|
def exit_session(self):
|
||||||
logging.info('Session closed with \'exit\' command.')
|
logging.info('Session closed with \'exit\' command.')
|
||||||
exit(f'\n{white}[{green} ! {white}] Session closed with {white_bg}exit{reset}{white} command.{reset}')
|
exit(f'\n{white}[{green} ! {white}] Session closed with {white_bg}exit{reset}{white} command.{reset}')
|
||||||
|
|
||||||
|
|
||||||
|
# Help/usage
|
||||||
def help(self):
|
def help(self):
|
||||||
help = f'''
|
help = f'''
|
||||||
|
|
||||||
@@ -480,12 +517,14 @@ class octosuite:
|
|||||||
search:topics Search topic(s)
|
search:topics Search topic(s)
|
||||||
search:issues Search issue(s)
|
search:issues Search issue(s)
|
||||||
search:commits Search commit(s)
|
search:commits Search commit(s)
|
||||||
|
logs:view View log files
|
||||||
|
logs:read Read a specified log file
|
||||||
|
logs:delete Delete a specified log file
|
||||||
update Update octosuite
|
update Update octosuite
|
||||||
changelog Show changelog
|
changelog Show changelog
|
||||||
help Show usage/help
|
help Show usage/help
|
||||||
exit Exit session
|
exit Exit session
|
||||||
{red_bg} {reset}
|
{red_bg} {reset}'''
|
||||||
'''
|
|
||||||
print(help)
|
print(help)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user