cyj@cyj-virtual-machine:~/桌面$ wget https://github.com/zricethezav/gitleaks/releases/download/v6.2.0/gitleaks-linux-amd64
--2023-04-26 15:13:56-- https://github.com/zricethezav/gitleaks/releases/download/v6.2.0/gitleaks-linux-amd64
正在解析主机 github.com (github.com)... 20.205.243.166
正在连接 github.com (github.com)|20.205.243.166|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
位置:https://github.com/gitleaks/gitleaks/releases/download/v6.2.0/gitleaks-linux-amd64 [跟随至新的 URL]
--2023-04-26 15:13:57-- https://github.com/gitleaks/gitleaks/releases/download/v6.2.0/gitleaks-linux-amd64
再次使用存在的到 github.com:443 的连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:https://objects.githubusercontent.com/github-production-release-asset-2e65be/119190187/5d051180-1ded-11eb-9c47-734979b5ea81?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230426%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230426T071357Z&X-Amz-Expires=300&X-Amz-Signature=bd28a70663f2b9dbe5f0e6b7f5d9997e8b19cfe8913823f5d624ae44090e8ab1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=119190187&response-content-disposition=attachment%3B%20filename%3Dgitleaks-linux-amd64&response-content-type=application%2Foctet-stream [跟随至新的 URL]
--2023-04-26 15:13:57-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/119190187/5d051180-1ded-11eb-9c47-734979b5ea81?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230426%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230426T071357Z&X-Amz-Expires=300&X-Amz-Signature=bd28a70663f2b9dbe5f0e6b7f5d9997e8b19cfe8913823f5d624ae44090e8ab1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=119190187&response-content-disposition=attachment%3B%20filename%3Dgitleaks-linux-amd64&response-content-type=application%2Foctet-stream
正在解析主机 objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
正在连接 objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 12243254 (12M) [application/octet-stream]
正在保存至: “gitleaks-linux-amd64”
gitleaks-linux-amd6 100%[===================>] 11.68M 3.21MB/s 用时 4.1s
2023-04-26 15:14:02 (2.82 MB/s) - 已保存 “gitleaks-linux-amd64” [12243254/12243254])
cyj@cyj-virtual-machine:~/桌面$ ls
gitleaks_8.16.3_linux_x64.tar.gz gitleaks-linux-amd64
cyj@cyj-virtual-machine:~/桌面$ mv gitleaks-linux-amd64 gitleaks
cyj@cyj-virtual-machine:~/桌面$ sudo chmod +x gitleaks
[sudo] cyj 的密码:
cyj@cyj-virtual-machine:~/桌面$ mv gitleaks /usr/bin/
mv: 无法将'gitleaks' 移动至'/usr/bin/gitleaks': 权限不够
cyj@cyj-virtual-machine:~/桌面$ su root
密码:
root@cyj-virtual-machine:/home/cyj/桌面# mv gitleaks /usr/bin
root@cyj-virtual-machine:/home/cyj/桌面# gitleaks --help
Usage:
gitleaks [OPTIONS]
Application Options:
-v, --verbose Show verbose output from scan
-r, --repo= Target repository
--config= config path
--disk Clones repo(s) to disk
--version version number
--username= Username for git repo
--password= Password for git repo
--access-token= Access token for git repo
--files-at-commit= sha of commit to scan all files at commit
--threads= Maximum number of threads gitleaks spawns
--ssh-key= path to ssh key used for auth
--uncommitted run gitleaks on uncommitted code
--repo-path= Path to repo
--owner-path= Path to owner directory (repos discovered)
--branch= Branch to scan
--report= path to write json leaks file
--report-format= json, csv, sarif (default: json)
--redact redact secrets from log messages and leaks
--debug log debug messages
--repo-config Load config from target repo. Config file must be
".gitleaks.toml" or "gitleaks.toml"
--pretty Pretty print json if leaks are present
--commit= sha of commit to scan or "latest" to scan the last
commit of the repository
--commits= comma separated list of a commits to scan
--commits-file= file of new line separated list of a commits to scan
--commit-from= Commit to start scan from
--commit-to= Commit to stop scan
--commit-since= Scan commits more recent than a specific date. Ex:
'2006-01-02' or '2006-01-02T15:04:05-0700' format.
--commit-until= Scan commits older than a specific date. Ex:
'2006-01-02' or '2006-01-02T15:04:05-0700' format.
--timeout= Time allowed per scan. Ex: 10us, 30s, 1m, 1h10m1s
--depth= Number of commits to scan
--include-deletion Scan for patch deletions in addition to patch
additions
--host= git hosting service like gitlab or github. Supported
hosts include: Github, Gitlab
--baseurl= Base URL for API requests. Defaults to the public
GitLab or GitHub API, but can be set to a domain
endpoint to use with a self hosted server.
--org= organization to scan
--user= user to scan
--pr= pull/merge request url
--exclude-forks scan excludes forks
Help Options:
-h, --help Show this help message
maintaining gitleaks takes a lot of work so consider sponsoring me or donating a little something
❤️ https://github.com/sponsors/zricethezav
https://www.paypal.me/zricethezav
₿ btc:3GndEzRZa6rJ8ZpkLureUcc5TDHMYfpDxn
root@cyj-virtual-machine:/home/cyj/桌面#