Skip to content

Commit

Permalink
Wrote basic code for parsing the configuration file into a 2D array t…
Browse files Browse the repository at this point in the history
…hat can be iterated over during service scans
  • Loading branch information
root committed Feb 14, 2018
1 parent 5de61e4 commit 99c6dd4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions target.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash


#*******************************************************
# Read in service list from file targeter.conf
#*******************************************************
scanlist=()
for line in $(eval cat ./targeter.conf);
do
scan=()
scan+=($(echo $line | cut -d"=" -f1));
#scanlist+=" "
scan+=($(echo $line | cut -d"=" -f2));
scanlist+=($scan)
done

#echo ${scanlist[0]};
for scan in "${scanlist[@]}";
do
echo "${scan[0]} ${scan[1]}";
done
4 changes: 4 additions & 0 deletions targeter.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ICMP=None
SSH=22
HTTP=80
HTTPS=443

0 comments on commit 99c6dd4

Please sign in to comment.