Advertisement
SoUiLaHxXx_Dz

Get users From Passwd file

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