Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis/redis.pid
@tahajahangir
tahajahangir / hb_test.py
Last active August 29, 2015 13:58 — forked from takeshixx/hb-test.py
Added threading/loop support (serveral features from different forks also added)
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
# Modifed to send heartbeat requests for both TLS v1.1 and v1.2
import sys
import struct
import socket
@tahajahangir
tahajahangir / ssltest.py
Last active August 29, 2015 13:58 — forked from sh1n0b1/ssltest.py
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@tahajahangir
tahajahangir / mongo_dump.py
Last active December 31, 2015 23:19 — forked from kesor/sql_mongodb_dump_middleware.py
The file is a util for dumping mongo commands/queries. Can be used in any python environment, and included a django middleware.
import struct
import logging
from pymongo import MongoClient
import bson
from bson.errors import InvalidBSON
from pymongo.mongo_replica_set_client import MongoReplicaSetClient
logger = logging.getLogger('mongo_dump')
@tahajahangir
tahajahangir / example-mod-wsgi.py
Last active April 22, 2024 00:37 — forked from branneman/example-mod-wsgi.py
Python (2&3 compatible) Equivalent to phpinfo()
def application(environ, start_response):
from pyinfo import pyinfo
output = pyinfo()
# or pyinfo([('custom key', 'custom value'), ...])
start_response('200 OK', [('Content-type', 'text/html')])
return [output]
@tahajahangir
tahajahangir / Tracer.js
Created February 7, 2012 09:26 — forked from cpdean/Tracer.js
Unobfuscated version of tynt Tracer.js
//v26 © 2011 Tynt
Tynt = window.Tynt || [];
if (typeof Tynt.TIL != "undefined") {
} else {
(function () {
var mainTynt = function () {
var body = document.body,
documentElement = document.documentElement,
isIE = eval("/*@cc_on!@*/false"),
repeat = function (a, b) {