Skip to content

Instantly share code, notes, and snippets.

View winterrdog's full-sized avatar
🏠
Found SIGSEGV at 0x7ffff09beef

winterrdog winterrdog

🏠
Found SIGSEGV at 0x7ffff09beef
  • No_such_file_or_directory
  • Earth realm
  • 06:23 (UTC +03:00)
View GitHub Profile
@winterrdog
winterrdog / RC4.c
Last active December 1, 2021 09:01 — forked from rverton/RC4.c
swap using XOR operation
/*
robin verton, dec 2015
implementation of the RC4 algo
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@winterrdog
winterrdog / WaitCallback
Created December 15, 2021 18:37 — forked from alfarom256/WaitCallback
Runs code via WaitForThreadPoolWaitCallbacks
#include <windows.h>
#include <stdio.h>
#include <threadpoolapiset.h>
#define LEN 277
// run calc
unsigned char op[] =
"\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52"
"\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48"
@winterrdog
winterrdog / bits.c
Created December 18, 2021 18:04 — forked from localvoid/bits.c
/*
* CSE 351 HW1 (Data Lab )
*
* Boris Kaul <me@boriskaul.com>
*
* bits.c - Source file with your solutions to the Lab.
* This is the file you will hand in to your instructor.
*
* WARNING: Do not include the <stdio.h> header; it confuses the dlc
* compiler. You can still use printf for debugging without including
@winterrdog
winterrdog / syntax.s
Created January 7, 2022 15:13 — forked from mishurov/syntax.s
AT&T assembly syntax and IA-32 instructions
# --------
# Hardware
# --------
# Opcode - operational code
# Assebly mnemonic - abbreviation for an operation
# Instruction Code Format (IA-32)
# - Optional instruction prefix
# - Operational code
@winterrdog
winterrdog / clone_sub.sh
Last active January 10, 2022 10:10 — forked from Sanix-Darker/clone_sub.sh
[BASH]clone_sub.sh
#!/bin/bash
# First parameter is the sub-directory-absolute-path
# Second parameter is the link of the repo
# A smart split to get the repo-name, with / as a separator
REPO_NAME="$(echo $2 | grep -oE '[^/]+$')"
git init $REPO_NAME
cd $REPO_NAME
@winterrdog
winterrdog / cuda_11.2_installation_on_Ubuntu_20.04
Created January 10, 2022 10:13 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.2 and cuDNN 8.1 installation on Ubuntu 20.04 for Pytorch 1.8 & Tensorflow 2.7.0
#!/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
#include <iostream>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <string.h>
using namespace std;
void handleOpenSSLErrors(void) {
ERR_print_errors_fp(stderr);
abort();
}

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
@winterrdog
winterrdog / gist:d49be3bac401cf3aaf08dcb796735e4e
Created February 4, 2022 05:11 — forked from eliburke/gist:24f06a1590d572e86a01504e1b38b27f
Encrypt/Decrypt functions for AES 256 GCM using OpenSSL for iPhone
// This is 4 year old code, and I have long since switched to PolarSSL
// But I have no reason to believe it is not still valid and functional
#include <openssl/rand.h>
#include <openssl/ecdsa.h>
#include <openssl/obj_mac.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
@winterrdog
winterrdog / bash-colors.md
Created February 7, 2022 14:02 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple