Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michalswi/github-c2
github API - pull
https://github.com/michalswi/github-c2
command-and-control github-api github-pull go-github golang
Last synced: 3 months ago
JSON representation
github API - pull
- Host: GitHub
- URL: https://github.com/michalswi/github-c2
- Owner: michalswi
- Created: 2023-02-14T12:02:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T13:16:39.000Z (4 months ago)
- Last Synced: 2024-10-25T15:23:53.793Z (4 months ago)
- Topics: command-and-control, github-api, github-pull, go-github, golang
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## github c2 - pull



Use GitHub as a way to store configuration information.
Code is **pulling** file(s) from a GitHub repository to the local file system.Instead of **Classic Tokens** you can use **Fine-grained personal access tokens**. Create a repo (public/private) and generate token (PAT) **only** for this repo. Set `GITHUB_PAT` env variable.
```
export GITHUB_PAT=github_pat_(...)
```Script is downloading all the files to your local catalog (default `/tmp`). If you re-run it will compare SHA1 before downloading. If checksum the same, file won't be downloaded.
Set repository details and local path using env variables:
```
export REPO_OWNER=<>
export REPO_NAME=<>
export BASE_PATH=<>
```
Example:
```
export REPO_OWNER="michalswi"
export REPO_NAME="github-c2"
export BASE_PATH="/tmp"
```