Compare commits

...

11 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
Richard Mwewa
52c572f255 Update README.md 2022-04-20 00:40:38 +02:00
Richard Mwewa
eeda47723e Update main.py 2022-04-20 00:32:49 +02:00
Richard Mwewa
1a6e3bb3c9 Update banner.py 2022-04-20 00:28:49 +02:00
Richard Mwewa
82b6a3fd3c Update colors.py 2022-04-20 00:27:55 +02:00
Richard Mwewa
c994678fa1 Update README.md 2022-04-18 14:19:37 +02:00
5 changed files with 89 additions and 41 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-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-Windows-blue?style=for-the-badge&logo=Windows)
![OS](https://img.shields.io/badge/OS-Mac-white?style=for-the-badge&logo=apple) ![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](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 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.5.2-alpha?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 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) ![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🔥* > *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* |
@@ -128,9 +129,12 @@ octosuite
# NOTE # NOTE
* *octosuite automatically logs network and minor user activity. The logs are saved by date and time in .logs folder* * *octosuite automatically logs network and minor user activity. The logs are saved by date and time in .logs folder*
* *Although octosuite was developed to work on **Mac**, **Windows**, or any **Linux** *Distribution*, it has only been tested on **Termux** *and* **Kali Linux*** * *Although octosuite was developed to work on **Mac**, **Windows**, or any **Linux** *Distribution*, it has only been tested on **Termux** *and* **Kali Linux***
* *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)
![PyPI Downloads](https://pepy.tech/badge/octosuite)
# LICENSE # LICENSE
![license](https://user-images.githubusercontent.com/74001397/137917929-2f2cdb0c-4d1d-4e4b-9f0d-e01589e027b5.png) ![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.5.2-alpha{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}

View File

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

View File

@@ -14,6 +14,7 @@
''' '''
import os import os
import sys
import logging import logging
import requests import requests
import platform import platform
@@ -41,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),
@@ -206,13 +210,13 @@ class octosuite:
# Use 'cls' to clear screen on Windows based machines # Use 'cls' to clear screen on Windows based machines
# Otherwise, use 'clear' # Otherwise, use 'clear'
while True: while True:
if platform.system().lower().startswith(('win','darwin')): if sys.platform.lower().startswith(('win','darwin')):
subprocess.run(['cls']) subprocess.run(['cls'])
else: else:
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:
@@ -223,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}'
@@ -268,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)
@@ -283,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'
@@ -422,6 +426,35 @@ class octosuite:
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
def update(self): def update(self):
logging.info('Updating...') logging.info('Updating...')
@@ -441,14 +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.5.2-alpha [CHANGELOG]{reset} {red_bg}v1.7.0-dev [CHANGELOG] {reset}
Users will now get to choose whether to enable colors or not Changed (y/n) behavior in color chooser (where any input apart from 'y' was considered as 'n')
Cleaned code Added 'logs:view' command for viewing octosuite logs
Improved perfomance Added 'logs:read' command for reading a specified log file
Will be ignoring unknown commands instead of printing the error Added 'logs:delete' command for deleting a specified log file
• Major bug fixes • Minor improvements
{red_bg} {reset} {red_bg} {reset}'''
'''
print(changelog_text) print(changelog_text)
@@ -459,11 +491,13 @@ class octosuite:
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'''
@@ -483,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)
@@ -500,7 +536,7 @@ else:
# Creating the .logs directory # Creating the .logs directory
# If the current system is Windows based, we run mkdir command without sudo # If the current system is Windows based, we run mkdir command without sudo
# Else we run the mkdir command with sudo # Else we run the mkdir command with sudo
if platform.system().lower().startswith(('win','darwin')): if sys.platform.lower().startswith(('win','darwin')):
subprocess.run(['mkdir','.logs']) subprocess.run(['mkdir','.logs'])
else: else:
subprocess.run(['sudo','mkdir','.logs'],shell=False) subprocess.run(['sudo','mkdir','.logs'],shell=False)