Skip to content

Commit dca8d33

Browse files
committed
ffufPostprocess part2
1 parent 0f5c006 commit dca8d33

File tree

3 files changed

+54
-42
lines changed

3 files changed

+54
-42
lines changed

.github/workflows/docker_nightly.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
name: ci
22

3+
permissions:
4+
contents: read
5+
packages: write
6+
id-token: write
7+
38
on:
49
release:
510
types:
6-
- 'published'
11+
- published
712
# push:
8-
# branches:
9-
# - 'master'
10-
# - 'main'
13+
# branches:
14+
# - 'master'
15+
# - 'main'
1116
schedule:
12-
- cron: '0 2 * * *' # run at 2 AM UTC
13-
17+
- cron: 0 2 * * * # run at 2 AM UTC
18+
1419
jobs:
1520
docker:
1621
runs-on: ubuntu-latest
1722
steps:
18-
-
19-
name: Set up QEMU
23+
- name: Set up QEMU
2024
uses: docker/setup-qemu-action@v1
21-
-
22-
name: Set up Docker Buildx
25+
- name: Set up Docker Buildx
2326
uses: docker/setup-buildx-action@v1
24-
-
25-
name: Login to DockerHub
26-
uses: docker/login-action@v1
27+
- name: Login to DockerHub
28+
uses: docker/login-action@v1
2729
with:
2830
username: ${{ secrets.DOCKERHUB_USERNAME }}
2931
password: ${{ secrets.DOCKERHUB_TOKEN }}
30-
-
31-
uses: actions/checkout@v2
32-
-
33-
name: Build and push
32+
- uses: actions/checkout@v2
33+
- name: Build and push
3434
id: docker_build
3535
uses: docker/build-push-action@v2
3636
with:

.github/workflows/tests.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
name: tests
22

3+
permissions:
4+
contents: read
5+
issues: write
6+
pull-requests: write
7+
actions: read
8+
checks: read
9+
deployments: read
10+
discussions: read
11+
packages: read
12+
repository-projects: read
13+
security-events: read
14+
statuses: read
15+
316
on: [push, pull_request]
417

518
jobs:
@@ -10,7 +23,7 @@ jobs:
1023
os:
1124
- ubuntu-20.04
1225
- ubuntu-22.04
13-
- ubuntu-24.04
26+
- ubuntu-latest
1427

1528
name: ${{ matrix.os }}
1629
runs-on: ${{ matrix.os }}

reconftw.sh

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
# Welcome to reconFTW main script
44
# ██▀███ ▓█████ ▄████▄ ▒█████ ███▄ █ █████▒▄▄▄█████▓ █ █░
@@ -336,7 +336,7 @@ function github_dorks() {
336336
}
337337

338338
function github_repos() {
339-
mkdir -p .tmp
339+
mkdir -p osint
340340

341341
if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $GITHUB_REPOS == true ]] && [[ $OSINT == true ]]; then
342342
start_func "${FUNCNAME[0]}" "Github Repos analysis in process"
@@ -1091,6 +1091,8 @@ function sub_tls() {
10911091
fi
10921092
fi
10931093

1094+
touch .tmp/subdomains_tlsx_resolved.txt
1095+
10941096
if ! NUMOFLINES=$(anew subdomains/subdomains.txt <.tmp/subdomains_tlsx_resolved.txt | sed '/^$/d' | wc -l); then
10951097
printf "%b[!] Counting new subdomains failed.%b\n" "$bred" "$reset"
10961098
return 1
@@ -2643,6 +2645,8 @@ function webprobe_simple() {
26432645
fi
26442646
fi
26452647

2648+
touch .tmp/probed_tmp.txt
2649+
26462650
# Count new websites
26472651
if ! NUMOFLINES=$(anew webs/webs.txt <.tmp/probed_tmp.txt 2>/dev/null | sed '/^$/d' | wc -l); then
26482652
printf "%b[!] Failed to count new websites.%b\n" "$bred" "$reset"
@@ -3092,7 +3096,6 @@ function portscan() {
30923096
nmapurls <hosts/portscan_active.xml 2>>"$LOGFILE" | anew -q hosts/webs.txt
30933097
fi
30943098

3095-
30963099
if [[ $FARADAY == true ]]; then
30973100
# Check if the Faraday server is running
30983101
if ! faraday-cli status 2>>"$LOGFILE" >/dev/null; then
@@ -3104,7 +3107,6 @@ function portscan() {
31043107
fi
31053108
fi
31063109

3107-
31083110
if [[ -s "hosts/webs.txt" ]]; then
31093111
if ! NUMOFLINES=$(wc -l <hosts/webs.txt); then
31103112
printf "%b[!] Failed to count lines in hosts/webs.txt.%b\n" "$bred" "$reset"
@@ -3379,32 +3381,29 @@ function fuzz() {
33793381
for sub in $(cat webs/webs_all.txt); do
33803382
sub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')
33813383

3382-
pushd "${tools}/ffufPostprocessing" >/dev/null || {
3383-
echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"
3384-
}
3385-
./ffufPostprocessing -result-file $dir/.tmp/fuzzing/${sub_out}.json -overwrite-result-file 2>>"$LOGFILE" >/dev/null
3386-
popd >/dev/null || {
3387-
echo "Failed to popd in ${FUNCNAME[0]} @ line ${LINENO}"
3388-
}
3384+
# pushd "${tools}/ffufPostprocessing" >/dev/null || {
3385+
# echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"
3386+
# }
3387+
# ./ffufPostprocessing -result-file $dir/.tmp/fuzzing/${sub_out}.json -overwrite-result-file 2>>"$LOGFILE" >/dev/null
3388+
# popd >/dev/null || {
3389+
# echo "Failed to popd in ${FUNCNAME[0]} @ line ${LINENO}"
3390+
# }
33893391

33903392
[ -s "$dir/.tmp/fuzzing/${sub_out}.json" ] && cat $dir/.tmp/fuzzing/${sub_out}.json | jq -r 'try .results[] | "\(.status) \(.length) \(.url)"' | sort -k1 | anew -q $dir/fuzzing/${sub_out}.txt
33913393
done
33923394
find $dir/fuzzing/ -type f -iname "*.txt" -exec cat {} + 2>>"$LOGFILE" | sort -k1 | anew -q $dir/fuzzing/fuzzing_full.txt
33933395
else
3394-
axiom-exec "mkdir -p /home/op/lists/seclists/Discovery/Web-Content/" &>/dev/null
3395-
axiom-exec "wget -q -O - ${fuzzing_remote_list} > /home/op/lists/fuzz_wordlist.txt" &>/dev/null
3396-
axiom-exec "wget -q -O - ${fuzzing_remote_list} > /home/op/lists/seclists/Discovery/Web-Content/big.txt" &>/dev/null
3397-
axiom-scan webs/webs_all.txt -m ffuf_base -H "${HEADER}" $FFUF_FLAGS -s -maxtime $FFUF_MAXTIME -o $dir/.tmp/ffuf-content.json $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null
3398-
pushd "${tools}/ffufPostprocessing" >/dev/null || {
3399-
echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"
3400-
}
3401-
[ -s "$dir/.tmp/ffuf-content.json" ] && ./ffufPostprocessing -result-file $dir/.tmp/ffuf-content.json -overwrite-result-file 2>>"$LOGFILE" >/dev/null
3402-
popd >/dev/null || {
3403-
echo "Failed to popd in ${FUNCNAME[0]} @ line ${LINENO}"
3404-
}
3396+
axiom-scan webs/webs_all.txt -m ffuf -wL ${fuzzing_remote_list} -H "${HEADER}" $FFUF_FLAGS -s -maxtime $FFUF_MAXTIME -o $dir/.tmp/ffuf-content.json $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null
3397+
# pushd "${tools}/ffufPostprocessing" >/dev/null || {
3398+
# echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"
3399+
# }
3400+
# [ -s "$dir/.tmp/ffuf-content.json" ] && ./ffufPostprocessing -result-file $dir/.tmp/ffuf-content.json -overwrite-result-file 2>>"$LOGFILE" >/dev/null
3401+
# popd >/dev/null || {
3402+
# echo "Failed to popd in ${FUNCNAME[0]} @ line ${LINENO}"
3403+
# }
34053404
for sub in $(cat webs/webs_all.txt); do
34063405
sub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')
3407-
[ -s "$dir/.tmp/ffuf-content.json" ] && cat .tmp/ffuf-content.json | jq -r 'try .results[] | "\(.status) \(.length) \(.url)"' | grep $sub | sort -k1 | anew -q fuzzing/${sub_out}.txt
3406+
[ -s "$dir/.tmp/ffuf-content.json" ] && cat $dir/.tmp/ffuf-content.json | grep $sub | sort -k1 | anew -q fuzzing/${sub_out}.txt
34083407
done
34093408
find $dir/fuzzing/ -type f -iname "*.txt" -exec cat {} + 2>>"$LOGFILE" | sort -k1 | anew -q $dir/fuzzing/fuzzing_full.txt
34103409
fi
@@ -6122,7 +6121,7 @@ function help() {
61226121

61236122
# macOS PATH initialization, thanks @0xtavian <3
61246123
if [[ $OSTYPE == "darwin"* ]]; then
6125-
if ! command -v brew &> /dev/null; then
6124+
if ! command -v brew &>/dev/null; then
61266125
printf "\n%bBrew is not installed or not in the PATH.%b\n\n" "$bred" "$reset"
61276126
exit 1
61286127
fi

0 commit comments

Comments
 (0)