Many times I simply need the number of people in an AD group. There are two ways of doing this (and probably a lot more) that I have done this. One way is to define an object and then assign the output of getting the members from a group to the object, and then getting…
Category: Uncategorized
JQ Searching for X.509 Certs
When parsing through bro log files, the bro-cut command was simple. But now that files are being written in JSON format, it ain’t so easy. At least for me, as I can’t find any good resources yet on querying these files. But I have found a work around. So this is the example. I want…
IPMI Finding the IP
If you are ever in need of finding the management cards IP address on a Linux box and have access to the OS, you can simply get it by running Of course, you need to run this with elevated privledges.
Searching for User Agent String
Let’s say you have a log file that is of your web traffic and you are collecting a lot of things including user agent strings; such as And let’s say you want to just get the user agent string in each connection and get a count or do something else with it. You can use…
AWK Functions
You can use AWK to convert a file to lowercase or uppercase. For example you can run to print out all of the content of the file but print it out as lowercase.
Unique Sort
I used to use the “uniq” command to get a unique count of output, usually after sort. However the command takes care of that for you!
Cut
cut can be used to pull out parts of a file. You can use many different options on how to parse it out. You can do it by character or by delimeter and more. For example would cut with the first field, as identified by the delimeter of a space.
Helpful Blog Sites
The following are some sites that I have stumbled upon that have some good information: http://robwillis.info/ http://rickardnobel.se/
Adding code to Blog Post
I switched my hosting provider recently, and lost the ability to easily post code into my blog posts. I came across this page https://en.support.wordpress.com/code/posting-source-code/ and added this plugin to my new site and love it. It’s added a lot of flexibility and formatting tools to help me post my thoughts!