Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #~/bin/env python
- import hmac
- from hashlib import sha1
- from time import time
- import subprocess
- method = 'GET'
- expires = int(time() + 360)
- path = '/v1/demo/cont_s3/uploaded_from_s3.txt'
- key = '<unsure>'
- hmac_body = '%s\\n%s\\n%s' % (method, expires, path)
- sig = hmac.new(key, hmac_body, sha1).hexdigest()
- subprocess.Popen(["curl", "http://10.10.10.200:8080%s?temp_url_sig=%s&temp_url_expires=%d" % (path, sig, expires)])
- print
- #print "\"http://10.10.10.200:8080/%s?temp_url_sig=%s&temp_url_expires=%d\"" % (path, sig, expires)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement