Skip to content

Instantly share code, notes, and snippets.

@viyatb
viyatb / app.py
Created March 19, 2014 13:38 — forked from ayang/app.py
class Application(tornado.web.Application):
def __init__(self):
tornado.web.Application.__init__(self, handlers, **settings)
self.db_session = db_session
self.redis = redis.StrictRedis()
self.session_store = RedisSessionStore(self.redis)
class BaseHandler(tornado.web.RequestHandler):
@viyatb
viyatb / cookie.py
Created March 19, 2014 13:42
Cookie handling in Tornado
@viyatb
viyatb / pre-commit
Last active August 29, 2015 13:57
PEP8 p re-commit hook for OWTF
#!/bin/sh
# Auto-check for pep8 and flake8 proposed formatting checks automatically before committing bad code
# requires flake8 module
# The following is a list of the most common PEP 8 errors and warnings; to
# skip some just add them to the IGNORE variable (comma separated):
# E111 indentation is not a multiple of four
# E123 closing bracket does not match indentation of opening bracket's line
# E201 whitespace after '('
# E202 whitespace before ')'
$.fn.clickbox = $.fn.clickbox || function () {
return this
};
var shareListingOnFacebook = function () {
var c = "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(window.location.href + "ts/fb/");
window.open(c, "_blank", "resizable=1,toolbar=0,status=0,width=626,height=436")
};
$(document).ready(function () {
$("#jsListView", "#listings-forsale-page").click(function (a) {
return !1
var http = require('follow-redirects').http;
//top 1000
var domains = ["google.com","facebook.com","youtube.com","yahoo.com","baidu.com","wikipedia.org","qq.com","linkedin.com","live.com","twitter.com","amazon.com","blogspot.com","taobao.com","google.co.in","sina.com.cn","wordpress.com","yahoo.co.jp","yandex.ru","bing.com","ebay.com","google.de","vk.com","hao123.com","163.com","tumblr.com","pinterest.com","google.co.uk","google.fr","googleusercontent.com","microsoft.com","msn.com","ask.com","mail.ru","google.co.jp","google.com.br","weibo.com","apple.com","paypal.com","google.ru","instagram.com","google.com.hk","xvideos.com","blogger.com","google.it","tmall.com","google.es","imdb.com","soso.com","craigslist.org","sohu.com","360.cn","go.com","amazon.co.jp","stackoverflow.com","bbc.co.uk","xhamster.com","google.com.mx","neobux.com","google.ca","fc2.com","cnn.com","imgur.com","alibaba.com","wordpress.org","flickr.com","espn.go.com","adcash.com","huffingtonpost.com","odnoklassniki.ru","t.co","conduit.com","thepira
urxvt.termName: rxvt
urxvt.loginShell: true
urxvt*urlLauncher: /usr/bin/chromium
urxvt*perl-lib: /usr/lib/urxvt/perl/
urxvt*perl-ext-common: default,matcher,searchable-scrollback
urxvt*font: xft:DejaVu Sans Mono:pixelsize=10
urxvt*boldFont: xft:DejaVu Sans Mono:pixelsize=10
urxvt.scrollBar: false
urxvt.saveLines: 65535
urxvt.secondaryScroll: true
@viyatb
viyatb / reverse.py
Created June 1, 2014 13:47
Secuinside CTF
import ctypes
listing = [
'No pain, No gain - gogil',
'Fighting! - lokihardt',
"Rock'n Roll~ - anncc",
'WTF(Welcome To Facebook) - hellsonic',
'Enjoy~ :) - hkpco',
'I love meat - wooyaggo',
' - v0n',
'An algorithm must be seen to be believed. - Donald Knuth',
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpServer::HTML
def initialize(info = {})
super(update_info(info,
'Name' => 'NetGear UPnP CSRF',
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = AverageRanking
include Msf::Exploit::Remote::HttpServer::HTML
def initialize(info = {})
super(update_info(info,
'Name' => 'WDMyCloud NAS Command Injection CSRF',
@viyatb
viyatb / pr.md
Created June 20, 2014 10:20 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: