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
""" | |
This plugin randomizes the order of tests within a unittest.TestCase class | |
""" | |
__test__ = False | |
import logging | |
import os | |
from nose.plugins import Plugin | |
from nose import loader | |
from inspect import isfunction, ismethod |
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
COMMON_CSRF_NAMES = ( | |
'csrf_token', | |
'CSRFName', # OWASP CSRF_Guard | |
'CSRFToken', # OWASP CSRF_Guard | |
'anticsrf', # AntiCsrfParam.java | |
'__RequestVerificationToken', # AntiCsrfParam.java | |
'token', | |
'csrf' | |
) |
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
It's time. The w3af project needs your help. I've been improving this software during the last months and now I need you to test it before the release. I've done my fair share of testing, but I'm also the developer and that's never good. | |
I'm looking for bugs, crashes, false positives, false negatives, typos, etc. anything that can be improved is welcome. | |
Follow these steps for testing: | |
cd ~ | |
git clone https://github.com/andresriancho/w3af.git | |
git checkout threading2 |
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 getopt, sys, re, urllib2, urllib, BaseHTTPServer | |
from urllib2 import Request, urlopen, URLError, HTTPError | |
################## HEADER ################################### | |
# | |
# Traceroute-like HTTP scanner | |
# Using the "Max-Forwards" header |
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 string | |
for line in file('scan_database.db'): | |
line = line.strip() | |
for char in line: | |
if char not in string.printable: | |
print repr(char), line |
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
# | |
# Module providing the `Pool` class for managing a process pool | |
# | |
# multiprocessing/pool.py | |
# | |
# Copyright (c) 2006-2008, R Oudkerk | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions |
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 time | |
import threading | |
from multiprocessing.pool import ThreadPool | |
def wait(): | |
time.sleep(5) | |
class A(object): | |
def __init__(self): | |
self.p = ThreadPool(10) |
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 | |
from setuptools import setup, find_packages | |
from os.path import join | |
LONG_DESCRIPTION = '''\ | |
Introduction | |
============ |
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
root@server:/home/ubuntu# gcc --print-file-name=libgcc_s.so.1 | |
/lib/x86_64-linux-gnu/libgcc_s.so.1 | |
root@server:/home/ubuntu# ls -lah /lib/x86_64-linux-gnu/libgcc_s.so.1 | |
-rw-r--r-- 1 root root 87K Apr 15 2012 /lib/x86_64-linux-gnu/libgcc_s.so.1 | |
root@server:/home/ubuntu# file /lib/x86_64-linux-gnu/libgcc_s.so.1 | |
/lib/x86_64-linux-gnu/libgcc_s.so.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xa922f3ec3c63266e82f1105dd40d17152cf85a39, stripped | |
root@server:/home/ubuntu# strace -o strace.txt -e trace=file /usr/local/bin/uwsgi --ini /etc/uwsgi/django_uwsgi.ini |
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 sys | |
import re | |
import os | |
import subprocess | |
TEST_RUNNER = 'nosetests' | |
TEST_ARGS = ['-s', '-v'] | |
CRAWL_EXCLUSIONS = ('./build', './.git', './venv',) | |
OlderNewer