Compare commits

..

159 Commits

Author SHA1 Message Date
Richard Mwewa
79a97a7883 Update setup.py 2023-01-22 02:48:11 +02:00
Richard Mwewa
ac6ebc6d72 Update octosuite.py 2023-01-22 02:45:05 +02:00
Richard Mwewa
a12210cfa2 Fixed bug in octosuite.py 2023-01-22 01:17:50 +02:00
Richard Mwewa
47e0b4c64a Update banner.py 2023-01-16 21:02:30 +02:00
Richard Mwewa
c4847773a0 Update setup.py 2023-01-16 21:01:19 +02:00
Richard Mwewa
832e887302 Update main.py 2023-01-16 21:00:46 +02:00
Richard Mwewa
8487898f93 Merge pull request #8 from bellingcat/dev
Update octosuite.py
2023-01-02 22:32:13 +02:00
Richard Mwewa
4d8b7394f0 Update README.md 2023-01-02 00:18:47 +02:00
Richard Mwewa
e925c9cb8a Update README.md 2023-01-02 00:07:39 +02:00
Richard Mwewa
dd2edfd204 Update octosuite.py 2023-01-01 03:12:57 +02:00
Richard Mwewa
13efce4f9c Update octosuite.py 2022-12-31 23:43:28 +02:00
Richard Mwewa
928ba6580f Update octosuite.py 2022-12-31 23:42:21 +02:00
Richard Mwewa
457c2a5472 Update config.py 2022-12-31 21:17:22 +02:00
Richard Mwewa
c6c037247f Merge pull request #7 from bellingcat/dev
Dev
2022-12-31 21:16:02 +02:00
Richard Mwewa
f84fcf0d35 Merge branch 'master' into dev 2022-12-31 21:01:43 +02:00
Richard Mwewa
8424c94bec Update Dockerfile 2022-12-31 14:56:16 +02:00
Richard Mwewa
a14b356b18 Update config.py 2022-12-31 14:52:02 +02:00
Richard Mwewa
f60f088f05 Update log_roller.py 2022-12-31 14:50:37 +02:00
Richard Mwewa
c2a5dc89ea Update main.py 2022-12-31 14:49:26 +02:00
Richard Mwewa
6a7b61b1f2 Update octosuite.py 2022-12-31 14:47:48 +02:00
Richard Mwewa
4427f30f77 Update config.py 2022-12-27 19:12:14 +02:00
Richard Mwewa
9982727de1 Update config.py 2022-12-25 03:27:55 +02:00
Richard Mwewa
866621db18 Update octosuite.py 2022-12-25 03:25:43 +02:00
Richard Mwewa
48b86cb2d0 Update octosuite.py 2022-12-25 03:12:12 +02:00
Richard Mwewa
96b10f0bf9 Update main.py 2022-12-25 03:09:29 +02:00
Richard Mwewa
53ccc9899b Update main.py 2022-12-25 03:02:42 +02:00
Richard Mwewa
bb82427abe Update csv_loggers.py 2022-12-25 02:58:05 +02:00
Richard Mwewa
ee4af7d266 Update octosuite.py 2022-12-25 02:51:56 +02:00
Richard Mwewa
3bd6af4f28 Update message_prefixes.py 2022-12-25 02:50:59 +02:00
Richard Mwewa
7531aa4f02 Update main.py 2022-12-25 02:50:36 +02:00
Richard Mwewa
f9d56c51a0 Update helper.py 2022-12-25 02:49:52 +02:00
Richard Mwewa
5bff3ccc12 Update csv_loggers.py 2022-12-25 02:49:07 +02:00
Richard Mwewa
272fcc36ed Update config.py 2022-12-25 02:48:39 +02:00
Richard Mwewa
64c1063ea5 Update banner.py 2022-12-25 02:48:15 +02:00
Richard Mwewa
4c7109f4f0 Update log_roller.py 2022-12-25 02:47:48 +02:00
Richard Mwewa
d907167713 Update csv_loggers.py 2022-12-25 02:46:18 +02:00
Richard Mwewa
9eec2e323d Update log_roller.py 2022-12-25 02:33:43 +02:00
Richard Mwewa
ead76074f5 Update message_prefixes.py 2022-12-25 02:33:22 +02:00
Richard Mwewa
e87560939f Update main.py 2022-12-25 02:32:28 +02:00
Richard Mwewa
3f1191758b Update octosuite.py 2022-12-25 02:31:24 +02:00
Richard Mwewa
34c7cd3918 Update message_prefixes.py 2022-12-24 12:46:47 +02:00
Richard Mwewa
52c4101a7a Update README.md 2022-12-24 12:45:55 +02:00
Richard Mwewa
0677b901f7 Update config.py 2022-12-23 19:41:32 +02:00
Richard Mwewa
49215fd03e Update main.py 2022-12-23 19:36:29 +02:00
Richard Mwewa
8fc14d3ec4 Update main.py 2022-12-23 19:34:44 +02:00
Richard Mwewa
3da2b91fb2 Update config.py 2022-12-23 19:33:59 +02:00
Richard Mwewa
b6908a19f4 Update octosuite.py 2022-12-23 19:33:26 +02:00
Richard Mwewa
4db8300e2c Update log_roller.py 2022-12-23 19:31:43 +02:00
Richard Mwewa
07ca8c486c Update octosuite.py 2022-12-23 19:30:11 +02:00
Richard Mwewa
9473b0278d Update config.py 2022-12-23 18:14:21 +02:00
Richard Mwewa
4113c62d09 Update config.py 2022-12-23 18:10:43 +02:00
Richard Mwewa
f235bc1186 Update main.py 2022-12-23 17:35:10 +02:00
Richard Mwewa
4d0e7beea7 Update octosuite.py 2022-12-23 17:21:53 +02:00
Richard Mwewa
7b1fd3addc Update helper.py 2022-12-23 17:17:18 +02:00
Richard Mwewa
3968f53e98 Update octosuite.py 2022-12-23 16:59:35 +02:00
Richard Mwewa
bd9c1f210f Update helper.py 2022-12-23 16:53:21 +02:00
Richard Mwewa
0518f33571 Update main.py 2022-12-23 16:52:46 +02:00
Richard Mwewa
c783a717a0 Update octosuite.py 2022-12-23 16:29:17 +02:00
Richard Mwewa
ea3b8bcd71 Update octosuite.py 2022-12-23 16:08:46 +02:00
Richard Mwewa
cdf04fe443 Update octosuite.py 2022-12-23 15:10:01 +02:00
Richard Mwewa
f3b90f2e6d Update octosuite.py 2022-12-23 14:07:12 +02:00
Richard Mwewa
bf77bc4dfe Update config.py 2022-12-23 13:59:45 +02:00
Richard Mwewa
157cb68142 Update message_prefixes.py 2022-12-23 12:18:37 +02:00
Richard Mwewa
53433c119b Update helper.py 2022-12-23 12:18:17 +02:00
Richard Mwewa
5d41e07bc2 Update main.py 2022-12-23 12:17:48 +02:00
Richard Mwewa
331c81ac46 Update and rename banners.py to banner.py 2022-12-23 12:16:39 +02:00
Richard Mwewa
e3c151e2d3 Update and rename colors.py to config.py 2022-12-23 12:03:53 +02:00
Richard Mwewa
a89596efc2 Update octosuite.py 2022-12-12 15:00:56 +02:00
Richard Mwewa
283a92fa84 Update octosuite.py 2022-12-12 14:57:36 +02:00
Richard Mwewa
beb8d561f8 Update main.py 2022-12-09 23:40:18 +02:00
Richard Mwewa
b68842df1c Update octosuite.py 2022-12-09 23:38:36 +02:00
Richard Mwewa
dd7fcc455d Update Octosuite 2022-12-05 21:03:15 +02:00
Richard Mwewa
b3ae15a062 Update Dockerfile 2022-12-02 23:15:26 +02:00
Richard Mwewa
4c8d3626b3 Update octosuite.py 2022-12-01 20:12:52 +02:00
Richard Mwewa
1f86ad4034 Update octosuite.py 2022-12-01 19:36:59 +02:00
Richard Mwewa
e151f81d76 Update Dockerfile
Added docker commands to build Octosuite's wheel file with the python build library
2022-12-01 03:18:36 +02:00
Richard Mwewa
a69fbf33d9 Update Dockerfile 2022-12-01 03:13:33 +02:00
Richard Mwewa
227fcd0482 Update octosuite.py 2022-12-01 03:10:42 +02:00
Richard Mwewa
8d04112d32 Update octosuite.py 2022-12-01 03:08:14 +02:00
Richard Mwewa
66373fd96e Update Octosuite 2022-11-30 21:49:56 +02:00
Richard Mwewa
c4f1940bb6 Update octosuite.py 2022-11-30 21:19:34 +02:00
Richard Mwewa
f79813ed45 Update octosuite.py 2022-11-30 02:55:17 +02:00
Richard Mwewa
ffd162d881 Update main.py 2022-11-30 02:42:53 +02:00
Richard Mwewa
558715fdab Update octosuite 2022-11-30 02:37:07 +02:00
Richard Mwewa
9984c71a57 Update csv_loggers.py 2022-11-25 03:38:09 +02:00
Richard Mwewa
bb2efb903b Update banners.py 2022-11-25 03:32:56 +02:00
Richard Mwewa
defe1b1159 Update banners.py 2022-11-25 03:32:03 +02:00
Richard Mwewa
347acea797 Update banners.py 2022-11-25 03:29:19 +02:00
Richard Mwewa
46937abb7e Update octosuite.py 2022-11-25 03:26:14 +02:00
Richard Mwewa
2963db3608 Update helper.py 2022-11-25 03:23:07 +02:00
Richard Mwewa
92d4f3f9f2 Update colors.py 2022-11-25 03:18:29 +02:00
Richard Mwewa
02df05df39 Update colors.py 2022-11-25 03:16:30 +02:00
Richard Mwewa
549f1940f9 Merge pull request #6 from bellingcat/dev
Dev
2022-11-25 02:58:30 +02:00
Richard Mwewa
e936525f81 Merge branch 'master' into dev 2022-11-25 02:53:10 +02:00
Richard Mwewa
29eb2bde95 Update octosuite.py 2022-11-25 02:52:22 +02:00
Richard Mwewa
d27d9b9168 Update and rename sign_vars.py to message_prefixes.py 2022-11-25 02:50:59 +02:00
Richard Mwewa
a6ca1e3c0c Update main.py 2022-11-25 02:50:09 +02:00
Richard Mwewa
5bf7ef3f39 Update colors.py 2022-11-25 02:48:52 +02:00
Richard Mwewa
ae73fdffde Update banners.py 2022-11-25 02:48:23 +02:00
Richard Mwewa
7c8fea02e6 Update setup.py 2022-11-25 02:46:24 +02:00
Richard Mwewa
40fffcab73 Update colors.py 2022-11-25 02:37:18 +02:00
Richard Mwewa
9a6127d6bc Update colors.py 2022-11-25 02:35:37 +02:00
Richard Mwewa
eb724f629f Update banners.py 2022-11-25 02:33:59 +02:00
Richard Mwewa
6d04b990db Update setup.py 2022-11-25 02:31:11 +02:00
Richard Mwewa
2537bcbab8 Update message_prefixes.py 2022-11-25 02:29:04 +02:00
Richard Mwewa
bb6c5a09e9 Update octosuite.py 2022-11-25 02:26:24 +02:00
Richard Mwewa
083d3e9f71 Update octosuite.py 2022-11-25 02:16:44 +02:00
Richard Mwewa
497c855648 Update main.py 2022-11-25 02:08:40 +02:00
Richard Mwewa
c2641b3134 Update main.py 2022-11-25 02:07:40 +02:00
Richard Mwewa
a108b4784e Update main.py 2022-11-25 02:05:44 +02:00
Richard Mwewa
597ad07490 Update octosuite.py 2022-11-25 02:04:54 +02:00
Richard Mwewa
94c1e0a737 Update and rename sign_vars.py to message_prefixes.py 2022-11-25 01:59:04 +02:00
Richard Mwewa
6e83bcf367 Update log_roller.py 2022-11-25 01:58:13 +02:00
Richard Mwewa
a57f5d47e2 Update csv_loggers.py 2022-11-25 01:55:29 +02:00
Richard Mwewa
3fa3e7a182 Update banners.py 2022-11-25 01:54:25 +02:00
Richard Mwewa
d42b7af59f Update colors.py 2022-11-25 01:53:51 +02:00
Richard Mwewa
8d337c621c Update setup.py 2022-11-25 01:52:26 +02:00
Richard Mwewa
5842a13975 Update setup.py 2022-11-25 01:51:30 +02:00
Richard Mwewa
e739f78eb9 Update main.py 2022-11-25 01:49:46 +02:00
Richard Mwewa
26cf25bf91 Update log_roller.py 2022-11-25 01:48:55 +02:00
Richard Mwewa
ad6959d1b9 Update csv_loggers.py 2022-11-25 01:47:53 +02:00
Richard Mwewa
d7af8602fe Update octosuite.py 2022-11-25 01:46:42 +02:00
Richard Mwewa
29d40ec27e Update octosuite.py 2022-11-25 01:40:00 +02:00
Richard Mwewa
6a0953401b Update banners.py 2022-11-25 01:38:52 +02:00
Richard Mwewa
e87e5c64c8 Update colors.py 2022-11-25 01:31:05 +02:00
Richard Mwewa
c53ab2a00b Update colors.py 2022-11-25 01:30:48 +02:00
Richard Mwewa
b30ad16719 Update colors.py 2022-11-25 01:30:27 +02:00
Richard Mwewa
cfa032f7cb Update colors.py 2022-11-24 23:29:51 +02:00
Richard Mwewa
87f287bfb9 Update colors.py 2022-11-24 23:25:41 +02:00
Richard Mwewa
ab70a10d19 Update csv_loggers.py 2022-11-24 23:10:25 +02:00
Richard Mwewa
02e19baa93 Update csv_loggers.py 2022-11-24 22:40:17 +02:00
Richard Mwewa
0b76846968 Update csv_loggers.py 2022-11-24 22:39:44 +02:00
Richard Mwewa
9614785455 Update colors.py 2022-11-24 22:22:31 +02:00
Richard Mwewa
6ae34437a4 Update banners.py 2022-11-24 22:10:49 +02:00
Richard Mwewa
5a1b5378ee Update setup.py 2022-11-24 22:09:11 +02:00
Richard Mwewa
64d1b6bf38 Update helper.py 2022-11-23 17:32:37 +02:00
Richard Mwewa
09fffdf192 Update helper.py 2022-11-21 18:26:31 +02:00
Richard Mwewa
8e4520b6d2 Update helper.py 2022-11-21 17:43:35 +02:00
Richard Mwewa
420186bec4 Update helper.py 2022-11-20 17:55:10 +02:00
Richard Mwewa
758676ac88 Update octosuite.py 2022-11-20 16:12:04 +02:00
Richard Mwewa
310b1fb702 Update octosuite.py 2022-11-20 16:11:08 +02:00
Richard Mwewa
6822806a77 Renamed banner.py to banners.py 2022-11-20 16:08:36 +02:00
Richard Mwewa
4eddd20480 Update octosuite.py 2022-11-20 15:29:43 +02:00
Richard Mwewa
95dcfbea6e Update helper.py 2022-11-20 15:27:01 +02:00
Richard Mwewa
258be0a2d7 Update octosuite.py 2022-11-20 15:24:14 +02:00
Richard Mwewa
3b329d039a Update octosuite.py 2022-11-20 15:16:00 +02:00
Richard Mwewa
fec88ac343 Update banner.py 2022-11-20 15:14:29 +02:00
Richard Mwewa
272cd49d0e Update octosuite.py 2022-11-20 15:09:17 +02:00
Richard Mwewa
cea07f187a Merge pull request #4 from 0xbharath/master
Added Dockerfile
2022-10-24 17:07:05 +02:00
Bharath
0f96785123 Added Dockerfile 2022-10-24 17:52:55 +05:30
Richard Mwewa
000eb80fbc Update setup.py 2022-10-21 21:55:32 +02:00
Richard Mwewa
e4f1e2928a Update octosuite.py 2022-10-21 21:54:02 +02:00
Richard Mwewa
73fa406e82 Update setup.py 2022-10-21 01:33:50 +02:00
Richard Mwewa
e99e0c317e Update banner.py 2022-10-21 01:30:31 +02:00
Richard Mwewa
7d2eada3f9 Update helper.py 2022-10-21 01:29:52 +02:00
Richard Mwewa
f706a08859 Create octosuite.py 2022-10-21 01:29:04 +02:00
Richard Mwewa
b3ccb713e1 Update main.py
All code from main.py has been moved to octosuite.py
2022-10-21 01:27:45 +02:00
Richard Mwewa
0bb330d771 Update README.md 2022-10-21 01:26:06 +02:00
Richard Mwewa
df339d33df Update README.md 2022-10-21 01:06:44 +02:00
13 changed files with 1982 additions and 1680 deletions

11
Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1
FROM python:latest
WORKDIR /app
COPY . .
RUN pip install --upgrade pip && pip install build && python -m build && pip install dist/*.whl
ENTRYPOINT ["octosuite"]

View File

@@ -1,22 +1,25 @@
![logo](https://user-images.githubusercontent.com/74001397/175805580-fffc96d4-e0ef-48bb-a55c-80b2da3e714d.png)
[![Upload Python Package](https://github.com/rly0nheart/octosuite/actions/workflows/python-publish.yml/badge.svg)](https://github.com/rly0nheart/octosuite/actions/workflows/python-publish.yml)
[![CodeQL](https://github.com/rly0nheart/octosuite/actions/workflows/codeql.yml/badge.svg)](https://github.com/rly0nheart/octosuite/actions/workflows/codeql.yml)
![GitHub](https://img.shields.io/github/license/rly0nheart/octosuite?style=flat)
A framework for gathering open-source intelligence on GitHub users, repositories and organizations
[![Upload Python Package](https://github.com/bellingcat/octosuite/actions/workflows/python-publish.yml/badge.svg)](https://github.com/bellingcat/octosuite/actions/workflows/python-publish.yml)
[![CodeQL](https://github.com/bellingcat/octosuite/actions/workflows/codeql.yml/badge.svg)](https://github.com/bellingcat/octosuite/actions/workflows/codeql.yml)
![GitHub](https://img.shields.io/github/license/bellingcat/octosuite?style=flat)
![PyPI](https://img.shields.io/pypi/v/octosuite?style=flat&logo=pypi)
![PyPI - Downloads](https://img.shields.io/pypi/dw/octosuite?style=flat&logo=pypi)
![PyPI - Status](https://img.shields.io/pypi/status/octosuite?style=flat&logo=pypi)
![GitHub repo size](https://img.shields.io/github/repo-size/rly0nheart/octosuite?style=flat&logo=github)
![GitHub repo size](https://img.shields.io/github/repo-size/bellingcat/octosuite?style=flat&logo=github)
> *Simply gather OSINT on Github users & organizations like a God🔥*
![octosuite_gui_exe (2)](https://user-images.githubusercontent.com/74001397/186889610-4530ee26-d3c6-46fc-8c92-8709f89617fd.png "Octosuite' about window")
![octosuite_gui_exe (4)](https://user-images.githubusercontent.com/74001397/186889897-c1c17fac-fddc-4967-9084-39cfe2d1307f.png "Octosuite user profile window")
## Wiki
[Refer to the Wiki](https://github.com/rly0nheart/octosuite/wiki) for installation instructions, in addition to all other documentation.
# Wiki
[Refer to the Wiki](https://github.com/bellingcat/octosuite/wiki) for installation instructions, in addition to all other documentation.
## Features
# Features
- [x] Fetches an organization's profile information
- [x] Fetches an oganization's events
- [x] Returns an organization's repositories
@@ -46,16 +49,19 @@
- [x] Searches commits
- [x] Automatically logs network activity (.logs folder)
- [x] User can view, read and delete logs
- [x] All the above can be used with command-line arguments (PyPI Package only)
- [x] ...And more
## Note
> Octosuite automatically logs network and user activity of each session, the logs are saved by date and time in the .logs folder
## License
# License
![license](https://user-images.githubusercontent.com/74001397/137917929-2f2cdb0c-4d1d-4e4b-9f0d-e01589e027b5.png)
## Donations
Buy a coffee to the creator of *Octosuite*
# Donations
If you like OctoSuite and would like to show support, you can Buy A Coffee for the developer using the button below
<a href="https://www.buymeacoffee.com/189381184" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Your support will be much appreciated😊

View File

@@ -1,22 +1,23 @@
import getpass
from octosuite.colors import red, white, green, reset
from octosuite.config import red, white, green, reset, Tree
"""
banner.py
This file holds the program's banner logo and version tag
"""
version_tag = "2.2.3"
name_logo = f"""{white}
# banner.py
# This file holds the program's banner and version tag
version_tag = "3.0.1"
def banner():
banner_tree = Tree(getpass.getuser())
banner_tree.add(f"use {green}help{reset} command for usage")
banner_tree.add(f"commands are case insensitive\n")
return f"""
_______ __ _______ __ __
| |.----.| |_.-----.| __|.--.--.|__| |_.-----.
| - || __|| _| _ ||__ || | || | _| -__|
|_______||____||____|_____||_______||_____||__|____|_____|
v{version_tag}
v{version_tag}#dev
{white}— Advanced Github {red}OSINT{white} Framework
.:{getpass.getuser()}:.
├─ use {green}help{reset}{white} command for usage
└╼ commands are case insensitive{reset}
"""
""", banner_tree

View File

@@ -1,43 +0,0 @@
import platform
from datetime import datetime
# This file is responsible for enabling/disabling colors in OctoSuite
# This file gets called first at start up before any other file gets called
# colors.py is the reason why users get to choose whether to enable/disable colors
system_info = [("Processor",platform.processor),
("Node", platform.node),
("Release", platform.release),
("Architecture", platform.architecture),
("Version", platform.version)]
banner = f"""
OCTOSUITE © 2022 Richard Mwewa
{datetime.now().strftime('%A %d %B %Y, %H:%M:%S%p')}
"""
print(banner)
print(f"\t{platform.system()}")
for key, value in system_info:
print(f"\t├─ {key}: {value()}")
print("\n")
while True:
try:
color_chooser = input(f"[ ? ] Welcome, would you like to enable colors for this session? (Y/n) ").lower()
if color_chooser == "y":
header_title = "bold white"
red = "[red]"
white = "[white]"
green = "[green]"
red_bold = "[white bold]"
white_bold = "[white bold]"
green_bold = "[green bold]"
reset = "[/]"
break
elif color_chooser == "n":
header_title = red = white = green = red_bold = white_bold = green_bold = 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].")

200
octosuite/config.py Normal file
View File

@@ -0,0 +1,200 @@
import psutil
import platform
import argparse
from rich.tree import Tree
from rich.text import Text
from rich.table import Table
from datetime import datetime
from rich import print as xprint
from rich.prompt import Prompt, Confirm
def usage():
return """
Basic Usage
===========
Get User Profile Info
---------------------
octosuite --method user_profile --username <username>
Get User Repos
--------------
octosuite --method user_repos --username <username>
Get Organi[sz]ation Profile Info
-----------------------------
octosuite --method org_profile --organization <organization_name>
Get Organi[sz]ation Repos
-----------------------------
octosuite --method org_repos --organization <organization_name>
Get Repo Profile Info
---------------------
octosuite --method repo_profile --username <username> --repository <repo_name>
Get Repo Forks
--------------
octosuite --method repo_forks --username <username> --repository <repo_name>
Searching
=========
Search Users
------------
octosuite --method users_search --query <query>
Search Issues
-------------
octosuite --method issues_search --query <query>
Search Commits
--------------
octosuite --method commits_search --query <query>
Search Topics
-------------
octosuite --method topics_search --query <query>
Search Repositories
-------------------
octosuite --method repos_search --query <query>
Log Management
==============
View logs
---------
octosuite --method view_logs
Read log
--------
octosuite --method read_log --log-file <log_file>
Delete log
----------
octosuite --method delete_log --log-file <log_file>
Clear logs
----------
octosuite --method clear_logs
CSV Management
==============
View CSV
---------
octosuite --method view_csv
Read CSV
--------
octosuite --method read_csv --csv-file <csv_file>
Delete CSV
----------
octosuite --method delete_csv --csv-file <csv_file>
Clear CSV's
-----------
octosuite --method clear_csv
"""
def create_parser():
parser = argparse.ArgumentParser(description='OCTOSUITE: Advanced GitHub osint framework — by Richard Mwewa | https://about.me/rly0nheart', usage=usage())
parser.add_argument('-m', '--method', help='method', choices=['user_profile', 'user_repos', 'user_gists', 'user_orgs', 'user_events',
'user_subscriptions', 'user_following', 'user_followers', 'user_follows',
'org_profile', 'org_repos', 'org_events', 'org_member',
'repo_profile', 'repo_contributors', 'repo_stargazers', 'repo_forks',
'repo_issues', 'repo_releases', 'repo_path_contents', 'users_search', 'issues_search',
'commits_search', 'topics_search', 'repos_search', 'view_logs', 'read_log', 'delete_log',
'clear_logs', 'view_csv', 'read_csv', 'delete_csv', 'clear_csv', 'about', 'author'])
parser.add_argument('-u', '--username', help='username')
parser.add_argument('-uB', '--username_b', help='username_B (used with user_follows)')
parser.add_argument('-o', '--organization', '--organisation', help='organi[sz]ation name')
parser.add_argument('-r', '--repository', help='repository name')
parser.add_argument('-p', '--path_name', help='path name (used with repo_path_contents)')
parser.add_argument('-q', '--query', help='query (used with search methods)')
parser.add_argument('-l', '--limit', help='output limit (used with methods that return results in bulk) (default: %(default)s)', default=10)
parser.add_argument('-c', '--colors', '--colours', help='specify to run octosuite cli with colo[u]rs enabled', action='store_true')
parser.add_argument('--csv_file', help='csv file (used with csv management methods)')
parser.add_argument('--log_file', help='log file (used with logs management methods)')
parser.add_argument('--log-to-csv', help='log output to a csv file', action='store_true', dest='log_csv')
return parser
parser = create_parser()
args = parser.parse_args()
# This file is responsible for enabling/disabling colo[u]rs and configuring argparse in OctoSuite
# This file gets called first at start up before any other file
# config.py is the reason why users get to choose whether to enable/disable colo[u]rs, and call the program with command line arguments
# delete this file (I dare you), the entire program breaks
system_info = [("RAM", f"{str(round(psutil.virtual_memory().total / (1024.0 ** 3)))}GB"),
("Node", platform.node()),
("Release", platform.release()),
("Version", platform.version()),
("Processor", platform.processor()),
("Architecture", platform.architecture())]
first_banner = f"""
OCTOSUITE © 2023 Richard Mwewa
{datetime.now().strftime('%A %d %B %Y, %H:%M:%S%p')}
"""
if args.colors:
header_title = "bold white"
red = "[red]"
white = "[white]"
green = "[green]"
yellow = "[yellow]"
red_bold = "[white bold]"
white_bold = "[white bold]"
green_bold = "[green bold]"
reset = "[/]"
else:
print(first_banner)
system_tree = Tree(platform.system())
for system_key, system_value in system_info:
system_tree.add(f"{system_key}: {system_value}")
xprint(system_tree)
print("\n")
try:
color_chooser = Confirm.ask(f"Welcome, would you like to enable colo(u)rs for this session?")
if color_chooser:
header_title = "bold white"
red = "[red]"
white = "[white]"
green = "[green]"
yellow = "[yellow]"
red_bold = "[white bold]"
white_bold = "[white bold]"
green_bold = "[green bold]"
reset = "[/]"
else:
header_title = red = white = green = red_bold = white_bold = green_bold = reset = yellow = ""
except KeyboardInterrupt:
exit(f"[WARNING] Process interrupted with Ctrl+C.")

View File

@@ -1,448 +1,442 @@
import os
import csv
import logging
from rich import print as xprint
from octosuite.sign_vars import SignVar
from octosuite.log_roller import logRoller
from octosuite.colors import red, white, green, reset
"""
csvLogger
This class holds the methods for creating .csv files of each functionality in main
"""
class csvLogger:
# .csv for organization' profile
def logOrgProfile(response):
org_profile_fields = ['Profile photo', 'Name', 'Username', 'ID', 'Node ID', 'Email', 'About', 'Location', 'Blog', 'Followers', 'Following', 'Twitter handle', 'Gists', 'Repositories', 'Account type', 'Is verified?', 'Has organization projects?', 'Has repository projects?', 'Created at', 'Updated at']
org_profile_row = [response.json()['avatar_url'], response.json()['name'], response.json()['login'], response.json()['id'], response.json()['node_id'], response.json()['email'], response.json()['description'], response.json()['location'], response.json()['blog'], response.json()['followers'], response.json()['following'], response.json()['twitter_username'], response.json()['public_gists'], response.json()['public_repos'], response.json()['type'], response.json()['is_verified'], response.json()['has_organization_projects'], response.json()['has_repository_projects'], response.json()['created_at'], response.json()['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{response.json()['name']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(org_profile_fields)
writecsv.writerow(org_profile_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
from octosuite.log_roller import prompt_log_csv, logged_to_csv
from octosuite.message_prefixes import PROMPT, WARNING, POSITIVE, NEGATIVE, INFO
# Creating a .csv file of a user' profile
def logUserProfile(response):
user_profile_fields = ['Profile photo', 'Name', 'Username', 'ID', 'Node ID', 'Bio', 'Blog', 'Location', 'Followers', 'Following', 'Twitter handle', 'Gists', 'Repositories', 'Organization', 'Is hireable?', 'Is site admin?', 'Joined at', 'Updated at']
user_profile_row = [response.json()['avatar_url'], response.json()['name'], response.json()['login'], response.json()['id'], response.json()['node_id'], response.json()['bio'], response.json()['blog'], response.json()['location'], response.json()['followers'], response.json()['following'], response.json()['twitter_username'], response.json()['public_gists'], response.json()['public_repos'], response.json()['company'], response.json()['hireable'], response.json()['site_admin'], response.json()['created_at'], response.json()['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{response.json()['login']}.csv", 'w',) as file:
writecsv = csv.writer(file)
writecsv.writerow(user_profile_fields)
writecsv.writerow(user_profile_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# csv_loggers.py
# This file holds the functions for creating .csv files of each functionality in main
def log_org_profile(response):
org_profile_fields = ['Profile photo', 'Name', 'Username', 'ID', 'Node ID', 'Email', 'About', 'Location', 'Blog',
'Followers', 'Following', 'Twitter handle', 'Gists', 'Repositories', 'Account type',
'Is verified?', 'Has organization projects?', 'Has repository projects?', 'Created at',
'Updated at']
org_profile_row = [response.json()['avatar_url'], response.json()['name'], response.json()['login'],
response.json()['id'], response.json()['node_id'], response.json()['email'],
response.json()['description'], response.json()['location'], response.json()['blog'],
response.json()['followers'], response.json()['following'], response.json()['twitter_username'],
response.json()['public_gists'], response.json()['public_repos'], response.json()['type'],
response.json()['is_verified'], response.json()['has_organization_projects'],
response.json()['has_repository_projects'], response.json()['created_at'],
response.json()['updated_at']]
with open(os.path.join("output", f"{response.json()['name']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(org_profile_fields)
write_csv.writerow(org_profile_row)
# create .csv for repository profile
def logRepoProfile(response):
repo_profile_fields = [ 'Name','ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility', 'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?', 'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?', 'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
repo_profile_row = [response.json()['name'], response.json()['id'], response.json()['description'], response.json()['forks'], response.json()['stargazers_count'], response.json()['watchers'], response.json()['license'], response.json()['default_branch'], response.json()['visibility'], response.json()['language'], response.json()['open_issues'], response.json()['topics'], response.json()['homepage'], response.json()['clone_url'], response.json()['ssh_url'], response.json()['fork'], response.json()['allow_forking'], response.json()['private'], response.json()['archived'], response.json()['is_template'], response.json()['has_wiki'], response.json()['has_pages'], response.json()['has_projects'], response.json()['has_issues'], response.json()['has_downloads'], response.json()['pushed_at'], response.json()['created_at'], response.json()['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{response.json()['name']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(repo_profile_fields)
writecsv.writerow(repo_profile_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# create .csv for repository path contents
def logRepoPathContents(content, repo_name):
path_content_fields = ['Filename', 'Size (bytes)', 'Type', 'Path', 'SHA', 'URL']
path_content_row = [content['name'], content['size'], content['type'], content['path'], content['sha'], content['html_url']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{content['name']}_content_from_{repo_name}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(path_content_fields)
writecsv.writerow(path_content_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# create .csv for repository stargazer
def logRepoStargazers(stargazer, repo_name):
user_follower_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type', 'Is site admin?', 'URL']
user_follower_row = [stargazer['avatar_url'], stargazer['login'], stargazer['id'], stargazer['node_id'], stargazer['gravatar_id'], stargazer['type'], stargazer['site_admin'], stargazer['html_url']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{stargazer['login']}_stargazer_of_{repo_name}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_follower_fields)
writecsv.writerow(user_follower_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# Creating a .csv file of a user' profile
def log_user_profile(response):
user_profile_fields = ['Profile photo', 'Name', 'Username', 'ID', 'Node ID', 'Bio', 'Blog', 'Location', 'Followers',
'Following', 'Twitter handle', 'Gists', 'Repositories', 'Organization', 'Is hireable?',
'Is site admin?', 'Joined at', 'Updated at']
user_profile_row = [response.json()['avatar_url'], response.json()['name'], response.json()['login'],
response.json()['id'], response.json()['node_id'], response.json()['bio'],
response.json()['blog'], response.json()['location'], response.json()['followers'],
response.json()['following'], response.json()['twitter_username'],
response.json()['public_gists'], response.json()['public_repos'], response.json()['company'],
response.json()['hireable'], response.json()['site_admin'], response.json()['created_at'],
response.json()['updated_at']]
with open(os.path.join("output", f"{response.json()['login']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_profile_fields)
write_csv.writerow(user_profile_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# create .csv for repository profile
def log_repo_profile(response):
repo_profile_fields = ['Name', 'ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility',
'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?',
'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?',
'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
repo_profile_row = [response.json()['name'], response.json()['id'], response.json()['description'],
response.json()['forks'], response.json()['stargazers_count'], response.json()['watchers'],
response.json()['license'], response.json()['default_branch'], response.json()['visibility'],
response.json()['language'], response.json()['open_issues'], response.json()['topics'],
response.json()['homepage'], response.json()['clone_url'], response.json()['ssh_url'],
response.json()['fork'], response.json()['allow_forking'], response.json()['private'],
response.json()['archived'], response.json()['is_template'], response.json()['has_wiki'],
response.json()['has_pages'], response.json()['has_projects'], response.json()['has_issues'],
response.json()['has_downloads'], response.json()['pushed_at'], response.json()['created_at'],
response.json()['updated_at']]
with open(os.path.join("output", f"{response.json()['name']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(repo_profile_fields)
write_csv.writerow(repo_profile_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# create .csv for repository forks
def logRepoForks(fork, count):
repo_fork_fields = [ 'Name','ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility', 'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?', 'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?', 'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
repo_fork_row = [fork['full_name'], fork['id'], fork['description'], fork['forks'], fork['stargazers_count'], fork['watchers'], fork['license'], fork['default_branch'], fork['visibility'], fork['language'], fork['open_issues'], fork['topics'], fork['homepage'], fork['clone_url'], fork['ssh_url'], fork['fork'], fork['allow_forking'], fork['private'], fork['archived'], fork['is_template'], fork['has_wiki'], fork['has_pages'], fork['has_projects'], fork['has_issues'], fork['has_downloads'], fork['pushed_at'], fork['created_at'], fork['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{fork['name']}_fork_{count}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(repo_fork_fields)
writecsv.writerow(repo_fork_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# create .csv for repository path contents
def log_repo_path_contents(content, repo_name):
path_content_fields = ['Filename', 'Size (bytes)', 'Type', 'Path', 'SHA', 'URL']
path_content_row = [content['name'], content['size'], content['type'], content['path'], content['sha'],
content['html_url']]
with open(os.path.join("output", f"{content['name']}_content_from_{repo_name}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(path_content_fields)
write_csv.writerow(path_content_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# create .csv for repository issues
def logRepoIssues(issue, repo_name):
repo_issue_fields = ['Title', 'ID', 'Node ID', 'Number', 'State', 'Reactions', 'Comments', 'Milestone', 'Assignee', 'Assignees', 'Author association', 'Labels', 'Is locked?', 'Lock reason', 'Closed at', 'Created at', 'Updated at']
repo_issue_row = [issue['title'], issue['id'], issue['node_id'], issue['number'], issue['state'], issue['reactions'], issue['comments'], issue['milestone'], issue['assignee'], issue['assignees'], issue['author_association'], issue['labels'], issue['locked'], issue['active_lock_reason'], issue['closed_at'], issue['created_at'], issue['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{repo_name}_issue_{issue['id']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(repo_issue_fields)
writecsv.writerow(repo_issue_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# create .csv for repository stargazer
def log_repo_stargazers(stargazer, repo_name):
user_follower_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type',
'Is site admin?', 'URL']
user_follower_row = [stargazer['avatar_url'], stargazer['login'], stargazer['id'], stargazer['node_id'],
stargazer['gravatar_id'], stargazer['type'], stargazer['site_admin'], stargazer['html_url']]
with open(os.path.join("output", f"{stargazer['login']}_stargazer_of_{repo_name}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_follower_fields)
write_csv.writerow(user_follower_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# create .csv for repository forks
def log_repo_forks(fork, count):
repo_fork_fields = ['Name', 'ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility',
'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?',
'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?',
'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
repo_fork_row = [fork['full_name'], fork['id'], fork['description'], fork['forks'], fork['stargazers_count'],
fork['watchers'], fork['license'], fork['default_branch'], fork['visibility'], fork['language'],
fork['open_issues'], fork['topics'], fork['homepage'], fork['clone_url'], fork['ssh_url'],
fork['fork'], fork['allow_forking'], fork['private'], fork['archived'], fork['is_template'],
fork['has_wiki'], fork['has_pages'], fork['has_projects'], fork['has_issues'],
fork['has_downloads'], fork['pushed_at'], fork['created_at'], fork['updated_at']]
with open(os.path.join("output", f"{fork['name']}_fork_{count}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(repo_fork_fields)
write_csv.writerow(repo_fork_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# create .csv for repository releases
def logRepoReleases(release, repo_name):
repo_release_fields = ['Name', 'ID', 'Node ID', 'Tag', 'Branch', 'Assets', 'Is draft?', 'Is prerelease?', 'Created at', 'Published at']
repo_release_row = [release['name'], release['id'], release['node_id'], release['tag_name'], release['target_commitish'], release['assets'], release['draft'], release['prerelease'], release['created_at'], release['published_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{repo_name}_release_{release['name']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(repo_release_fields)
writecsv.writerow(repo_release_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# Create .csv file for repository contributors
def logRepoContributors(contributor, repo_name):
repo_contributor_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type', 'Is site admin?', 'URL']
repo_contributor_row = [contributor['avatar_url'], contributor['login'], contributor['id'], contributor['node_id'], contributor['gravatar_id'], contributor['type'], contributor['site_admin'], contributor['html_url']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{contributor['login']}_contributor_of_{repo_name}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(repo_contributor_fields)
writecsv.writerow(repo_contributor_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
print(f"{SignVar.info} {logRoller.loggingSkipped}\n")
# Create .csv for organization' events
def logOrgEvents(event, organization):
org_event_fields = ['ID', 'Type', 'Created at', 'Payload']
org_event_row = [event['id'], event['type'], event['created_at'], event['payload']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{organization}_event_{event['id']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(org_event_fields)
writecsv.writerow(org_event_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# Create .csv for organization' repositories
def logOrgRepos(repository, organization):
org_repo_fields = [ 'Name','ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility', 'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?', 'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?', 'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
org_repo_row = [repository['full_name'], repository['id'], repository['description'], repository['forks'], repository['stargazers_count'], repository['watchers'], repository['license'], repository['default_branch'], repository['visibility'], repository['language'], repository['open_issues'], repository['topics'], repository['homepage'], repository['clone_url'], repository['ssh_url'], repository['fork'], repository['allow_forking'], repository['private'], repository['archived'], repository['is_template'], repository['has_wiki'], repository['has_pages'], repository['has_projects'], repository['has_issues'], repository['has_downloads'], repository['pushed_at'], repository['created_at'], repository['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{repository['name']}_repository_of_{organization}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(org_repo_fields)
writecsv.writerow(org_repo_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# .csv for user' repositories
def logUserRepos(repository, username):
user_repo_fields = [ 'Name','ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility', 'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?', 'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?', 'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
user_repo_row = [repository['full_name'], repository['id'], repository['description'], repository['forks'], repository['stargazers_count'], repository['watchers'], repository['license'], repository['default_branch'], repository['visibility'], repository['language'], repository['open_issues'], repository['topics'], repository['homepage'], repository['clone_url'], repository['ssh_url'], repository['fork'], repository['allow_forking'], repository['private'], repository['archived'], repository['is_template'], repository['has_wiki'], repository['has_pages'], repository['has_projects'], repository['has_issues'], repository['has_downloads'], repository['pushed_at'], repository['created_at'], repository['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{repository['name']}_{username}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_repo_fields)
writecsv.writerow(user_repo_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# create .csv for repository issues
def log_repo_issues(issue, repo_name):
repo_issue_fields = ['Title', 'ID', 'Node ID', 'Number', 'State', 'Reactions', 'Comments', 'Milestone', 'Assignee',
'Assignees', 'Author association', 'Labels', 'Is locked?', 'Lock reason', 'Closed at',
'Created at', 'Updated at']
repo_issue_row = [issue['title'], issue['id'], issue['node_id'], issue['number'], issue['state'],
issue['reactions'], issue['comments'], issue['milestone'], issue['assignee'], issue['assignees'],
issue['author_association'], issue['labels'], issue['locked'], issue['active_lock_reason'],
issue['closed_at'], issue['created_at'], issue['updated_at']]
# .csv for user events
def logUserEvents(event):
user_event_fields = ['Actor', 'Type', 'Repository', 'Created at', 'Payload']
user_event_row = [event['actor']['login'], event['type'], event['repo']['name'], event['created_at'], event['payload']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{event['actor']['login']}_event_{event['id']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_event_fields)
writecsv.writerow(user_event_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# .csv for user gists
def logUserGists(gist):
user_gist_fields = ['ID', 'Node ID', 'About', 'Comments', 'Files', 'Git Push URL', 'Is public?', 'Is truncated?', 'Updated at']
user_gist_row = [gist['id'], gist['node_id'], gist['description'], gist['comments'], gist['files'], gist['git_push_url'], gist['public'], gist['truncated'], gist['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{gist['id']}_gists_{gist['owner']['login']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_gist_fields)
writecsv.writerow(user_gist_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# .csv for user followers
def logUserFollowers(follower, username):
user_follower_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type', 'Is site admin?', 'URL']
user_follower_row = [follower['avatar_url'], follower['login'], follower['id'], follower['node_id'], follower['gravatar_id'], follower['type'], follower['site_admin'], follower['html_url']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{follower['login']}_follower_of_{username}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_follower_fields)
writecsv.writerow(user_follower_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# .csv for user following
def logUserFollowing(user, username):
user_following_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type', 'Is site admin?', 'URL']
user_following_row = [user['avatar_url'], user['login'], user['id'], user['node_id'], user['gravatar_id'], user['type'], user['site_admin'], user['html_url']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{user['login']}_followed_by_{username}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_following_fields)
writecsv.writerow(user_following_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# .csv for user' subscriptions
def logUserSubscriptions(repository, username):
user_subscription_fields = [ 'Name','ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility', 'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?', 'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?', 'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
user_subscription_row = [repository['name'], repository['id'], repository['description'], repository['forks'], repository['stargazers_count'], repository['watchers'], repository['license'], repository['default_branch'], repository['visibility'], repository['language'], repository['open_issues'], repository['topics'], repository['homepage'], repository['clone_url'], repository['ssh_url'], repository['fork'], repository['allow_forking'], repository['private'], repository['archived'], repository['is_template'], repository['has_wiki'], repository['has_pages'], repository['has_projects'], repository['has_issues'], repository['has_downloads'], repository['pushed_at'], repository['created_at'], repository['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{username}_subscriptions_{repository['name']}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_subscription_fields)
writecsv.writerow(user_subscription_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# .csv for user organizations
def logUserOrgs(organization, username):
user_org_fields = ['Profile photo', 'Name', 'ID', 'Node ID', 'URL', 'About']
user_org_row = [organization['avatar_url'], organization['login'], organization['id'], organization['node_id'], organization['url'], organization['description']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{organization['login']}_{username}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_org_fields)
writecsv.writerow(user_org_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
with open(os.path.join("output", f"{repo_name}_issue_{issue['id']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(repo_issue_fields)
write_csv.writerow(repo_issue_row)
# Create .csv for user search
def logUserSearch(user, query):
user_search_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type', 'Is site admin?', 'URL']
user_search_row = [user['avatar_url'], user['login'], user['id'], user['node_id'], user['gravatar_id'], user['type'], user['site_admin'], user['html_url']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{user['login']}_user_search_result_for_{query}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(user_search_fields)
writecsv.writerow(user_search_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# Create .csv for repository search
def logRepoSearch(repository, query):
repo_search_fields = [ 'Name','ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility', 'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?', 'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?', 'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
repo_search_row = [repository['full_name'], repository['id'], repository['description'], repository['forks'], repository['stargazers_count'], repository['watchers'], repository['license'], repository['default_branch'], repository['visibility'], repository['language'], repository['open_issues'], repository['topics'], repository['homepage'], repository['clone_url'], repository['ssh_url'], repository['fork'], repository['allow_forking'], repository['private'], repository['archived'], repository['is_template'], repository['has_wiki'], repository['has_pages'], repository['has_projects'], repository['has_issues'], repository['has_downloads'], repository['pushed_at'], repository['created_at'], repository['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{repository['name']}_repository_search_result_for_{query}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(repo_search_fields)
writecsv.writerow(repo_search_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# Create .csv for topic search
def logTopicSearch(topic, query):
topic_search_fields = ['Name', 'Score', 'Curated', 'Featured', 'Display name', 'Created by', 'Created at', 'Updated at']
topic_search_row = [topic['name'], topic['score'], topic['curated'], topic['featured'], topic['display_name'], topic['created_by'], topic['created_at'], topic['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{topic['name']}_topic_search_result_for_{query}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(topic_search_fields)
writecsv.writerow(topic_search_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# Create .csv for issues search
def logIssueSearch(issue, query):
issue_search_fields = ['Title', 'ID', 'Node ID', 'Number', 'State', 'Reactions', 'Comments', 'Milestone', 'Assignee', 'Assignees', 'Author association', 'Labels', 'Is locked?', 'Lock reason', 'Closed at', 'Created at', 'Updated at']
issue_search_row = [issue['title'], issue['id'], issue['node_id'], issue['number'], issue['state'], issue['reactions'], issue['comments'], issue['milestone'], issue['assignee'], issue['assignees'], issue['author_association'], issue['labels'], issue['locked'], issue['active_lock_reason'], issue['closed_at'], issue['created_at'], issue['updated_at']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{issue['id']}_issue_search_result_for_{query}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(issue_search_fields)
writecsv.writerow(issue_search_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
# Create .csv for commits search
def logCommitsSearch(commit, query):
commit_search_fields = ['SHA', 'Author', 'Username', 'Email', 'Committer', 'Repository', 'URL', 'Description']
commit_search_row = [commit['commit']['tree']['sha'], commit['commit']['author']['name'], commit['author']['login'], commit['commit']['author']['email'], commit['commit']['committer']['name'], commit['repository']['full_name'], commit['html_url'], commit['commit']['message']]
xprint(f"\n{SignVar.prompt} {logRoller.askLogCsv}", end="");prompt = input().lower()
if prompt == 'y':
with open(f"output/{commit['commit']['tree']['sha']}_commit_search_result_for_{query}.csv", 'w') as file:
writecsv = csv.writer(file)
writecsv.writerow(commit_search_fields)
writecsv.writerow(commit_search_row)
logging.info(logRoller.loggedToCsv.format(file.name))
xprint(f"{SignVar.positive} {logRoller.loggedToCsv.format(file.name)}")
else:
logging.info(logRoller.loggingSkipped.format(prompt))
xprint(f"{SignVar.info} {logRoller.loggingSkipped.format(prompt)}")
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# create .csv for repository releases
def log_repo_releases(release, repo_name):
repo_release_fields = ['Name', 'ID', 'Node ID', 'Tag', 'Branch', 'Assets', 'Is draft?', 'Is prerelease?',
'Created at', 'Published at']
repo_release_row = [release['name'], release['id'], release['node_id'], release['tag_name'],
release['target_commitish'], release['assets'], release['draft'], release['prerelease'],
release['created_at'], release['published_at']]
with open(os.path.join("output", f"{repo_name}_release_{release['name']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(repo_release_fields)
write_csv.writerow(repo_release_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv file for repository contributors
def log_repo_contributors(contributor, repo_name):
repo_contributor_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type',
'Is site admin?', 'URL']
repo_contributor_row = [contributor['avatar_url'], contributor['login'], contributor['id'], contributor['node_id'],
contributor['gravatar_id'], contributor['type'], contributor['site_admin'],
contributor['html_url']]
with open(os.path.join("output", f"{contributor['login']}_contributor_of_{repo_name}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(repo_contributor_fields)
write_csv.writerow(repo_contributor_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv for organization' events
def log_repo_events(event, organization):
org_event_fields = ['ID', 'Type', 'Created at', 'Payload']
org_event_row = [event['id'], event['type'], event['created_at'], event['payload']]
with open(os.path.join("output", f"{organization}_event_{event['id']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(org_event_fields)
write_csv.writerow(org_event_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv for organization' repositories
def log_org_repos(repository, organization):
org_repo_fields = ['Name', 'ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility',
'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?',
'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?',
'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
org_repo_row = [repository['full_name'], repository['id'], repository['description'], repository['forks'],
repository['stargazers_count'], repository['watchers'], repository['license'],
repository['default_branch'], repository['visibility'], repository['language'],
repository['open_issues'], repository['topics'], repository['homepage'], repository['clone_url'],
repository['ssh_url'], repository['fork'], repository['allow_forking'], repository['private'],
repository['archived'], repository['is_template'], repository['has_wiki'], repository['has_pages'],
repository['has_projects'], repository['has_issues'], repository['has_downloads'],
repository['pushed_at'], repository['created_at'], repository['updated_at']]
with open(os.path.join("output", f"{repository['name']}_repository_of_{organization}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(org_repo_fields)
write_csv.writerow(org_repo_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# .csv for user' repositories
def log_user_repos(repository, username):
user_repo_fields = ['Name', 'ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility',
'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?',
'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?',
'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
user_repo_row = [repository['full_name'], repository['id'], repository['description'], repository['forks'],
repository['stargazers_count'], repository['watchers'], repository['license'],
repository['default_branch'], repository['visibility'], repository['language'],
repository['open_issues'], repository['topics'], repository['homepage'], repository['clone_url'],
repository['ssh_url'], repository['fork'], repository['allow_forking'], repository['private'],
repository['archived'], repository['is_template'], repository['has_wiki'], repository['has_pages'],
repository['has_projects'], repository['has_issues'], repository['has_downloads'],
repository['pushed_at'], repository['created_at'], repository['updated_at']]
with open(os.path.join("output", f"{repository['name']}_{username}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_repo_fields)
write_csv.writerow(user_repo_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# .csv for user events
def log_user_events(event):
user_event_fields = ['Actor', 'Type', 'Repository', 'Created at', 'Payload']
user_event_row = [event['actor']['login'], event['type'], event['repo']['name'], event['created_at'],
event['payload']]
with open(os.path.join("output", f"{event['actor']['login']}_event_{event['id']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_event_fields)
write_csv.writerow(user_event_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# .csv for user gists
def log_user_gists(gist):
user_gist_fields = ['ID', 'Node ID', 'About', 'Comments', 'Files', 'Git Push URL', 'Is public?', 'Is truncated?',
'Updated at']
user_gist_row = [gist['id'], gist['node_id'], gist['description'], gist['comments'], gist['files'],
gist['git_push_url'], gist['public'], gist['truncated'], gist['updated_at']]
with open(os.path.join("output", f"{gist['id']}_gists_{gist['owner']['login']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_gist_fields)
write_csv.writerow(user_gist_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# .csv for user followers
def log_user_followers(follower, username):
user_follower_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type',
'Is site admin?', 'URL']
user_follower_row = [follower['avatar_url'], follower['login'], follower['id'], follower['node_id'],
follower['gravatar_id'], follower['type'], follower['site_admin'], follower['html_url']]
with open(f"output/{follower['login']}_follower_of_{username}.csv", 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_follower_fields)
write_csv.writerow(user_follower_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# .csv for user following
def log_user_following(user, username):
user_following_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type',
'Is site admin?', 'URL']
user_following_row = [user['avatar_url'], user['login'], user['id'], user['node_id'], user['gravatar_id'],
user['type'], user['site_admin'], user['html_url']]
with open(os.path.join("output", f"{user['login']}_followed_by_{username}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_following_fields)
write_csv.writerow(user_following_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# .csv for user' subscriptions
def log_user_subscriptions(repository, username):
user_subscription_fields = ['Name', 'ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility',
'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?',
'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?',
'Has pages?', 'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at',
'Created at', 'Updated at']
user_subscription_row = [repository['name'], repository['id'], repository['description'], repository['forks'],
repository['stargazers_count'], repository['watchers'], repository['license'],
repository['default_branch'], repository['visibility'], repository['language'],
repository['open_issues'], repository['topics'], repository['homepage'],
repository['clone_url'], repository['ssh_url'], repository['fork'],
repository['allow_forking'], repository['private'], repository['archived'],
repository['is_template'], repository['has_wiki'], repository['has_pages'],
repository['has_projects'], repository['has_issues'], repository['has_downloads'],
repository['pushed_at'], repository['created_at'], repository['updated_at']]
with open(os.path.join("output", f"{username}_subscriptions_{repository['name']}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_subscription_fields)
write_csv.writerow(user_subscription_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# .csv for user organizations
def log_user_orgs(organization, username):
user_org_fields = ['Profile photo', 'Name', 'ID', 'Node ID', 'URL', 'About']
user_org_row = [organization['avatar_url'], organization['login'], organization['id'], organization['node_id'],
organization['url'], organization['description']]
with open(os.path.join("output", f"{organization['login']}_{username}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_org_fields)
write_csv.writerow(user_org_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv for user search
def log_users_search(user, query):
user_search_fields = ['Profile photo', 'Username', 'ID', 'Node ID', 'Gravatar ID', 'Account type', 'Is site admin?',
'URL']
user_search_row = [user['avatar_url'], user['login'], user['id'], user['node_id'], user['gravatar_id'],
user['type'], user['site_admin'], user['html_url']]
with open(os.path.join("output", f"{user['login']}_user_search_result_for_{query}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(user_search_fields)
write_csv.writerow(user_search_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv for repository search
def log_repos_search(repository, query):
repo_search_fields = ['Name', 'ID', 'About', 'Forks', 'Stars', 'Watchers', 'License', 'Branch', 'Visibility',
'Language(s)', 'Open issues', 'Topics', 'Homepage', 'Clone URL', 'SSH URL', 'Is fork?',
'Is forkable?', 'Is private?', 'Is archived?', 'Is template?', 'Has wiki?', 'Has pages?',
'Has projects?', 'Has issues?', 'Has downloads?', 'Pushed at', 'Created at', 'Updated at']
repo_search_row = [repository['full_name'], repository['id'], repository['description'], repository['forks'],
repository['stargazers_count'], repository['watchers'], repository['license'],
repository['default_branch'], repository['visibility'], repository['language'],
repository['open_issues'], repository['topics'], repository['homepage'], repository['clone_url'],
repository['ssh_url'], repository['fork'], repository['allow_forking'], repository['private'],
repository['archived'], repository['is_template'], repository['has_wiki'],
repository['has_pages'], repository['has_projects'], repository['has_issues'],
repository['has_downloads'], repository['pushed_at'], repository['created_at'],
repository['updated_at']]
with open(os.path.join("output", f"{repository['name']}_repository_search_result_for_{query}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(repo_search_fields)
write_csv.writerow(repo_search_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv for topic search
def log_topics_search(topic, query):
topic_search_fields = ['Name', 'Score', 'Curated', 'Featured', 'Display name', 'Created by', 'Created at',
'Updated at']
topic_search_row = [topic['name'], topic['score'], topic['curated'], topic['featured'], topic['display_name'],
topic['created_by'], topic['created_at'], topic['updated_at']]
with open(os.path.join("output", f"{topic['name']}_topic_search_result_for_{query}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(topic_search_fields)
write_csv.writerow(topic_search_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv for issues search
def log_issues_search(issue, query):
issue_search_fields = ['Title', 'ID', 'Node ID', 'Number', 'State', 'Reactions', 'Comments', 'Milestone',
'Assignee', 'Assignees', 'Author association', 'Labels', 'Is locked?', 'Lock reason',
'Closed at', 'Created at', 'Updated at']
issue_search_row = [issue['title'], issue['id'], issue['node_id'], issue['number'], issue['state'],
issue['reactions'], issue['comments'], issue['milestone'], issue['assignee'],
issue['assignees'], issue['author_association'], issue['labels'], issue['locked'],
issue['active_lock_reason'], issue['closed_at'], issue['created_at'], issue['updated_at']]
with open(os.path.join("output", f"{issue['id']}_issue_search_result_for_{query}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(issue_search_fields)
write_csv.writerow(issue_search_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")
# Create .csv for commits search
def log_commits_search(commit, query):
commit_search_fields = ['SHA', 'Author', 'Username', 'Email', 'Committer', 'Repository', 'URL', 'Description']
commit_search_row = [commit['commit']['tree']['sha'], commit['commit']['author']['name'], commit['author']['login'],
commit['commit']['author']['email'], commit['commit']['committer']['name'],
commit['repository']['full_name'], commit['html_url'], commit['commit']['message']]
with open(os.path.join("output", f"{commit['commit']['tree']['sha']}_commit_search_result_for_{query}.csv"), 'w') as file:
write_csv = csv.writer(file)
write_csv.writerow(commit_search_fields)
write_csv.writerow(commit_search_row)
logging.info(logged_to_csv.format(file.name))
xprint(f"{POSITIVE} {logged_to_csv.format(file.name)}")

View File

@@ -1,195 +1,170 @@
from rich.table import Table
from rich import print as xprint
from octosuite.colors import white, green, white_bold, green_bold, header_title, reset
from octosuite.config import Tree, xprint, white, green, white_bold, green_bold, header_title, reset
"""
Help
This class holds the help text for available commands.
"""
# helper.py
# This file holds the help text for available commands.
usage_text = 'Use syntax {} to get started with %s{}%s.' % (green_bold, reset)
usage_text_1 = '%sUse {} to view all available subcommands.%s' % (white, reset)
usage_text_2 = "%sThe {} command works with subcommands. %s" % (white, reset)
class Help:
usageText = 'Use syntax {} to get started with %s{}%s.' % (green_bold, reset)
usageText1 = '%sUse {} to view all available subcommands.%s' % (white, reset)
usageText2 = "%sThe {} command works with subcommands. %s" % (white, reset)
def Org():
xprint(
Help.usageText2.format(f"{green_bold}org{reset}") + Help.usageText1.format(f"{green_bold}help:org{reset}"))
def org():
xprint(usage_text_2.format(f"{green_bold}org{reset}") + usage_text_1.format(f"{green_bold}help:org{reset}"))
def Repo():
xprint(Help.usageText2.format(f"{green_bold}repo{reset}") + Help.usageText1.format(
f"{green_bold}help:repo{reset}"))
def repo():
xprint(usage_text_2.format(f"{green_bold}repo{reset}") + usage_text_1.format(f"{green_bold}help:repo{reset}"))
def User():
xprint(Help.usageText2.format(f"{green_bold}user{reset}") + Help.usageText1.format(
f"{green_bold}help:user{reset}"))
def user():
xprint(usage_text_2.format(f"{green_bold}user{reset}") + usage_text_1.format(f"{green_bold}help:user{reset}"))
def Search():
xprint(Help.usageText2.format(f"{green_bold}search{reset}") + Help.usageText1.format(
f"{green_bold}help:search{reset}"))
def search():
xprint(usage_text_2.format(f"{green_bold}search{reset}") + usage_text_1.format(f"{green_bold}help:search{reset}"))
def Source():
xprint(Help.usageText2.format(f"{green_bold}source{reset}") + Help.usageText1.format(
f"{green_bold}help:source{reset}"))
def source():
xprint(usage_text_2.format(f"{green_bold}source{reset}") + usage_text_1.format(f"{green_bold}help:source{reset}"))
def Logs():
xprint(Help.usageText2.format(f"{green_bold}logs{reset}") + Help.usageText1.format(
f"{green_bold}help:logs{reset}"))
def logs():
xprint(usage_text_2.format(f"{green_bold}logs{reset}") + usage_text_1.format(f"{green_bold}help:logs{reset}"))
def Version():
xprint(Help.usageText2.format(f"{green_bold}version{reset}") + Help.usageText1.format(
f"{green_bold}help:version{reset}"))
def csv():
xprint(usage_text_2.format(f"{green_bold}csv{reset}") + usage_text_1.format(f"{green_bold}help:csv{reset}"))
def Csv():
xprint(
Help.usageText2.format(f"{green_bold}csv{reset}") + Help.usageText1.format(f"{green_bold}help:csv{reset}"))
def source_command():
source_cmd_table = Table(show_header=True, header_style=header_title)
source_cmd_table.add_column("Command", style="dim")
source_cmd_table.add_column("Description")
source_cmd_table.add_row("zipball", "Download source code Zipball")
source_cmd_table.add_row("tarball", "Download source code Tarball")
syntax = f"{green}source:<command>{reset}"
xprint(f"{usage_text.format(syntax, 'source code downloads')}")
xprint(source_cmd_table)
def versionCommand():
version_cmd_table = Table(show_header=True, header_style=header_title)
version_cmd_table.add_column("Command", style="dim", width=12)
version_cmd_table.add_column("Description")
version_cmd_table.add_row("check", "Check for new release(s)")
version_cmd_table.add_row("info", "Version information")
def search_command():
search_cmd_table = Table(show_header=True, header_style=header_title)
search_cmd_table.add_column("Command", style="dim")
search_cmd_table.add_column("Description")
search_cmd_table.add_row("users", "Search user(s)")
search_cmd_table.add_row("repos", "Search repositor[y][ies]")
search_cmd_table.add_row("topics", "Search topic(s)")
search_cmd_table.add_row("issues", "Search issue(s)")
search_cmd_table.add_row("commits", "Search commit(s)")
syntax = f"{green}version:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'version management')}")
xprint(version_cmd_table)
syntax = f"{green}search:<command>{reset}"
xprint(f"{usage_text.format(syntax, 'target discovery')}")
xprint(search_cmd_table)
def sourceCommand():
source_cmd_table = Table(show_header=True, header_style=header_title)
source_cmd_table.add_column("Command", style="dim", width=12)
source_cmd_table.add_column("Description")
source_cmd_table.add_row("zipball", "Download source code Zipball")
source_cmd_table.add_row("tarball", "Download source code Tarball")
def user_command():
user_cmd_table = Table(show_header=True, header_style=header_title)
user_cmd_table.add_column("Command", style="dim")
user_cmd_table.add_column("Description")
user_cmd_table.add_row("profile", "Get a target's profile info")
user_cmd_table.add_row("gists", "Return a users's gists")
user_cmd_table.add_row("org", "Return organizations that a target belongs to/owns")
user_cmd_table.add_row("repos", "Return a target's repositories")
user_cmd_table.add_row("events", "Return a target's events")
user_cmd_table.add_row("follows", "Check if user(A) follows user(B)")
user_cmd_table.add_row("followers", "Return a target's followers")
user_cmd_table.add_row("following", "Return a list of users the target is following")
user_cmd_table.add_row("subscriptions", "Return a target's subscriptions")
syntax = f"{green}source:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'source code downloads')}")
xprint(source_cmd_table)
syntax = f"{green}user:<command>{reset}"
xprint(f"{usage_text.format(syntax, 'user investigation(s)')}")
xprint(user_cmd_table)
def searchCommand():
search_cmd_table = Table(show_header=True, header_style=header_title)
search_cmd_table.add_column("Command", style="dim", width=12)
search_cmd_table.add_column("Description")
search_cmd_table.add_row("users", "Search user(s)")
search_cmd_table.add_row("repos", "Search repositor[y][ies]")
search_cmd_table.add_row("topics", "Search topic(s)")
search_cmd_table.add_row("issues", "Search issue(s)")
search_cmd_table.add_row("commits", "Search commit(s)")
def org_command():
org_cmd_table = Table(show_header=True, header_style=header_title)
org_cmd_table.add_column("Command", style="dim")
org_cmd_table.add_column("Description")
org_cmd_table.add_row("profile", "Get a target organization' profile info")
org_cmd_table.add_row("repos", "Return a target organization' repositories")
org_cmd_table.add_row("events", "Return a target organization' events")
org_cmd_table.add_row("member", "Check if a specified user is a public member of the target organization")
syntax = f"{green}search:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'target discovery')}")
xprint(search_cmd_table)
syntax = f"{green}org:<command>{reset}"
xprint(f"{usage_text.format(syntax, 'organization investigation(s)')}")
xprint(org_cmd_table)
def userCommand():
user_cmd_table = Table(show_header=True, header_style=header_title)
user_cmd_table.add_column("Command", style="dim", width=12)
user_cmd_table.add_column("Description")
user_cmd_table.add_row("profile", "Get a target's profile info")
user_cmd_table.add_row("gists", "Return a users's gists")
user_cmd_table.add_row("org", "Return organizations that a target belongs to/owns")
user_cmd_table.add_row("repos", "Return a target's repositories")
user_cmd_table.add_row("events", "Return a target's events")
user_cmd_table.add_row("follows", "Check if user(A) follows user(B)")
user_cmd_table.add_row("followers", "Return a target's followers")
user_cmd_table.add_row("following", "Return a list of users the target is following")
user_cmd_table.add_row("subscriptions", "Return a target's subscriptions")
def repo_command():
repo_cmd_table = Table(show_header=True, header_style=header_title)
repo_cmd_table.add_column("Command", style="dim")
repo_cmd_table.add_column("Description")
repo_cmd_table.add_row("profile", "Get a repository's info")
repo_cmd_table.add_row("issues", "Return a repository's issues")
repo_cmd_table.add_row("forks", "Return a repository's forks")
repo_cmd_table.add_row("releases", "Return a repository's releases")
repo_cmd_table.add_row("stargazers", "Return a repository's stargazers")
repo_cmd_table.add_row("contributors", "Return a repository's contributors")
repo_cmd_table.add_row("path_contents", "List contents in a path of a repository")
syntax = f"{green}user:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'user investigation(s)')}")
xprint(user_cmd_table)
syntax = f"{green}repo:<command>{reset}"
xprint(f"{usage_text.format(syntax, 'repository investigation(s)')}")
xprint(repo_cmd_table)
def orgCommand():
org_cmd_table = Table(show_header=True, header_style=header_title)
org_cmd_table.add_column("Command", style="dim", width=12)
org_cmd_table.add_column("Description")
org_cmd_table.add_row("profile", "Get a target organization' profile info")
org_cmd_table.add_row("repos", "Return a target organization' repositories")
org_cmd_table.add_row("events", "Return a target organization' events")
org_cmd_table.add_row("member", "Check if a specified user is a public member of the target organization")
def logs_command():
logs_cmd_table = Table(show_header=True, header_style=header_title)
logs_cmd_table.add_column("Command", style="dim")
logs_cmd_table.add_column("Description")
logs_cmd_table.add_row("view", "View logs")
logs_cmd_table.add_row("read", "Read log")
logs_cmd_table.add_row("delete", "Delete log")
logs_cmd_table.add_row("clear", "clear logs")
syntax = f"{green}org:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'organization investigation(s)')}")
xprint(org_cmd_table)
syntax = f"{green}logs:<command>{reset}"
xprint(f"{usage_text.format(syntax, 'log(s) management')}")
xprint(logs_cmd_table)
def repoCommand():
repo_cmd_table = Table(show_header=True, header_style=header_title)
repo_cmd_table.add_column("Command", style="dim", width=12)
repo_cmd_table.add_column("Description")
repo_cmd_table.add_row("profile", "Get a repository's info")
repo_cmd_table.add_row("issues", "Return a repository's issues")
repo_cmd_table.add_row("forks", "Return a repository's forks")
repo_cmd_table.add_row("releases", "Return a repository's releases")
repo_cmd_table.add_row("stargazers", "Return a repository's stargazers")
repo_cmd_table.add_row("path_contents", "List contents in a path of a repository")
def csv_command():
csv_cmd_table = Table(show_header=True, header_style=header_title)
csv_cmd_table.add_column("Command", style="dim")
csv_cmd_table.add_column("Description")
csv_cmd_table.add_row("view", "View csv files")
csv_cmd_table.add_row("read", "Read csv")
csv_cmd_table.add_row("delete", "Delete csv")
csv_cmd_table.add_row("clear", "clear csv files")
syntax = f"{green}repo:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'repository investigation(s)')}")
xprint(repo_cmd_table)
syntax = f"{green}csv:<command>{reset}"
xprint(f"{usage_text.format(syntax, 'csv management')}")
xprint(csv_cmd_table)
def logsCommand():
logs_cmd_table = Table(show_header=True, header_style=header_title)
logs_cmd_table.add_column("Command", style="dim", width=12)
logs_cmd_table.add_column("Description")
logs_cmd_table.add_row("view", "View logs")
logs_cmd_table.add_row("read", "Read log")
logs_cmd_table.add_row("delete", "Delete log")
def help_command():
core_cmd_table = Table(show_header=True, header_style=header_title)
core_cmd_table.add_column("Command", style="dim", width=12)
core_cmd_table.add_column("Description")
core_cmd_table.add_row("ls", "List contents of the specified directory")
core_cmd_table.add_row("cd", "Move to specified directory")
core_cmd_table.add_row("help", "Help menu")
core_cmd_table.add_row("exit", "Close session")
core_cmd_table.add_row("clear", "Clear screen")
core_cmd_table.add_row("about", "Program's info")
core_cmd_table.add_row("author", "Developer's info")
syntax = f"{green}logs:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'log(s) management')}")
xprint(logs_cmd_table)
help_sub_cmd_table = Table(show_header=True, header_style=header_title)
help_sub_cmd_table.add_column("Command", style="dim", width=12)
help_sub_cmd_table.add_column("Description")
help_sub_cmd_table.add_row("csv", "List all csv management commands")
help_sub_cmd_table.add_row("logs", "List all logs management commands")
help_sub_cmd_table.add_row("org", "List all organization investigation commands")
help_sub_cmd_table.add_row("user", "List all users investigation commands")
help_sub_cmd_table.add_row("repo", "List all repository investigation commands")
help_sub_cmd_table.add_row("search", "List all target discovery commands")
help_sub_cmd_table.add_row("source", "List all source code download commands (for developers)")
def csvCommand():
csv_cmd_table = Table(show_header=True, header_style=header_title)
csv_cmd_table.add_column("Command", style="dim", width=12)
csv_cmd_table.add_column("Description")
csv_cmd_table.add_row("view", "View csv files")
csv_cmd_table.add_row("read", "Read csv")
csv_cmd_table.add_row("delete", "Delete csv")
syntax = f"{green}csv:<command>{reset}"
xprint(f"{Help.usageText.format(syntax, 'csv management')}")
xprint(csv_cmd_table)
def helpCommand():
core_cmd_table = Table(show_header=True, header_style=header_title)
core_cmd_table.add_column("Command", style="dim", width=12)
core_cmd_table.add_column("Description")
core_cmd_table.add_row("help", "Help menu")
core_cmd_table.add_row("exit", "Close session")
core_cmd_table.add_row("clear", "Clear screen")
core_cmd_table.add_row("about", "Program's info")
core_cmd_table.add_row("author", "Developer's info")
help_sub_cmd_table = Table(show_header=True, header_style=header_title)
help_sub_cmd_table.add_column("Command", style="dim", width=12)
help_sub_cmd_table.add_column("Description")
help_sub_cmd_table.add_row("csv", "List all csv management commands")
help_sub_cmd_table.add_row("logs", "List all logs management commands")
help_sub_cmd_table.add_row("org", "List all organization investigation commands")
help_sub_cmd_table.add_row("user", "List all users investigation commands")
help_sub_cmd_table.add_row("repo", "List all repository investigation commands")
help_sub_cmd_table.add_row("search", "List all target discovery commands")
help_sub_cmd_table.add_row("source", "List all source code download commands (for developers)")
help_sub_cmd_table.add_row("version", "List all version management commands")
syntax = f"{green}help:<command>{reset}"
xprint(core_cmd_table)
xprint(f"\n\n{Help.usageText.format(syntax, 'octosuite')}")
xprint(help_sub_cmd_table)
syntax = f"{green}help:<command>{reset}"
xprint(core_cmd_table)
xprint(f"\n\n{usage_text.format(syntax, 'octosuite')}")
xprint(help_sub_cmd_table)

View File

@@ -1,28 +1,21 @@
"""
logRoller This class is where the main notification strings/messages are held, and are being used in two different
cases (they're being used by logging to be written to log files, and being printed out to the screen).
"""
# LogRoller This class is where the main notification strings/messages are held, and are being used in two different
# cases (they're being used by logging to be written to log files, and being printed out to the screen).
class logRoller:
Ctrl = "Session terminated with {}."
Error = "An error occurred: {}"
sessionOpened = "Opened new session on {}:{}"
sessionClosed = "Session closed at {}."
viewingLogs = "Viewing logs..."
viewingCsv = "Viewing CSV file(s)..."
deletedLog = "Deleted log -> {}"
readingLog = "Reading log -> {}"
readingCsv = 'Reading csv -> {}'
deletedCsv = 'Deleted csv -> {}'
fileDownloading = "Downloading -> {}..."
fileDownloaded = "Downloaded -> downloads/{}"
infoNotFound = "Information not found -> ({} - {} - {})"
repoNotFound = "Repository not found -> ({})"
userNotFound = "User not found -> (@{})"
orgNotFound = "Organization not found -> (@{})"
repoOrUserNotFound = "Repository or user not found -> ({} - @{})"
askLogCsv = "Do you wish to log this output to a .csv file? (Y/n) "
loggedToCsv = "Output logged -> ({})"
loggingSkipped = "Logging skipped -> ({})"
limitInput = "Limit '{}' output to how many? (1-100) "
ctrl_c = "Session terminated with Ctrl+C."
error = "An error occurred: {}"
session_opened = "Opened new session on {}:{}"
session_closed = "Session closed at {}."
viewing_logs = "Viewing logs"
viewing_csv = "Viewing CSV file(s)..."
deleted = "Deleted: {}"
reading = "Reading: {}"
file_downloading = "Downloading: {}"
file_downloaded = "Downloaded: downloads/{}"
info_not_found = "Information not found: {}, {}, {}"
user_not_found = "User not found: @{}"
org_not_found = "Organization not found: @{}"
repo_or_user_not_found = "Repository or User not found: {}, @{}"
prompt_log_csv = "Would you like to log this output to a .csv file?"
logged_to_csv = "Output logged: {}"
limit_output = "Limit '{}' output to how many? (1-100)"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
from octosuite.config import red, white, green, yellow, reset
"""
message prefixes that show what
a notification in OctoSuite might be all about. This might not be very important or necessary in some cases,
but I think it's better to know the severity of the notifications you get in a program.
"""
PROMPT = f"{white}[{green}PROMPT{white}]{reset}"
WARNING = f"{white}[{yellow}WARNING{white}]{reset}"
ERROR = f"{white}[{red}ERROR{white}]{reset}"
POSITIVE = f"{white}[{green}POSITIVE{white}]{reset}"
NEGATIVE = f"{white}[{red}NEGATIVE{white}]{reset}"
INFO = f"{white}[{green}INFO{white}]{reset}"

1103
octosuite/octosuite.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +0,0 @@
from octosuite.colors import red, white, green, reset
"""
SignVar *Even here, I couldn't think of a good name.* The Attributes class holds the signs/symbols that show what
a notification in OctoSuite might be all about. This might not be very important or necessary in some cases,
but I think it's better to know the severity of the notifications you get in a program.
"""
class SignVar:
prompt = f"{white}[{green} ? {white}]{reset}"
warning = f"{white}[{red} ! {white}]{reset}"
error = f"{white}[{red} x {white}]{reset}"
positive = f"{white}[{green} + {white}]{reset}"
negative = f"{white}[{red} - {white}]{reset}"
info = f"{white}[{green} * {white}]{reset}"

View File

@@ -5,16 +5,16 @@ with open("README.md", "r", encoding="utf-8") as file:
setuptools.setup(
name="octosuite",
version="2.2.3",
version="3.0.2",
author="Richard Mwewa",
author_email="rly0nheart@duck.com",
packages=["octosuite"],
description="Advanced Github OSINT Framework",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/rly0nheart/octosuite",
url="https://github.com/bellingcat/octosuite",
license="GNU General Public License v3 (GPLv3)",
install_requires=["requests", "rich"],
install_requires=["requests", "rich", "psutil", "pyreadline3"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Information Technology',
@@ -25,7 +25,7 @@ setuptools.setup(
],
entry_points={
"console_scripts": [
"octosuite=octosuite.main:onStart",
"octosuite=octosuite.main:octosuite",
]
},
)