CPUG: The Check Point User Group

Resources for the Check Point Community, by the Check Point Community.

Tim Hall has done it again! He has just released the 2nd edition of "Max Power".
Rather than get into details here, I urge you to check out this announcement post.
It's a massive upgrade, and well worth checking out. -E


Results 1 to 1 of 1

Thread: quick and dirty hex to ip convert

  1. #1
    Join Date
    Rep Power

    Default quick and dirty hex to ip convert

    Put this in a file called hextoip.pl

    Can be used the following ways

    something | perl hextoip.pl

    cat file | perl hextoip.pl

    perl hextoip.pl < input_file.txt

    perl hextoip.pl input_file.txt

    Can be run with stdin or as argument. input should be some table dumped via fw tab -t $table -u.

    use strict;
    use warnings;
    while( my $line = <>) {
            foreach my $token ($line =~ /([a-f0-9]{8})/g) {
                    my $ip = join( '.', unpack( "C*", pack( "H*", $token)));
                    $line =~ s/$token/$ip/g;
            print $line;
    Last edited by jflemingeds; 2017-06-25 at 05:44.

Similar Threads

  1. Quick Question
    By Gingerwerewolf in forum Check Point Series 80/1100 Appliances
    Replies: 4
    Last Post: 2016-08-05, 08:56
  2. 9-1-1 Need help on this quick....sort of....
    By dougg01 in forum Installing And Upgrading
    Replies: 5
    Last Post: 2009-08-14, 19:16
  3. VPN quick HowTo
    By paolo.piombino in forum IPsec VPN Blade (Virtual Private Networks)
    Replies: 0
    Last Post: 2007-12-04, 18:39
  4. objects.c - quick question
    By Youngy in forum Miscellaneous
    Replies: 3
    Last Post: 2006-04-10, 20:14
  5. oh god sorry me again - very quick question
    By philofish in forum Miscellaneous
    Replies: 1
    Last Post: 2006-02-22, 15:20


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts