Skip to content

Commit

Permalink
adding new url and user agent file
Browse files Browse the repository at this point in the history
  • Loading branch information
jullrich committed Sep 24, 2023
1 parent 9128280 commit de54342
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/commonurls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
phpMyAdmin
phpmyadmin
/master/.env
/.env
/GponForm/diag_Form
/wp-admin/
/wp-content/
8 changes: 8 additions & 0 deletions bin/newurls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
find /srv/db/ -name 'webhoneypot*json' -ctime +0 -exec jq .url {} \; | grep -F -f commonurls.txt -v | sort -u > /tmp/oldurls
find /srv/db/ -name 'webhoneypot*json' -ctime 0 -exec jq .url {} \; | grep -F -f commonurls.txt -v | sort -u > /tmp/newurls
comm -13 /tmp/oldurls /tmp/newurls > /tmp/diffurls
find /srv/db/ -name 'webhoneypot*json' -ctime 0 -exec jq '.url' {} \; | grep -F -f /tmp/diffurls | sort | uniq -c | sort -n > /tmp/newurlcount
rm /tmp/oldurls /tmp/newurls /tmp/diffurls
echo "see /tmp/newurlcount for results"

7 changes: 7 additions & 0 deletions bin/newuseragents.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
find /srv/db/ -name 'webhoneypot*json' -ctime +0 -exec jq '.useragent' {} \; | sort -u > /tmp/olduas
find /srv/db/ -name 'webhoneypot*json' -ctime 0 -exec jq '.useragent' {} \; | sort -u > /tmp/newuas
comm -13 /tmp/olduas /tmp/newuas > /tmp/diffuas
find /srv/db/ -name 'webhoneypot*json' -ctime 0 -exec jq '.useragent' {} \; | grep -F -f /tmp/diffuas | sort | uniq -c | sort -n > /tmp/newuacount
rm /tmp/olduas /tmp/newuas /tmp/diffuas
echo "see /tmp/newuacount for results"

0 comments on commit de54342

Please sign in to comment.