Skip to content

Instantly share code, notes, and snippets.

📉
Learnin'

Joseph Redfern JosephRedfern

📉
Learnin'
Block or report user

Report or block JosephRedfern

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JosephRedfern
JosephRedfern / evil.py
Created Sep 8, 2017
Slack Deleted Message logged
View evil.py
from slackclient import SlackClient
from datetime import datetime
import time
slack_token = 'xoxb-token-goes-here'
sc = SlackClient(slack_token)
if sc.rtm_connect():
while True:
try:
@JosephRedfern
JosephRedfern / screeny.py
Created Sep 6, 2017
Simple Screenshot API with Selenium, Python 3 and Flask
View screeny.py
from flask import Flask, request, Response, abort, send_from_directory
from selenium import webdriver
import sqlite3
import uuid
app = Flask(__name__)
conn = sqlite3.connect("screenshots.sqlite")
c = conn.cursor()
@JosephRedfern
JosephRedfern / threaded.py
Created Sep 5, 2017
produces "TypeError: can't pickle _thread.lock objects" under W10 w/ Python 3.6.2.
View threaded.py
import time
import random
from queue import Queue
from multiprocessing import Process
import os
def produce_data(q):
print("[+] Producer thread started (PID: {})".format(os.getpid()))
while True:
@JosephRedfern
JosephRedfern / win8print.reg
Created Aug 25, 2017
Fix issue 0x000006d1 when connecting to print server under Windows 8/10 (mirrored from https://lapserv.maths.cam.ac.uk/docs/win8printing/win8print.reg)
View win8print.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers]
"ForceCSREMFDespooling"=dword:00000000
@JosephRedfern
JosephRedfern / proxy.go
Created Feb 15, 2017
Using Google as HTTP Proxy (limited to GET)
View proxy.go
package main
import (
"bytes"
"fmt"
"github.com/elazarl/goproxy"
"gopkg.in/h2non/filetype.v1"
"log"
"net/http"
)
View reactddit.js
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class Listing extends Component {
constructor(params){
super(params);
this.title = params.title;
this.ups = params.ups;
}
@JosephRedfern
JosephRedfern / YouTube 8m Video ID scraper.py
Created Sep 28, 2016
Scrapes the youtube video IDs for the youtube-8m data set. Probably buggy. Could be threaded.
View YouTube 8m Video ID scraper.py
import requests
from collections import defaultdict
csv_prefix = "http://www.yt8m.org/csv"
r = requests.get("{0}/verticals.json".format(csv_prefix))
verticals = r.json()
block_urls = defaultdict(list)
count = 0
View parse_keyfob.sh
#!/bin/bash
while read line;
do
if [[ "$line" == *"CLOSE" ]]
then
echo "CLOSE"
gnome-screensaver-command -l
elif [[ "$line" == *"OPEN" ]]
then
View gist:255a60431e33c21b888745acb0908910
➜ gr-iridium git:(master) ✗ iridium-extractor -D 4 examples/hackrf.conf
Mac OS; Clang version 7.0.0 (clang-700.0.72); Boost_105800; UHD_003.009.001-0-unknown
gr-osmosdr v0.1.4-48-g86ad5842 (0.1.5git) gnuradio 3.7.8
built-in source types: file fcd rtl rtl_tcp uhd hackrf rfspace
Using HackRF One with firmware 2014.08.1
(RF) Gain: 14.0 (Requested 10)
BB Gain: 20.0 (Requested 20)
IF Gain: 40.0 (Requested 40)
View gist:0e8f8482aba7305d64d9b540c6428542
Process: Python [45070]
Path: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.11 (2.7.11)
Code Type: X86-64 (Native)
Parent Process: zsh [42784]
Responsible: iTerm2 [289]
User ID: 501
Date/Time: 2016-09-02 01:15:24.644 +0100
You can’t perform that action at this time.