logged_requests is a simple wrapper around the requests.Session object. It captures input and output data of a requests.Session object.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cgi | |
def parse_form_data(formdata): | |
fp = cgi.StringIO(formdata) | |
env = cgi.os.environ | |
env['REQUEST_METHOD'] = 'POST' | |
data = cgi.FieldStorage(fp, environ=env) | |
return data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cgi | |
def parse_form_data(formdata): | |
fp = cgi.StringIO(formdata) | |
env = cgi.os.environ | |
env['REQUEST_METHOD'] = 'POST' | |
data = cgi.FieldStorage(fp, environ=env) | |
return data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stupid python sqlite ORM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dateutil.parser import parse as dateutil_parse | |
from lxml import etree, objectify as xobject | |
def is_clean(element): | |
if not element.getchildren() and element.text is None: | |
return False | |
return all(is_clean(child) for child in element.iterchildren()) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[u'ERROR: TypeError: undefined is not a function (evaluating \'$( "#datepicker" ).datepicker({\r\n\t\tshowOn: "button",\r\n\t\tbuttonImage: "images/calendrier.png",\r\n\t\tbuttonImageOnly: true\r\n\t})\')', u'TRACE:', u' -> https://portail-famille-meyzieu.test.entrouvert.org/meyzieu/js/plugins/teamnet/teamnet.js: 11', u' -> https://portail-famille-meyzieu.test.entrouvert.org/meyzieu/js/jquery/jquery.min.js: 29 (in function "i")', u' -> https://portail-famille-meyzieu.test.entrouvert.org/meyzieu/js/jquery/jquery.min.js: 29 (in function "fireWith")', u' -> https://portail-famille-meyzieu.test.entrouvert.org/meyzieu/js/jquery/jquery.min.js: 29 (in function "ready")', u' -> https://portail-famille-meyzieu.test.entrouvert.org/meyzieu/js/jquery/jquery.min.js: 29 (in function "K")'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cp_file(infile, outfile): | |
with open(outfile, 'wb') as fo: | |
fd = open(infile, 'rb') | |
for line in fd.readlines(): | |
fo.write('%s' % line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"url": "http://idp.debian.local/login/", | |
"page": "http://idp.debian.local/manage/users/", | |
"username_id": "#id_username", | |
"username_value": "root", | |
"password_id": "#id_password", | |
"password_value": "root" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExtFilterDefine fixtext mode=output intype=text/html \ | |
cmd="/bin/sed -e '\$a<script type=\"text/javascript\" src=\"/_mandaye/static/mandaye.js\"></script>'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"cookies": [], "address": "https://google.com"} |
NewerOlder