Skip to content

Instantly share code, notes, and snippets.

@Ilgrim
Ilgrim / proxy_server.py
Created May 10, 2020 — forked from oeway/proxy_server.py
Proxy Server with aiohttp
View proxy_server.py
import logging
import sys
from urllib.parse import urljoin
import asyncio
import aiohttp
from aiohttp import web
TARGET_SERVER_BASE_URL = 'http://127.0.0.1:8888'
@Ilgrim
Ilgrim / proxy_server.py
Last active May 10, 2020 — forked from barrachri/proxy_server.py
Proxy Server with aiohttp
View proxy_server.py
import logging
import sys
from urllib.parse import urljoin
import asyncio
import aiohttp
from aiohttp import web
TARGET_SERVER_BASE_URL = 'http://127.0.0.1:8888'
@Ilgrim
Ilgrim / ddnsserver.py
Created May 8, 2020 — forked from pklaus/ddnsserver.py
Simple DNS server (UDP and TCP) in Python using dnslib.py
View ddnsserver.py
#!/usr/bin/env python
# coding=utf-8
import argparse
import datetime
import sys
import time
import threading
import traceback
import socketserver
@Ilgrim
Ilgrim / qemu_vm_mount_windows_local_folder.sh
Created May 7, 2020 — forked from neelabhg/qemu_vm_mount_windows_local_folder.sh
Mount a Windows host's folder on a QEMU Linux guest
View qemu_vm_mount_windows_local_folder.sh
#! /bin/bash
# The Windows folder needs to be shared appropriately
WINDOWS_DIR_PATH="//10.0.2.2/workdir"
MNTPOINT="/workdir_local"
if [ ! -d "$MNTPOINT" ]; then
mkdir $MNTPOINT
fi
View usbip_barebones_demo.py
#!/usr/bin/env python3
from collections import namedtuple
import socket
import struct
usbip_user_op_common = namedtuple('usbip_user_op_common', 'version code status')
usbip_usb_device = namedtuple('usbip_usb_device', 'path busid busnum devnum speed idVendor idProduct bcdDevice bDeviceClass bDeviceSubClass bDeviceProtocol bConfigurationValue bNumConfigurations bNumInterfaces')
usbip_header_basic = namedtuple('usbip_header_basic', 'command seqnum devid direction ep')
@Ilgrim
Ilgrim / AddToCartFormWithHooks.tsx
Created Apr 8, 2020 — forked from jedmao/AddToCartFormWithHooks.tsx
React Hooks and Render Props in TypeScript
View AddToCartFormWithHooks.tsx
import { FC, useCallback } from 'react'
import { connect } from 'react-redux';
import addToCart from '../actions/cart'
import useAddToCart, { UseAddToCartOptions } from './useAddToCart'
interface DispatchProps {
onSubmit(options: UseAddToCartOptions): Promise<void>,
}
@Ilgrim
Ilgrim / server.js
Created Mar 23, 2020 — forked from bitnetwork/server.js
A telnet server written in Node.js
View server.js
var lib_net = require("net");
var lib_chalk = require("chalk");
var clients = {};
var lastId = -1;
function cleanInput(data) {
return data.toString().replace(/(\r\n|\n|\r)/gm,"");
}
@Ilgrim
Ilgrim / mem-loader.asm
Created Mar 6, 2020 — forked from zznop/mem-loader.asm
Fun little loader shellcode that executes an ELF in-memory using an anonymous file descriptor (inspired by https://x-c3ll.github.io/posts/fileless-memfd_create/)
View mem-loader.asm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Copyright (C), zznop, zznop0x90@gmail.com
;;;
;;; This software may be modified and distributed under the terms
;;; of the MIT license. See the LICENSE file for details.
;;;
;;; DESCRIPTION
;;;
;;; This PoC shellcode is meant to be compiled as a blob and prepended to a ELF
@Ilgrim
Ilgrim / build_cross_gcc
Created Mar 6, 2020 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
View build_cross_gcc
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
@Ilgrim
Ilgrim / qemu_optionrom.md
Created Mar 2, 2020 — forked from mcastelino/qemu_optionrom.md
QEMU Option ROMS and booting from option rom
View qemu_optionrom.md

With seabios

  1. QEMU includes bundled option ROMs which are loaded by default unless a device is specifically setup with --romfile="".
  2. These options roms are bundled as binaries. The source code for the same can be found at http://ipxe.org/
  3. These options roms are useful for example when you want to PXE boot over a virtio-net device.

Here is an example of booting via Network PXE using the option ROM

qemu-system-x86_64 \
You can’t perform that action at this time.