Skip to content

Instantly share code, notes, and snippets.

@christophetd
christophetd / README.md
Last active May 15, 2020 14:52
Command line clipboard

Simple command line clipboard using xclip

Installation

# Install xclip (if not already installed)
if [ -z `which xclip` ]; then sudo apt-get install xclip; fi

# Download script and make it executable
sudo wget -O /usr/bin/clipboard https://gist.githubusercontent.com/christophetd/63f8986dcd367c758dac/raw/9017ce92c98fb80c01c73938d583e84416d026c4/clipboard
@christophetd
christophetd / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@christophetd
christophetd / gist:430775c9d53cda61eb84
Created August 28, 2015 09:41
JDK8 installation commands under Ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@christophetd
christophetd / install.sh
Created August 28, 2015 09:42
JDK8 installations commands (Ubuntu)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@christophetd
christophetd / install.sh
Created August 28, 2015 09:43
JDK 8 installation (Ubuntu)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
#!/bin/bash
CFG_DIR="/cfg"
if [ -z $EDITOR ]; then
EDITOR=`which vim`
fi
sudo $EDITOR $CFG_DIR/$1
@christophetd
christophetd / namemash.py
Created April 1, 2017 09:20 — forked from superkojiman/namemash.py
Creating a user name list for brute force attacks.
#!/usr/bin/env python
import sys
if __name__ == "__main__":
if len(sys.argv) != 2:
print "usage: %s names.txt" % (sys.argv[0])
sys.exit(0)
for line in open(sys.argv[1]):
name = ''.join([c for c in line if c == " " or c.isalpha()])
@christophetd
christophetd / xor-ddos-decryption.py
Last active January 5, 2024 17:13
Tool to decrypt configuration values and network communications of malwares of the Xor Ddos family
import binascii
import itertools
# XORs two byte strings together
def xor_bytes(bytes1, bytes2):
return [ chr(ord(a) ^ b) for (a, b) in zip(bytes1, bytes2) ]
# XORs a ciphertext with the malware's hardcoded key, and repeats it until it's long enough to match the ciphertext length.
def decrypt(cipher, key_hex = 'BB2FA36AAA9541F0'):
key_bytes = [ ord(a) for a in key_hex ]
@christophetd
christophetd / keybase.md
Created December 12, 2017 22:24
keybase.md

Keybase proof

I hereby claim:

  • I am christophetd on github.
  • I am christophetd (https://keybase.io/christophetd) on keybase.
  • I have a public key ASDIKL2YxFhmFcG1s-aRvZ98jGemCEGwISz49sqQZYZA6go

To claim this, I am signing this object:

@christophetd
christophetd / infosec-subscriptions.opml
Created March 31, 2018 07:41
My Feedly RSS subscriptions
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Christophe subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Security" title="Security">
<outline type="rss" text="Schneier on Security" title="Schneier on Security" xmlUrl="http://www.schneier.com/blog/index.rdf" htmlUrl="https://www.schneier.com/blog/"/>
<outline type="rss" text="Rhino Security Labs" title="Rhino Security Labs" xmlUrl="http://www.rhinosecuritylabs.com/blog/feed/" htmlUrl="https://rhinosecuritylabs.com"/>