Advertisement
87aCk_X

Get Users From Passwd File

Oct 2nd, 2013
700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1.    
  2.  
  3.     #!/usr/bin/python
  4.     import os
  5.      
  6.     def Color() : # Thank:r0kin
  7.       if os.name == 'nt':
  8.         os.system('cls') # Windows
  9.         os.system('color a')
  10.       else:
  11.         os.system('clear') # Linux
  12.     Color()
  13.     print '''
  14.    ###################################
  15.    # c0ded by 87ack_x
  16.    #  Get Users From Passwd File
  17.    ###################################
  18.    '''
  19.      
  20.     a = raw_input("Enter passwd file : ")
  21.      
  22.     pf = open("file.txt" , "r")
  23.      
  24.     for i in pf.readlines():
  25.       b = i.find(":")
  26.       print b[0]
  27.      
  28.     pf.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement