Compare commits

...

6 Commits

Author SHA1 Message Date
Richard Mwewa
d7980c0726 Delete tmp 2022-04-23 13:33:01 +02:00
Richard Mwewa
f8221d8f58 Update main.py 2022-04-23 13:32:25 +02:00
Richard Mwewa
9d86c4cc7b Update README.md 2022-04-23 13:25:30 +02:00
Richard Mwewa
67db855322 Update banner.py 2022-04-23 13:18:28 +02:00
Richard Mwewa
1b5cfa2ebf Update colors.py 2022-04-23 13:17:37 +02:00
Richard Mwewa
0d2a939388 Update main.py 2022-04-23 13:16:04 +02:00
5 changed files with 83 additions and 36 deletions

View File

@@ -1 +0,0 @@

View File

@@ -1,14 +1,11 @@
![Screenshot_2022-03-17_10-12-53](https://user-images.githubusercontent.com/74001397/158868105-b5aba7e8-7342-4268-bd7a-6d6ae0bdae5a.png)
![OS](https://img.shields.io/badge/OS-GNU%2FLinux-red?style=for-the-badge&logo=Linux)
![OS](https://img.shields.io/badge/OS-Windows-blue?style=for-the-badge&logo=Windows)
![OS](https://img.shields.io/badge/OS-Mac-white?style=for-the-badge&logo=apple)
![GitHub](https://img.shields.io/github/license/rly0nheart/octosuite?style=for-the-badge&logo=github)
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/rly0nheart/octosuite?style=for-the-badge&logo=github)
![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/rly0nheart/octosuite/1.6.0-stable?style=for-the-badge&logo=github)
![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/rly0nheart/octosuite/1.7.0-dev?style=for-the-badge&logo=github)
![GitHub last commit](https://img.shields.io/github/last-commit/rly0nheart/octosuite?style=for-the-badge&logo=github)
![GitHub repo size](https://img.shields.io/github/repo-size/rly0nheart/octosuite?style=for-the-badge&logo=github)
![PyPI - Downloads](https://img.shields.io/pypi/dw/octosuite?style=for-the-badge&logo=pypi)
> *Simply gather OSINT on Github users & organizations like a God🔥*
@@ -29,6 +26,7 @@
- [x] Searches commits
- [x] Easily updates with the 'update' command
- [x] Automatically logs network activity (.logs folder)
- [x] User can view, read and delete log files
# INSTALLATION
## Clone from Github
@@ -119,6 +117,9 @@ octosuite
| ``search:topics`` | *search topics(s)* |
| ``search:issues`` | *search issue(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* |
| ``changelog`` | *show changelog* |
| ``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* ✌🏾🙂
# PYPI
[PyPI](https://pypi.org/project/octosuite)
[PyPI Package](https://pypi.org/project/octosuite)
![PyPI Downloads](https://pepy.tech/badge/octosuite)
# LICENSE
![license](https://user-images.githubusercontent.com/74001397/137917929-2f2cdb0c-4d1d-4e4b-9f0d-e01589e027b5.png)

View File

@@ -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}

View File

@@ -13,19 +13,25 @@ if not colors:
reset = red = white = green = green_bg = white_bg = red_bg = ""
else:
try:
date_time = datetime.now()
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] ")
if color_chooser.lower() == "y":
white = "\033[97m"
white_bg = "\033[47;30m"
red = "\033[91m"
reset = "\033[0m"
green = "\033[92m"
green_bg = "\033[42;37m"
red_bg = "\033[41;37m"
else:
red = white = green = green_bg = white_bg = red_bg = reset = ""
except KeyboardInterrupt:
exit(f"[ ! ] Process interrupted with Ctrl+C")
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")
while True:
try:
color_chooser = input(f"[ ? ] Welcome {os.getlogin()}, would you like to enable colors for this session? (y/n) ")
if color_chooser.lower() == "y":
white = "\033[97m"
white_bg = "\033[47;30m"
red = "\033[91m"
reset = "\033[0m"
green = "\033[92m"
green_bg = "\033[42;37m"
red_bg = "\033[41;37m"
break
elif color_chooser.lower() == "n":
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")

View File

@@ -42,6 +42,9 @@ class octosuite:
('search:topics', self.topic_search),
('search:issues', self.issue_search),
('search:commits', self.commits_search),
('logs:view',self.view_logs),
('logs:read',self.read_log),
('logs:delete',self.delete_log),
('update', self.update),
('changelog', self.changelog),
('info:dev', self.author),
@@ -213,7 +216,7 @@ class octosuite:
subprocess.run(['clear'],shell=False)
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
# If no match is found, we ignore it
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} ')
# Fetching organization info
def org_info(self):
organization = input(f'\n{white}[{white_bg}@Organization{reset}{white}] (username){reset} ')
api = f'https://api.github.com/orgs/{organization}'
@@ -269,8 +272,8 @@ class octosuite:
# Get path contents
def path_contents(self):
username = input(f'\n{white}[{white_bg}@Owner{reset}{white}] (username){reset} ')
repo_name = input(f'{white}[{white_bg}%reponame{reset}{white}]{reset} ')
repo_name = input(f'\n{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} ')
api = f'https://api.github.com/repos/{username}/{repo_name}/contents/{path_name}'
response = requests.get(api)
@@ -284,7 +287,7 @@ class octosuite:
print(f'{white}├─ {self.path_attr_dict[attr]}: {green}{item[attr]}{reset}')
# Fetching organozation repositories
# Fetching organization repositories
def org_repos(self):
organization = input(f'\n{white}[{white_bg}@Organization{reset}{white}] (username){reset} ')
api = f'https://api.github.com/orgs/{organization}/repos?per_page=100'
@@ -421,6 +424,35 @@ class octosuite:
print(f'{white}{number}.{reset}')
pprint(item['commit'])
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
@@ -442,10 +474,13 @@ class octosuite:
# lol yes the changelog is hard coded
changelog_text = f'''
{red_bg}v1.6.0-stable [CHANGELOG]{reset}
Minor improvements and bug fixes
{red_bg} {reset}
'''
{red_bg}v1.7.0-dev [CHANGELOG] {reset}
Changed (y/n) behavior in color chooser (where any input apart from 'y' was considered as 'n')
• 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)
@@ -455,12 +490,14 @@ class octosuite:
for key,value in self.author_dict.items():
print(f'{white}├─ {key}: {green}{value}{reset}')
# Close session
def exit_session(self):
logging.info('Session closed with \'exit\' command.')
exit(f'\n{white}[{green} ! {white}] Session closed with {white_bg}exit{reset}{white} command.{reset}')
# Help/usage
def help(self):
help = f'''
@@ -480,12 +517,14 @@ class octosuite:
search:topics Search topic(s)
search:issues Search issue(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
changelog Show changelog
help Show usage/help
exit Exit session
{red_bg} {reset}
'''
{red_bg} {reset}'''
print(help)