Skip to content

Instantly share code, notes, and snippets.

@jtripper
jtripper / pty_handler.py
Created November 14, 2013 21:55
PTY shell handler. Communicates with a PTY shell for a real PTY connection, supports reverse and bind shells.
#!/usr/bin/env python2
import termios
import select
import socket
import os
import fcntl
import argparse
class PTY:
def __init__(self, slave=0, pid=os.getpid()):
@jtripper
jtripper / cmd.py
Created March 13, 2013 21:02
cmd plugin for https://github.com/jtRIPper/plugin-based-irc-bot, provides commands for running python code and bash commands.
# cmd plugin for https://github.com/jtRIPper/plugin-based-irc-bot, provides commands for running python code and bash commands.
from subprocess import Popen, PIPE, STDOUT
import sys
import os
import StringIO
class cmd:
def __init__(self, bot):
self.bot = bot
self.autorun = self.auto
@jtripper
jtripper / ptrace_roulette.c
Last active October 30, 2018 00:09
ptrace roulette
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <sys/types.h>
#include <regex.h>
#include <string.h>
#include <sys/ptrace.h>
#include <time.h>
#include <unistd.h>