Skip to content

Instantly share code, notes, and snippets.

View byt3bl33d3r's full-sized avatar
🧛
This shit ain't nothing to me man

Marcello byt3bl33d3r

🧛
This shit ain't nothing to me man
View GitHub Profile
@byt3bl33d3r
byt3bl33d3r / ducky-convert.py
Last active August 29, 2015 14:13
Converts the USB rubber ducky property files to a suitable format for the keyseed.py file in the kali nethunter project
#! /usr/bin/env python
from configobj import ConfigObj
import sys
import StringIO
import re
from pprint import pprint
if len(sys.argv) < 3:
print 'Usage: ducky-convert.py <keyboard.properties> <layout.properties>'
#! /usr/bin/env python
import sys
import re
import os
from decimal import Decimal #for conversion milliseconds -> seconds
if len(sys.argv) < 2:
print 'Usage: duck-hunter.py <duckyscript> output.txt'
#print 'Usage: duck-hunter.py <duckyscript> <language> output.txt'
@byt3bl33d3r
byt3bl33d3r / nfqueue
Last active February 21, 2020 19:41
Simple packet manipulation with fqrouter's fork of python-netfilterqueue (https://github.com/fqrouter/python-netfilterqueue)
#! /usr/bin/env python2.7
from scapy.all import *
from netfilterqueue import NetfilterQueue
def modify(packet):
pkt = IP(packet.get_payload()) #converts the raw packet to a scapy compatible string
#modify the packet all you want here
@byt3bl33d3r
byt3bl33d3r / keybase.md
Created April 12, 2015 10:33
keybase.md

Keybase proof

I hereby claim:

  • I am byt3bl33d3r on github.
  • I am byt3bl33d3r (https://keybase.io/byt3bl33d3r) on keybase.
  • I have a public key whose fingerprint is F875 2C5D DC1B 9EB1 9073 C30D A2A9 C1F5 F948 B62B

To claim this, I am signing this object:

@byt3bl33d3r
byt3bl33d3r / CVE2Java.py
Created May 12, 2015 02:00
Parses a Java 'Vulnerability Details' page on http://www.cvedetails.com and prints all of the Java version strings affected (e.g '1.6.0.23')
#! /usr/bin/env python2
import requests
import lxml.html
import sys
r = requests.get(sys.argv[1])
tree = lxml.html.fromstring(r.text)
try:
@byt3bl33d3r
byt3bl33d3r / keybase.md
Created June 18, 2015 03:20
Keybase proof

Keybase proof

I hereby claim:

  • I am byt3bl33d3r on github.
  • I am byt3bl33d3r (https://keybase.io/byt3bl33d3r) on keybase.
  • I have a public key whose fingerprint is 7069 4855 F807 0C99 9731 C777 60FA BDD3 A6E1 5E81

To claim this, I am signing this object:

@byt3bl33d3r
byt3bl33d3r / raw2ps_shellcode.py
Created September 13, 2015 12:12
Converts raw shellcode to a PowerShell compatible byte array (helpful when using custom shellcode with Invoke-Shellcode.ps1)
import sys
ps_shellcode = '@('
with open(sys.argv[1], 'rb') as shellcode:
byte = shellcode.read(1)
while byte != '':
ps_shellcode += '0x{}, '.format(byte.encode('hex'))
byte = shellcode.read(1)
@byt3bl33d3r
byt3bl33d3r / shodan_getuphosts.py
Created November 10, 2015 21:43
Get up hosts using Shodan! Takes as input a comma separated subnet list
import shodan
import sys
from shodan import APIError
from netaddr import IPNetwork
SHODAN_API_KEY= 'APIKEY'
api = shodan.Shodan(SHODAN_API_KEY)
targets = map(IPNetwork, sys.argv[1].split(','))
@byt3bl33d3r
byt3bl33d3r / SILENTTRINITY.cs
Last active October 13, 2018 00:38
SILENTTRINITY c# stub with embedded IPY stdlib support
using System;
using IronPython.Hosting;
using IronPython.Modules;
//using IronPython.Runtime;
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.Scripting.Hosting;
using Microsoft.Scripting.Utils;
using System.Collections.Generic;
@byt3bl33d3r
byt3bl33d3r / ecdh_eke.py
Last active October 16, 2018 23:02
ECDH Encrypted Key Exchange (IronPython 2.7.8)
from System.IO import MemoryStream
from System.Text import Encoding
from System.Security.Cryptography import Aes, AsymmetricAlgorithm, CryptoStream, CryptoStreamMode
class DiffieHellman:
def __init__(self):
self.aes = Aes.Create()
self.diffieHellman = AsymmetricAlgorithm.Create("ECDiffieHellmanCng")
self.PublicKey = self.diffieHellman.PublicKey.ToByteArray()