Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- #
- # Change Ekiga users settings.
- # Author: Mauro Baraldi <mauro.baraldi@gmail.com>
- # Date: 13/03/2012
- # Usage: python ekiga.py <file_path> <username> <extension> <password>
- # XML conf file commonly found in Linux on /home/<user>/.gconf/apps/ekiga/protocols/%gconf.xml
- # Developed to use as LDAP script to load VoIP settings automatcally
- # License: LGPL
- if __name__ == '__main__':
- from sys import argv
- filename, username, extension, password = argv[1:5]
- #print username, extension, password
- with open(filename,'r') as o:
- original = o.readlines()
- with open(filename,'w') as new:
- for linha in original:
- if linha.__contains__('<stringvalue>'):
- replace = linha.split('|')
- replace[3] = username
- replace[7] = extension
- replace[8] = extension
- replace[9] = password
- new.write('|'.join(replace))
- else:
- new.write(linha)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement