![]() |
[Fremantle] msscan / mon-toggle / battlow.sh
So... I use my N900 primarily as PMP, VNC client and pentesting device these days. Here's a couple of scripts I cobbled together to make things easier.
# msscan | DOWNLOAD Comprises of two simple yet useful shell scripts: msscan and msexploit. msscan relies on nmap in order to scan network for MS08_067 vulnerability. Don't use nmap 5.59BETA1 from extras-testing; use either 5.50 from extras or this one (hastily compiled & packaged 6.20BETA1). Usage (either as user with sudo and full path or as root): msscan - scans the network you're currently connected to msscan 192.168.1.0/24 - scans specified network msscan 192.168.1.18 - scans single machine msexploit runs Metasploit framework targetting specified machine with MS08_067 exploit. It assumes framework is located in /opt/msf. Any version should work, I currently use 4.2.0. I suggest to thin out exploits dir to only include essential things, it will take ages to load the modules tree otherwise. Usage (doesn't need root): msexploit 192.168.1.18 # mon-toggle | DOWNLOAD Tapping on the icon loads/unloads packet injection modules (assumed to reside in /opt/packet-injection-modules/`uname -a`/) and toggles monitor mode. If you have aircrack suite installed it uses airmon-ng start wlan0, if not - iwconfig wlan0 mode monitor. Originally the icon changed to reflect current state of interface but - as it would tend to wear out emmc (writing to .desktop file, gtk-icon-cache-update on each occasion) - I decided to drop it. # battlow.sh Sometimes I don't use my N900 for a long time, so I made it drop me a line when it's hungry (with a little help of Alarmed): #!/bin/sh JUICE=`lshal | grep charge_level.percentage | cut -d ' ' -f 5` CHARGING=`lshal | grep maemo.rechargeable.charging_status | cut -d ' ' -f 5` UNLOCKED=`dbus-send --system --print-reply --dest=com.nokia.mce --type=method_call /com/nokia/mce/request com.nokia.mce.request.get_tklock_mode | grep unlocked` if [ $JUICE -lt 9 ] && [ $CHARGING = "'off'" ] && [ -z $UNLOCKED ]; then USERNAME=your_usernamefi |
Re: [Fremantle] msscan / mon-toggle / battlow.sh
One more thing. Handy if you don't need your N900 to be online at all times and, in fact, prefer it to be mostly offline (except when you actually use it hands-on). It activates offline mode on device lock -- unless there's wlan/gprs connection active or bluetooth is on -- and reverts to normal mode on device unlock. Relies on dbus-scripts.
/etc/dbus-scripts.d/tklock: Code:
/usr/sbin/offline * * com.nokia.mce.signal tklock_mode_ind locked Code:
#!/bin/sh Code:
#!/bin/sh |
All times are GMT. The time now is 10:37. |
vBulletin® Version 3.8.8