Skip to content

Commit

Permalink
Merge pull request #27 from x1mdev/dev/cleanup
Browse files Browse the repository at this point in the history
clean up
  • Loading branch information
x1mdev authored Oct 26, 2018
2 parents 82de07d + 826997a commit 619c14f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ __________ __________.__
| | \ ___/\ \__( <_> ) | \ | | |
|____|_ /\___ >\___ >____/|___| /____| |__|
\/ \/ \/ \/
v1.0.0 - by @x1m_martijn
v1.0.1 - by @x1m_martijn
```

ReconPi - A lightweight recon tool that performs extensive domain scanning with the latest tools using a Raspberry Pi and GO. After the installation the ReconPi only needs a WiFi connection and some power, easy does it.
Expand Down Expand Up @@ -73,4 +73,5 @@ Output is written to http://192.168.2.16:4000 (replace with your own ReconPi add
- Switched base OS: [Hypriot OS](https://blog.hypriot.com/downloads/), Docker ships by default.
- Made a few changes to `install.sh` to get all the requirements needed for `recon.sh`
- Finished the curl POST request call to show data on the dashboard.
- Tested the `install.sh` and `recon.sh` scripts on a freshly installed RPi + Hypriot OS.
- Tested the `install.sh` and `recon.sh` scripts on a freshly installed RPi + Hypriot OS.
- Added cleanup function
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
YELLOW="\033[1;33m"
GREEN="\033[0;32m"
RESET="\033[0m"
VERSION="1.0.0"
VERSION="1.0.1"


: 'Display the logo'
Expand Down Expand Up @@ -117,13 +117,14 @@ docker build --rm -t subdomaindb .;
cd $HOME/tools/ || return;

echo -e "[$GREEN+$RESET] Cleaning up..";
# Probably going to create functions for this script too
displayLogo;
cd "$HOME" || return;
touch motd
displayLogo >> motd;
sudo mv $HOME/motd /etc/motd;
cd $HOME || return;
rm go1.10.3.linux-armv6l.tar.gz;
rm go1.11.1.linux-armv6l.tar.gz;
rm install.sh;
echo -e "[$GREEN+$RESET] Installation script finished! System will reboot to finalize installation.";
sleep 1;
Expand Down
20 changes: 16 additions & 4 deletions recon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GREEN="\033[0;32m"
RESET="\033[0m"
ROOT="$HOME/bugbounty"
FILE=`basename "$0"`
VERSION="1.0.0"
VERSION="1.0.1"


: 'Display the logo'
Expand Down Expand Up @@ -62,8 +62,6 @@ runSubfinder()
echo -e "[$GREEN+$RESET] Subfinder finished! Writing (sub)domains to $GREEN$ROOT/$1/domains.txt$RESET."
touch $ROOT/$1/domains.txt
cat $ROOT/$1/$1.txt | grep -P "([A-Za-z0-9]).*$1" >> $ROOT/$1/domains.txt

rm -rf $ROOT/$1/$1.txt
}

: 'Check if host is online, then print it'
Expand All @@ -89,6 +87,7 @@ checkDomainStatus()
: 'Run MassDNS on the given domains'
runMassDNS()
{
# something is up with this
echo -e "[$GREEN+$RESET] Starting MassDNS now!"
massdns -r $HOME/tools/massdns/lists/resolvers.txt -t A -o S -w $ROOT/$1/massdns.txt $ROOT/$1/resolved-domains.txt
echo -e "[$GREEN+$RESET] Done!"
Expand Down Expand Up @@ -117,6 +116,17 @@ startDashboard()

}

: 'Clean up'
cleanup()
{
# TODO: Check if there are more useless files
echo -e "[$GREEN+$RESET] Cleaning up.."
rm $ROOT/$1/$1.txt
rm $ROOT/$1/domains-striped.txt
sleep 1
echo -e "[$GREEN+$RESET] Done, ready for the next scan!"
}

: 'Execute the main functions'
displayLogo
checkArguments "$1"
Expand All @@ -125,4 +135,6 @@ runSubfinder "$1"
checkDomainStatus "$1"
#runMassDNS "$1" # something is up with massdns
convertDomainsFile "$1"
startDashboard "$1"
startDashboard "$1"
cleanup "$1"
# Maybe create a cleanup function

0 comments on commit 619c14f

Please sign in to comment.