Skip to content

Instantly share code, notes, and snippets.

@ecks
ecks / server.py
Created August 15, 2019 14:29
Carbanak Server
import socket
import hashlib
import struct
import time
class IdUid:
def __init__(self):
@ecks
ecks / msf_direct.py
Created July 9, 2019 18:57
Directly interacting with msfrpc using msgpack
import time
from http.client import HTTPConnection
from msgpack import packb, unpackb
import json
client = HTTPConnection("192.168.96.4", 55553)
client.request('POST', '/api/', packb(['auth.login', 'msf', '1234']), {'Content-Type': 'binary/message-pack'})
res = unpackb(client.getresponse().read())
@ecks
ecks / i3-mon-swap.py
Created April 17, 2019 23:43
swap to focus with multiple monitors (like in xmonad and herbstluftwm)
#!/usr/bin/env python
import sys
import json
import subprocess
import time
def ws_info():
return json.loads(subprocess.check_output("i3-msg -t get_workspaces".split()))
@ecks
ecks / layout.kbd.json
Last active January 27, 2018 03:23
Untitled Keyboard Layout
[
{
"backcolor": "#ffffff"
},
[
{
"y": 1.5,
"c": "#a2a8b8",
"a": 6,
"f": 4