Categories
Perl

Extract IPv4 Address From Text Using Perl

I had a list of IP address and wanted to know what they were – but I didn’t want to do a DNS lookup by hand on each. The list I had was really a chunk of text with IPv4 addresses all over in it. Here is how I extracted them for the report:

Categories
Check Point

Check Point SPLAT Commands

This is a list of several Check Point SPLAT commands that I use frequently. Perhaps this CLI tip sheet for Secure Platform is useful to you too:

Categories
Check Point

Check Point VPN Debugging Guide

A few years ago I compiled a list of VPN debugs, error messages, and common gotchas. This information is relevant for Check Point NGX firewall, but is not a complete VPN Debugging Guide.

Categories
Perl

Perl Check Open Ports

I needed to check a list of jumphosts and see if they were linux or windows. I didn’t want to log in to each one manually and wanted the results of something like nmap saved into a CSV file. I could of grepped through nmap output, but it wouldn’t of formatted the way I wanted. Instead I wrote a small perl script to check for open ports on a list of domains or IPv4 addresses. Here is the perl script to check for open ports:

Categories
Perl

Perl Convert List of Hostnames to IP4 Addresses

Instead of having to type nslookup over and over, let’s script a solution that queries a list. We can then redirect the output into a file and have a nice, CSV output – all automated.

Categories
Check Point

Check Point Firewall Radius Configuration

Check Point Firewall Radius Configuration notes:

Categories
Perl

Perl One Liners

Perl One Liners can help you quickly edit files, strip lines, and perform other common admin tasks. Here is a small collection of my perl one liners that I’ve used recently.

Categories
Apache Debian

View HTTP Headers with Wget

View HTTP Headers with WGET
There are tools like curl, fiddler2, httpwatch, and of course wireshark that will show greater details, but if you don’t have these available, or are looking for a simple way to get debug http headers – you can use wget:

Categories
Debian Windows 7

Find max MTU size

MTU
Maximum Transmission unit is how big of a fragment can be sent. TCP/IP fragments data that doesn’t fit into one window (just about everything), then reassembles it at the far end. If the MTU is wrong, networking will fail.

I was wondering what the max MTU size was from my PC to our gateway … here is how I found the max mtu size

Categories
Debian

Use Curl to See HTTP Headers

You can use curl to see the http headers from an email link, or webpage is going to send you to a known bad page. If you want to see the contents of the page, without risk of infection (look for base64 encoding is a good sign of an infected page, but common sense will prevail) – just curl the http://address without parameters. But if you want to get the headers from an http request using curl instead of your browser – perhaps to troubleshoot http response codes, ssl certificates or other website problems, then this is a technique that will help you…