mirror of
https://github.com/bellingcat/octosuite.git
synced 2026-06-08 03:18:35 +03:00
4.8 KiB
4.8 KiB
A framework for gathering open-source intelligence on GitHub users, repositories and organizations
Wiki
Refer to the Wiki for installation instructions, in addition to all other documentation.
Features
- Fetches an organization's profile information
- Fetches an oganization's events
- Returns an organization's repositories
- Returns an organization's public members
- Fetches a repository's information
- Returns a repository's contributors
- Returns a repository's languages
- Fetches a repository's stargazers
- Fetches a repository's forks
- Fetches a repository's releases
- Returns a list of files in a specified path of a repository
- Fetches a user's profile information
- Returns a user's gists
- Returns organizations that a user owns/belongs to
- Fetches a user's events
- Fetches a list of users followed by the target
- Fetches a user's followers
- Checks if user A follows user B
- Checks if user is a public member of an organizations
- Returns a user's subscriptions
- Gets a user's subscriptions
- Gets a user's events
- Searches users
- Searches repositories
- Searches topics
- Searches issues
- Searches commits
- Automatically logs network activity (.logs folder)
- User can view, read and delete logs
- All the above can be used with command-line arguments (PyPI Package only)
- ...And more
Used the following implementation from Somdev Sangwan's Zen to get an email from a username
def findReposFromUsername(username):
response = get('https://api.github.com/users/%s/repos?per_page=100&sort=pushed' % username, auth=HTTPBasicAuth(uname, '')).text
repos = re.findall(r'"full_name":"%s/(.*?)",.*?"fork":(.*?),' % username, response)
nonForkedRepos = []
for repo in repos:
if repo[1] == 'false':
nonForkedRepos.append(repo[0])
return nonForkedRepos
def findEmailFromContributor(username, repo, contributor):
response = get('https://github.com/%s/%s/commits?author=%s' % (username, repo, contributor), auth=HTTPBasicAuth(uname, '')).text
latestCommit = re.search(r'href="/%s/%s/commit/(.*?)"' % (username, repo), response)
if latestCommit:
latestCommit = latestCommit.group(1)
else:
latestCommit = 'dummy'
commitDetails = get('https://github.com/%s/%s/commit/%s.patch' % (username, repo, latestCommit), auth=HTTPBasicAuth(uname, '')).text
email = re.search(r'<(.*)>', commitDetails)
if email:
email = email.group(1)
if breach:
jsonOutput[contributor] = {}
jsonOutput[contributor]['email'] = email
else:
jsonOutput[contributor] = email
return email
def findEmailFromUsername(username):
repos = findReposFromUsername(username)
for repo in repos:
email = findEmailFromContributor(username, repo, username)
if email:
print (username + ' : ' + email)
break
Note
Octosuite automatically logs network and user activity of each session, the logs are saved by date and time in the .logs folder
License
Donations
If you like OctoSuite and would like to show support, you can Buy A Coffee for the developer using the button below
Your support will be much appreciated😊




