Advertisement
Guest User

Untitled

a guest
Sep 24th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. file = open('/etc/shadow.test').read().strip()
  2.  
  3. for line in file.split('\n'):
  4.     if '$' in line:
  5.         line = [i.split('$') for i in line.split(':')]
  6.         line[1][-1] = 'PASSWORD_HASH'
  7.        
  8.         print ':'.join(['$'.join(i) for i in line])
  9.    
  10.     else:
  11.         print line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement