Monthly Archives: July 2011

Tshark command to show user agents

This is handy when looking at http traffic on an IDS: tshark -Y http.user_agent -T fields -e http.user_agent

Posted in Linux Shell Scripts | Leave a comment

Netsh command to dump firewall rules

A quick netsh command to dump out your firewall rules: netsh advfirewall firewall show rule name=all

Posted in NT Shell Scripts | 1 Comment

Active Directory Last Logon Time

This script retreives the LastLogon Active Directory attribute for a user and returns the date in human readable format. Note the script takes the users CN rather than samid or UPN, which in some cases can be different. If Wscript.Arguments.Count … Continue reading

Posted in VBscript | Leave a comment

Site Move Completed

I have finished moving my posts over from Serendipity on my irobx.net site over to cloud based WordPress site. Yes, I have moved to the cloud. I can just feel the ROI flooding in. Not to say the process was … Continue reading

Posted in Uncategorized | Leave a comment

Read Grep exit codes

for x in `cat /tmp/t1.txt` do grep -q $x /tmp/t.txt if [[ $? -ne 0 ]] then echo $x fi done

Posted in Linux Shell Scripts | Leave a comment

SED one-liner to comment out all lines containing a string

sed -i ‘s/.*ET P2P.*/#&/g’ /etc/suricata/rules/emerging-all.rules

Posted in Linux Shell Scripts | Leave a comment