Format a password file for John the Ripper from Cisco configs (Level 5)

sed -n 's/[ :]/_/g; s/^\(.\{1,\}\)_5_\($1$[$./0-9A-Za-z]\{27,31\}\)_*$/\1:\2/p' < cisco-device-config > passwd
Format a password file for John the Ripper from Cisco configs (Level 5) Pulled from http://www.openwall.com/lists/john-users/2006/05/14/8

0
By: hooobs
2009-02-09 17:03:39
sed

These Might Interest You

  • Using large wordlists is cumbersome. Using password cracking programs with rules such as Hashcat or John the ripper is much more effective. In order to do this many times we need to "clean" a wordlist removing all numbers, special characters, spaces, whitespace and other garbage. This command will covert a entire wordlist to all lowercase with no garbage.


    0
    cat dirtyfile.txt | awk '{gsub(/[[:punct:]]/,"")}1' | tr A-Z a-z | sed 's/[0-9]*//g' | sed -e 's/ //g' | strings | tr -cs '[:alpha:]' '\ ' | sed -e 's/ /\n/g' | tr A-Z a-z | sort -u > cleanfile.txt
    purehate · 2011-08-28 01:26:04 0
  • Would create a file with a meaningful title. Dedicated to John Cons, who is annoying us users. Merry Christmas!!! Show Sample Output


    7
    alias Z=base64&&Z=dG91Y2ggUExFQVNFX1NUT1BfQU5OT1lJTkdfQ09NTUFORExJTkVGVV9VU0VSUwo=&&$(echo $Z|Z -d)
    rodolfoap · 2010-12-24 14:29:19 8
  • This gives you lots of nifty Cisco network information like VLAN tag, port and switch information. Show Sample Output


    15
    tcpdump -nn -v -i eth0 -s 1500 -c 1 'ether[20:2] == 0x2000'
    spif · 2009-02-20 18:02:27 2
  • Prerequisites: [1] download the CISCO VPN client for linux: http://tuxx-home.at/archives/2007/09/24/T15_26_49/ [2] apply this ciscpo VPN patch: http://bit.ly/linux_vpn_patch [*] use command to start client [*+1] After copying your profile file to /etc/opt/cisco-vpnclient/Profiles, connect using vpnclient connect TORVPN-TCP Show Sample Output


    -5
    sudo service vpnclient_init start
    mariusbutuc · 2010-11-10 20:18:08 2

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: