https://github.com/0x4f53/github-patches
scrape a timeframe of commits pushed to github (and grab their patch files)
https://github.com/0x4f53/github-patches
blackhat github golang osint recon-tools reconnaissance
Last synced: 4 months ago
JSON representation
scrape a timeframe of commits pushed to github (and grab their patch files)
- Host: GitHub
- URL: https://github.com/0x4f53/github-patches
- Owner: 0x4f53
- License: gpl-3.0
- Created: 2024-10-14T11:24:32.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T07:48:24.000Z (12 months ago)
- Last Synced: 2024-10-24T09:53:27.905Z (12 months ago)
- Topics: blackhat, github, golang, osint, recon-tools, reconnaissance
- Language: Go
- Homepage: https://pkg.go.dev/github.com/0x4f53/github-patches
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-patches
does what is says on the tin
this tool helps you scrape commit metadata pushed to github (and grab their patch files) in a given time range using the github api. It returns the patch URL, repo type and more!
# Usage
```bash
cd github-patches-cli/go run main.go -h
Usage of ./github-patches:
-from string
Starting timestamp in '2006-01-02-15' format
-outputDir string
the directory to save files to. 'githubCommits/' will be made locally if not specified (default ".githubCommits/")
-to string
Ending timestamp in '2006-01-02-15' format
```# Examples
**Note:** use the `--concurrent` flag to download files concurrently (at the same time!)
### Patches from the last hour
```bash
go run main.gocat .githubCommits/2024-10-14-15.json
{"id":"42807516937","type":"IssuesEvent","actor":{"id":41898282,"login":"github-actions[bot]","display_login":"github-actions","gravatar_id":"","url":"https://api.github.com/users/github-actions[bot]","avatar_url":"https://avatars.githubusercontent.com/u/41898282?"},"repo":{"id":859486274,"name":"leyu-sports/leyuio","url":"https://api.github.com/repos/leyu-sports/leyuio"},"payload":{"action":"opened","issue":{"url":"https://api.github...
{"id":"42807516940","type":"IssuesEvent","actor":{"id":41898282,"login":"github-actions[bot]","display_login":"github-actions","gravatar_id":"","url":"https://api.github.com/users/github-actions[bot]","avatar_url":"https://avatars.githubusercontent.com/u/41898282?"},"repo":{"id":869028658,"name":"long8guoji/long8ty","url":"https://api.github.com/repos/long8guoji/long8ty"},"payload":{"action":"opened","issue":{"url":"https://api.github.com/repos/long8guoji/long8ty/issues/34119","repository_url":"https://api.github.com/repos/long8guoji/long8ty",...
...
```### Patches from October 14, 2024 at 3 PM UTC to October 15, 2024 at 2 AM
```bash
go run main.go --from=2024-10-14-15 --to=2024-10-15-2cat .githubCommits/2024-10-14-15.json
{"id":"42807516937","type":"IssuesEvent","actor":{"id":41898282,"login":"github-actions[bot]",...
...
```### Patches for a single timestamp
```bash
go run main.go --from=2024-10-14-15 --to=2024-10-14-15cat .githubCommits/2024-10-14-15.json
{"id":"42807516937","type":"IssuesEvent","actor":{"id":41898282,"login":"github-actions[bot]",...
...
```### Patches from October 15, 2024 at 2 AM to October 14, 2024 at 3 PM UTC (in reverse)
```bash
go run main.go --to=2024-10-14-15 --from=2024-10-15-2cat .githubCommits/2024-10-15-2.json
{"id":"42807516937","type":"IssuesEvent","actor":{"id":41898282,"login":"github-actions[bot]",...
...
```