Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- github, all_repos = __import__('tortilla').wrap('https://api.github.com'), set()
- for i in range(1000):
- all_repos += set([result.repository.full_name for result in github.search.code.get(params=dict(q='filename:id_rsa path:.ssh', per_page=100, page=1}).items]))
- for repo in all_repos:
- github.repos(repo).issues.post(data=dict(title='SSH Private Keys found in this repository', body='We found SSH private keys publicly available in your repository. \n\nThis is an automated ticket created to warn you of the dangers of sharing your private keys'), headers=dict(token='my_github_api_key'))
Advertisement
Add Comment
Please, Sign In to add comment