Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> import base64
- >>> print base64.b64encode("password")
- cGFzc3dvcmQ=
- >>> print base64.b64decode("cGFzc3dvcmQ=")
- password
- >>> 'your string'.encode('base64')
- 'eW91ciBzdHJpbmc=n'
- >>> _.decode('base64')
- 'your string'
- import netrc
- # Define which host in the .netrc file to use
- HOST = 'mailcluster.loopia.se'
- # Read from the .netrc file in your home directory
- secrets = netrc.netrc()
- username, account, password = secrets.authenticators( HOST )
- print username, password
Add Comment
Please, Sign In to add comment