Skip to content

Instantly share code, notes, and snippets.

View AnyKeyShik's full-sized avatar
🐼
Panda RE

AnyKeyShik Rarity AnyKeyShik

🐼
Panda RE
View GitHub Profile
@AnyKeyShik
AnyKeyShik / dlopen_sample.c
Created June 15, 2022 23:41 — forked from tailriver/ dlopen_sample.c
A sample of using dlopen library.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
int main(int argc, char** argv)
{
void *handle;
void (*func_print_name)(const char*);
@AnyKeyShik
AnyKeyShik / install-debug-glibc.sh
Last active December 22, 2023 10:12
Install glibc debug symbols on Arch Linux
#!/bin/sh
#####################################################
# Install glibc with debug symbols on Arch Linux #
# #
# Make by AnyKeyShik Rarity (c) 2021 #
#####################################################
echo "Installing build dependencies"
// Self modified program
#include <errno.h>
#include <sys/mman.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int change_page_permissions(void *addr);
void change_instruction(void *addr, unsigned char offset, unsigned char new_instruction);
#include <stdio.h>
double m[]= {7709179928849219.0, 771};
int main() {
m[1]-- ? m[0] *= 2, main() : printf((char*)m);
}
@AnyKeyShik
AnyKeyShik / ascii_img.py
Created September 17, 2019 17:08
Simple script for create ASCII art for picture
#! /usr/bin/python2
from PIL import Image
ASCII_CHARS = [ '#', '?', '%', '.', 'S', '+', '.', '*', ':', ',', '@']
def scale_image(image, new_width=100):
"""
Resizes an image preserving the aspect ratio.
"""
@AnyKeyShik
AnyKeyShik / proxy.py
Last active March 23, 2019 16:56
Simple proxy tor config with PySocks lib
# -*- coding: utf-8 -*-
import socket, socks
def create_connection(address):
"""
Create connection with custom sock
:param address: address for connection