Skip to content

Commit

Permalink
Update sendips.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
smilebasti committed Nov 25, 2022
1 parent ecd8e07 commit 03bfbf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sendips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tail -f /logs/proxy-host*access.log | grep --line-buffered -E "([0-9]{1,3}[\.]){

do
#Domain or subdomain gets found. only de/net/org/com
targetdomain=`echo $line | grep -m 1 -o -E "([a-z0-9\-]*\.){1,3}?[a-z0-9\-]*\.(de|net|org|com)" | head -1`
targetdomain=`echo $line | grep -m 1 -o -E "([a-z0-9\-]*\.){1,3}?[a-z0-9\-]*\.[A-Za-z]{2,6}" | head -1`

#Get the first ip found = outsideip
# head -1 because grep finds two (sometimes three) and only the first is needed
Expand Down

0 comments on commit 03bfbf4

Please sign in to comment.