Skip to content

Commit

Permalink
Merge pull request #2 from adysec/main
Browse files Browse the repository at this point in the history
更新获取工具方式
  • Loading branch information
Autumn-27 authored Jun 13, 2024
2 parents 953b7b7 + 203de58 commit 8edbd0a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Daily Update ARL Tools

on:
push:
branches:
- main
schedule:
- cron: '0 12 * * *'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Mkdir Tools
run: mkdir tools
- name: Update Ksubdomain
run: |
wget https://github.com/boy-hack/ksubdomain/releases/download/v1.9.5/KSubdomain-v1.9.5-linux.tar
tar xvf KSubdomain-v1.9.5-linux.tar
rm -rf KSubdomain-v1.9.5-linux.tar
mv ksubdomain tools/ksubdomain
- name: Update rad
run: |
wget https://github.com/chaitin/rad/releases/download/1.0/rad_linux_amd64.zip
unzip rad_linux_amd64.zip
rm -rf rad_linux_amd64.zip
mv rad_linux_amd64 tools/rad_linux_amd64
- name: Commit and Push changes
run: |
echo $(date +'%Y%m%d') > date.txt
git add .
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "$(date +'%Y%m%d')"
git push -v --progress
1 change: 1 addition & 0 deletions date.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20240613
6 changes: 3 additions & 3 deletions pkg/system/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func SetUp() bool {
SensRegChan = make(chan struct{}, 50)
CrawlerThreadNow = 0
VERSION = "1.2"
UpdateUrl = "https://update.scope-sentry.top"
UpdateUrl = "https://raw.githubusercontent.com/Autumn-27/ScopeSentry/main/tools/"
PocList = make(map[string]types.PocData)
dbFlag := InitDb()
if !dbFlag {
Expand Down Expand Up @@ -241,7 +241,7 @@ func checkKsubdomain() bool {
KsubdomainPath = filepath.Join(ExtPath, "ksubdomain")
KsubdomainExecPath = filepath.Join(KsubdomainPath, path)
if _, err := os.Stat(KsubdomainExecPath); os.IsNotExist(err) {
resp, err := http.Get(fmt.Sprintf("%s/get/ksubdomain?system=%s&arch=%s", UpdateUrl, osType, runtime.GOARCH))
resp, err := http.Get(fmt.Sprintf("%s/get/ksubdomain", UpdateUrl))
if err != nil {
SlogError(fmt.Sprintf("Error: %s", err))
return false
Expand Down Expand Up @@ -344,7 +344,7 @@ func checkCrawler() bool {
CrawlerPath = filepath.Join(ExtPath, "rad")
CrawlerExecPath = filepath.Join(radPath, path)
if _, err := os.Stat(CrawlerExecPath); os.IsNotExist(err) {
resp, err := http.Get(fmt.Sprintf("%s/get/rad?system=%s&arch=%s", UpdateUrl, osType, runtime.GOARCH))
resp, err := http.Get(fmt.Sprintf("%s/get/rad", UpdateUrl))
if err != nil {
SlogError(fmt.Sprintf("Error: %s", err))
return false
Expand Down
Binary file added tools/ksubdomain
Binary file not shown.
Binary file added tools/rad_linux_amd64
Binary file not shown.

0 comments on commit 8edbd0a

Please sign in to comment.