Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- __author__ = 'Dmitry K'
- import re
- from subprocess import PIPE, Popen
- def auth_finder():
- ps = Popen(('ps wwwaux'), stdout=PIPE, shell=True)
- i = 0
- for str2 in ps.communicate()[0].split('\n'):
- if '-auth' in str2:
- return re.findall("((-auth)|(/\S*))",str2)[2][0]
- if __name__ == '__main__':
- print auth_finder()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement