Jump to content

Search the Community

Showing results for tags 'export'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • General
  • MAF
    • BaRF
    • KCRF
    • MiRF
    • StRF
    • How To

Categories

  • General
  • Prayers
  • Sermons
  • Weddings

Categories

  • Files
  • Doco
    • Manuals
  • F5's F5 Files
  • Linux's Linux Files Generic
  • Linux's Linux Files RPM
  • Linux's Linux Files DPKG

Forums

  • Technology
    • General Technology Discussion
    • Apple
    • BlueCat
    • Cisco
    • Command Line Reference
    • Efficient IP
    • F5
    • Google
    • Hosting
    • InfoBlox
    • Logging
    • Lucent VitalQIP
    • Microsoft
    • Misc Hardware
    • Networking
    • Programming
    • SSL
    • Software
    • UNIX
    • Web
  • Information
    • Animals
    • Electronics
    • Food & Drink
    • Games
    • Hobbies & Activities
    • Holidays & Festivals
    • Humor
    • Kids
    • Movies & Films
    • Music
    • People & Places
    • Products & Brands
    • Professions
    • Religion
    • Science & Technology
    • Sports
    • TV & Radio
    • Vehicles
  • Music
  • Religion
  • F5's ASM Topics
  • F5's Training Topics
  • F5's F5 General Topics
  • F5's iRules Discussions
  • F5's Hardware Discussions
  • F5's LTM Topics
  • F5's GTM Topics
  • F5's BIG-IQ Topics
  • Linux's Linux Discussions
  • Apple's Apple Forum
  • Programming's Programming Tools

Blogs

There are no results to display.

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


First Name


Last Name


Source that brought you here


Focus


User URL


About Me


INTERESTS


OCCUPATION


ICQ


WEBSITE


WLM


YAHOO


AOL


LOCATION


FACEBOOK


GOOGLEPLUS


SKYPE


TWITTER


YOUTUBE


Festival Job Title

Found 1 result

  1. At some points you may want to audit your external GTM for any RFC1918 addresses and here is a simple script that will do the trick SSH to your GTM and create a text file with the following contents (I name the file rfc1918audit.py) # This script will give DNS records private ip addresses 10.x.x.x or 172.x.x.x or 192.168.x.x in external DNS (view) import re,os os.system('dnsxdump > xdump') f = open('xdump', 'r') for line in f: parts = line.split() if ( len(parts) > 4 and (parts[4].startswith( '172.' ) or parts[4].startswith( '192.168.' ) or parts[4].startswith( '10.' )) ): print parts[0], " ", parts[3], " ", parts[4] os.remove('xdump') Run the script python /var/tmp/rfc1918audit.py > rfc1918audit.txt Look at the output less rfc1918audit.txt And if you just want to know how many you have you can count the rows in your text file by running wc -l rfc1918audit.txt Hope that helps someone Reference Material: Python Modules Used re This module provides regular expression matching operations similar to those found in Perl. Both patterns and strings to be searched can be Unicode strings as well as 8-bit strings. However, Unicode strings and 8-bit strings cannot be mixed: that is, you cannot match a Unicode string with a byte pattern or vice-versa; similarly, when asking for a substitution, the replacement string must be of the same type as both the pattern and the search string. Regular expressions use the backslash character ('\') to indicate special forms or to allow special characters to be used without invoking their special meaning. This collides with Python’s usage of the same character for the same purpose in string literals; for example, to match a literal backslash, one might have to write '\\\\' as the pattern string, because the regular expression must be \\, and each backslash must be expressed as \\ inside a regular Python string literal. The solution is to use Python’s raw string notation for regular expression patterns; backslashes are not handled in any special way in a string literal prefixed with 'r'. So r"\n" is a two-character string containing '\' and 'n', while "\n" is a one-character string containing a newline. Usually patterns will be expressed in Python code using this raw string notation. It is important to note that most regular expression operations are available as module-level functions and methods on compiled regular expressions. The functions are shortcuts that don’t require you to compile a regex object first, but miss some fine-tuning parameters. os os.system(command) Execute the command (a string) in a subshell. This is implemented by calling the Standard C function system(), and has the same limitations. Changes to sys.stdin, etc. are not reflected in the environment of the executed command. If command generates any output, it will be sent to the interpreter standard output stream. On Unix, the return value is the exit status of the process encoded in the format specified for wait(). Note that POSIX does not specify the meaning of the return value of the C system()function, so the return value of the Python function is system-dependent. The subprocess module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using this function. See the Replacing Older Functions with the subprocess Module section in the subprocess documentation for some helpful recipes. SUMMARY: run dnsxdump > xdump
×
×
  • Create New...