Skip to content

Instantly share code, notes, and snippets.

View nhnmomonga's full-sized avatar
🐭
Love Chinchilla

nhnmomonga nhnmomonga

🐭
Love Chinchilla
View GitHub Profile
# pip3 install websocket-client
import websocket
from multiprocessing import Process, Value, Lock, Event
from datetime import datetime
import dateutil.parser
import json
from time import sleep
class SFDInfo():
def __init__(self):
@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 ]
@komiya-atsushi
komiya-atsushi / Base64Demo.java
Created August 31, 2014 17:51
Java 8 より導入された java.util.Base64 の利用デモ。
import java.io.PrintStream;
import java.util.Base64;
/**
* Java 8 より導入された java.util.Base64 の利用デモ。
*/
public class Base64Demo {
private static final PrintStream o = System.out;
public static void main(String[] args) {