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 extract_form_fields(self, soup): | |
"Turn a BeautifulSoup form in to a dict of fields and default values" | |
fields = {} | |
for input in soup.findAll('input'): | |
# ignore submit/image with no name attribute | |
if input['type'] in ('submit', 'image') and not input.has_key('name'): | |
continue | |
# single element nome/value fields | |
if input['type'] in ('text', 'hidden', 'password', 'submit', 'image'): |
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
/* | |
* Arris TM602A password of the day generator | |
* | |
* Author of Original JavaScript Version: Raul Pedro Fernandes Santos | |
* Author of this C# Code: Marcel Valdez Orozco | |
* Project homepage for JavaScript Version: http://www.borfast.com/projects/arrispwgen | |
* | |
* This software is distributed under the Simplified BSD License. | |
* | |
* Copyright 2012 Marcel Valdez Orozco. All rights reserved. |
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 BeautifulSoup import BeautifulSoup | |
import requests | |
import urlparse | |
URL = 'example.com' | |
s = requests.Session() | |
def fetch(url, data=None): | |
if data is None: | |
return s.get(url).content |
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
(function debugify_content_script(){ | |
console.log('debugify content script running'); | |
var nativeWebSocket = window.WebSocket; | |
var requests = window.requestLog = {}; | |
var WebSocket = window.WebSocket = function(uri) { | |
console.log('new WebSocket created', uri); | |
this.websocket = new nativeWebSocket(uri); | |
this.websocket.onopen = this.onOpen.bind(this); | |
this.websocket.onmessage = this.onMessage.bind(this); | |
this.listeners = {onmessage: null, onopen: null}; |
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
http://0-www.sciencedirect.com.www.consuls.org/science?_ob=QuickSearchURL&_method=submitForm&_acct=C000050221&md5=0c4b6db32507e4a332b2aa6dd47a65f4&qs_all={searchTerms}&qs_author=&qs_title=&qs_vol=&qs_issue=&qs_pages=&x=34&y=15 | |
http://0-dictionary.oed.com.library.utulsa.edu/cgi/findword?query_type=word&queryword={searchTerms} | |
http://100.daum.net/search/search.do?query={searchTerms} | |
http://1000corks.com/search?st={searchTerms}&src=myc | |
http://11870.com/konsulto/{searchTerms} | |
http://1000memories.com/search?q={searchTerms} | |
http://130.219.35.129/search?q={searchTerms}&btnG=Google+Search&entqr=0&output=xml_no_dtd&sort=date%3AD%3AL%3Ad1&client=default_frontend&ud=1&oe=UTF-8&ie=UTF-8&proxystylesheet=default_frontend&site=default_collection | |
http://1337x.org/search/{searchTerms}/0/ | |
http://11888.ote.gr/web/guest/white-pages/search?who={searchTerms}&where= | |
http://140.111.34.46/cgi-bin/newDict/dict.sh?idx=dict.idx&cond={searchTerms}&pieceLen=50&fld=1&cat=&imgFont=1 |
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
/** | |
* example C code using libcurl and json-c | |
* to post and return a payload using | |
* http://jsonplaceholder.typicode.com | |
* | |
* License: | |
* | |
* This code is licensed under MIT license | |
* https://opensource.org/licenses/MIT | |
* |
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
# install build deps | |
sudo yum install gcc gcc-c++ make expat-devel gettext-devel libcurl-devel \ | |
libffi-devel libxml2-devel libxslt-devel libyaml-devel postgresql-server \ | |
postgresql-devel readline-devel sqlite-devel openssl-devel ruby-devel \ | |
rubygems autoconf automake bison libtool libpcap-devel | |
# install rbenv | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile |
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 unittest module for creating unit tests | |
import unittest | |
# Import time module to implement | |
import time | |
# Import the Selenium 2 module (aka "webdriver") | |
from selenium import webdriver | |
# For automating data input |
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
» city | |
» country | |
nginx city:"San Diego" country:US | |
» geo | |
Devices within a 50km radius of San Diego (32.8,-117): geo:32.8,-117,50 | |
» hostname | |
"Server: gws" hostname:google | |
» net | |
net:216.219.0.0/16 | |
» os |
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
#!/usr/bin/python2 | |
""" | |
Use scapy to modify packets going through your machine. | |
Based on nfqueue to block packets in the kernel and pass them to scapy for validation | |
""" | |
import nfqueue | |
from scapy.all import * | |
import os |
OlderNewer