-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
59 lines (56 loc) · 2.17 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: "Subdomain finding using subfinder"
author: "v1dhun"
description: "Subfinder is a subdomain discovery tool developed by ProjectDiscovery.io."
branding:
icon: "alert-circle"
color: "blue"
inputs:
domains-list:
description: "List of domains to run subfinder"
required: true
telegram-chat-id:
description: "Telegram chat id to send notifications"
required: false
telegram-token:
description: "Telegram bot token to send notifications"
required: false
check-alive:
description: "To check host is alive or not using httpx"
required: false
default: "false"
config-list:
description: "Configuration file for API Keys, etc"
required: false
default: "config.yaml"
runs:
using: "composite"
steps:
- run: |
curl -o httpx_1.0.3_linux_amd64.tar.gz -L -s https://github.com/projectdiscovery/httpx/releases/download/v1.0.3/httpx_1.0.3_linux_amd64.tar.gz
curl -o subfinder_2.4.5_linux_amd64.tar.gz -L -s https://github.com/projectdiscovery/subfinder/releases/download/v2.4.5/subfinder_2.4.5_linux_amd64.tar.gz
tar -xf subfinder_2.4.5_linux_amd64.tar.gz
tar -xf httpx_1.0.3_linux_amd64.tar.gz
rm *amd64.tar.gz
shell: bash
- run: ./subfinder -config ${{ inputs.config-list }} -t 50 -dL ${{ inputs.domains-list }} --silent -nW -o hosts.txt
shell: bash
- run: |
if [ ${{ inputs.check-alive }} == "true" ]
then
./httpx -l hosts.txt -silent -timeout 2 -threads 50 -retries 2 -o alive.txt
fi
shell: bash
- run: |
if [ ! -z ${{ inputs.telegram-chat-id }} ]
then
if [ ! -z ${{ inputs.telegram-token }} ]
then
curl -s -o send.sh "https://gist.githubusercontent.com/v1dhun/afc70dd11f93d0c6393fa3c5573ee669/raw/127bae54feb0a707b4598ad9755358e5c6abdee7/send.sh"
bash send.sh ${{ inputs.telegram-chat-id }} ${{ inputs.telegram-token }} "hosts.txt" "Subfinder result"
if [ ${{ inputs.check-alive }} == "true" ]
then
bash send.sh ${{ inputs.telegram-chat-id }} ${{ inputs.telegram-token }} "alive.txt" "Alive domains result"
fi
fi
fi
shell: bash