Skip to content

Instantly share code, notes, and snippets.

View richinseattle's full-sized avatar

richinseattle

View GitHub Profile
@richinseattle
richinseattle / cuda_11.3_installation_on_Ubuntu_20.04
Created April 13, 2023 03:48 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.3 and cuDNN 8.2 installation on Ubuntu 20.04 for PyTorch 1.11
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@richinseattle
richinseattle / ubuntu20-hyperv-enhanced-session.md
Created January 31, 2023 07:45 — forked from milnak/ubuntu20-hyperv-enhanced-session.md
[Enabling enhanced session in Hyper-V for Ubuntu 20] This works for me, although it seems that Hyper-V quick create now supports enhanced session by default. #ubuntu #hyperv

Setup Hyper-V enhanced session for Ubuntu 20

I couldn't find instructions that were 100% complete, so I put this together.

These instructions worked fine for me. Follow each step carefully.

Download Ubuntu 20 desktop

DO NOT create the VM by choosing Quick Create in Hyper-V Manager. Follow these instructions exactly.

@richinseattle
richinseattle / fork.c
Created January 15, 2023 10:05 — forked from petrsmid/fork.c
fork() for Windows with fixed Console
/*
* fork.c
* Experimental fork() on Windows. Requires NT 6 subsystem or
* newer.
*
* Improved version with fixed Console
*
* Copyright (c) 2023 Petr Smid
* Copyright (c) 2012 William Pitcock <[email protected]>
*
@richinseattle
richinseattle / do_hypercall.c
Created September 30, 2021 08:50 — forked from abenbachir/do_hypercall.c
Emitting hypercall in c
#define do_hypercall(nr, p1, p2, p3, p4) \
__asm__ __volatile__(".byte 0x0F,0x01,0xC1\n"::"a"(nr), \
"b"(p1), \
"c"(p2), \
"d"(p3), \
"S"(p4))
void main()
{
@richinseattle
richinseattle / apatching_for_AFL_Persistent_fuzzing.diff
Created January 4, 2020 08:03 — forked from n30m1nd/apatching_for_AFL_Persistent_fuzzing.diff
Patch for Apache httpd to make it fuzzable through afl-clang-fast
Index: server/main.c
===================================================================
--- server/main.c (revision 1794475)
+++ server/main.c (working copy)
@@ -434,11 +434,157 @@
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
" -X : debug mode (only one worker, do not detach)");
- destroy_and_exit_process(process, 1);
+ destroy_and_exit_process(process, 0);
@richinseattle
richinseattle / Installer.dll
Created January 3, 2020 02:58 — forked from msuiche/Installer.dll
Installer.dll (Vault7)
// Decompiled with JetBrains decompiler
// Type: Installer.Install
// Assembly: Installer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 1DF6A781-016A-4A47-9C62-874A888EB357
// Assembly location:
using \u0004;
using \u0006;
using Microsoft.Win32;
using System;
@richinseattle
richinseattle / fork.c
Created November 16, 2019 06:50 — forked from Cr4sh/fork.c
fork() for Windows
/*
* fork.c
* Experimental fork() on Windows. Requires NT 6 subsystem or
* newer.
*
* Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
#!/bin/bash
objdump -d "${1}" | grep -Eo '\$0x[0-9a-f]+' | cut -c 2- | sort -u | while read const; do echo $const | python -c 'import sys, struct; sys.stdout.write("".join(struct.pack("<I" if len(l) <= 11 else "<Q", int(l,0)) for l in sys.stdin.readlines()))' > testcases/$const; done
i=0; strings "${1}"| while read line; do echo -n "$line" > testcases/string_${i} ; i=$[ $i + 1 ] ; done
@richinseattle
richinseattle / ghidra_processor_docs_downloader.py
Created May 17, 2019 21:34 — forked from ckuethe/ghidra_processor_docs_downloader.py
Ghidra Processor Documentation Downloader
#!/usr/bin/env python
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
import os
import requests
import sys
docs = {
'68000': {
'M68000PRM.pdf': 'https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf',
@richinseattle
richinseattle / private_fork.md
Created October 10, 2018 09:09 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git