Skip to content

Instantly share code, notes, and snippets.

View f11snipe's full-sized avatar
:octocat:
making & breaking stuff

F11snipe f11snipe

:octocat:
making & breaking stuff
View GitHub Profile
@f11snipe
f11snipe / xor.ts
Last active July 28, 2022 00:52
Simple xor ciphers
/**
* USAGE: npx ts-node xor.ts
*/
// Cipher Text #1
const ct1 = 'fd034c32294bfa6ab44a28892e75c4f24d8e71b41cfb9a81a634b90e6238443a813a3d34';
// Cipher Text #2
const ct2 = '6b65813f4fe991efe2042f79988a3b2f2559d358e55f2fa373e53b1965b5bb2b175cf039';
// Cipher Text Key
const key = 'de328f76159108f7653a5883decb8dec06b0fd9bc8d0dd7dade1f04836b8a07da20bfe70';
@f11snipe
f11snipe / portscan.ts
Created June 22, 2022 06:50
Simple tcp port scanner poc in typescript
import net from 'net';
import async from 'async';
const { VMIP = '127.0.0.1', PORTS = '1-65535' } = process.env;
const MAX_SCANS = 4096;
const SCAN_HOST = VMIP;
const TIMEOUT = 2000;
const report: { [port: number]: string } = {};
const ports: number[] = [];
const groups: string[] = PORTS.split(',');