Skip to content

Instantly share code, notes, and snippets.

View RaidAndFade's full-sized avatar
🎯
Focusing

RaidAndFade RaidAndFade

🎯
Focusing
View GitHub Profile
import obd
import re
def raw_to_data_array(inp):
lines = inp.split("\n")
dat = {}
for l in lines:
ldat = re.findall('..',l[3:])
dat[ldat[0]] = [int(x,16) for x in ldat[1:]]
return dat
@RaidAndFade
RaidAndFade / truthtable.py
Created September 11, 2019 19:11
Generate truthtables for almost any (no "for all" or "exists a") statement
stmt = "((p and (not q)) or (q and (not p))) or r"
# |p |q |r |p = q |(p = q) IMPLIES r |
# |True |True |True |True |True |
# |True |True |False |True |False |
# |True |False |True |False |True |
# |True |False |False |False |True |
# |False |True |True |False |True |
# |False |True |False |False |True |
# |False |False |True |True |True |
@RaidAndFade
RaidAndFade / OldGame spambot
Last active May 29, 2019 07:59
Spambot for my game i made a while ago. Just thought it'd be cool
var w = require("ws");
var c = new w("wss://gsv.gocode.it:5453",{rejectUnauthorized:false,headers:{"origin":"https://gocode.it"}});
c.on("open",()=>{
c.send("0|aaaaaaaa|undefined")
c.send("3|0")
setInterval(s.bind(this,c),100);
});
function s(c){
setTimeout(c.send.bind(c,"6|aaaaaaaaaa|0"),100);
}
@RaidAndFade
RaidAndFade / index.py
Created March 2, 2019 17:52
Freelancer Pani7
from lxml import etree
import sys
import os
if len(sys.argv) != 2:
sys.exit("Make sure to put the path of the file as an argument. Or to drag the file into the script.")
# the input is what we get as an argument, the ouput is that same file, in that same location,
# with .xml instead of its current extension
@RaidAndFade
RaidAndFade / mitmssh.py
Last active May 29, 2019 08:02
a MITM SSH server that is designed for use as a honeypot (can take your hostkey so that there is no problem, is multithreaded, forwards valid login attempts to the endpoint server)
import socket, sys, threading
import paramiko
import pwd
import base64
from paramiko.py3compat import b, u, decodebytes
from binascii import hexlify
#generate keys with 'ssh-keygen -t rsa -f server.key'
HOST_KEY_RSA = paramiko.RSAKey(filename='rsa.key')
#HOST_KEY_ECDSA = paramiko.ECDSAKey(filename='ecdsa.key')
stmt = "((A IMPLIES B) IMPLIES C) AND (A OR (D AND B))"
def tokenize(stmt):
tokenstrs = {}
i = 0
done = False
curtoken = ""
curId = 0
prevtokens = []
@RaidAndFade
RaidAndFade / memdump.swift
Last active July 18, 2017 04:53
Swift memdump. I was bored and wanted to learn swift syntax
import Foundation
let bytes = 16
let rows = 8
let sep = 4
let bytesPointer = UnsafeMutableRawPointer.allocate(bytes: 1, alignedTo: 1)
bytesPointer.storeBytes(of: 0xff, as: UInt8.self)
var c = 0
var a = 0