Skip to content

Instantly share code, notes, and snippets.

@lopes
lopes / eb.py
Last active August 7, 2024 13:38
Lists the top 10 most used passwords in Exército Brasileiro's leak. #hack #python #password #entropy
#!/usr/bin/env python3
#eb.py
#
# Created this program to list the top 10 most used
# passwords in Exército Brasileiro's leak. More
# about this here:
# http://www.tecmundo.com.br/ataque-hacker/89110-in-seguranca-nacional-exercito-hackeado-tem-7-mil-contas-crackeadas.htm
# Passwords were dumped, each in a newline, like this: <CPF>:<Password>
#
# AUTHOR: José Lopes de Oliveira Jr. <[email protected]>
@lopes
lopes / Code.gs
Last active August 7, 2024 13:36
Retrieves a quote from YAHOO! Finance and puts into the spreadsheet's cell. #javascript #js #sheets #yahoo #finance
function get_quote() {
/* get_quote
* Retrieves a quote from YAHOO! Finance and puts into the spreadsheet's cell.
*
* It's a pretty simple script that access YAHOO! Finance and get the price of
* previous close price of symbol in the first column cell of actual row.
*
* Usage: Start a spreadsheet where the symbols are disposed in lines and are
* in the first column. Use only symbols without those ".SA"s in the end.
* Access Tools > Script editor... and replace the default code for this
@lopes
lopes / smbgate2squid.sh
Last active August 7, 2024 13:35
A deprecated script that merges smbgate and squid logs to better determine what an user accessed. #linux #shell #shellscript #exercise #squid #log
#!/bin/bash
# NAME
# smbgate2access.sh
#
# VERSION
# alpha 0.005
#
# DESCRIPTION
# Este script analisa o arquivo de log do squid (access.log) e o combina com
@lopes
lopes / cronometr.ino
Last active August 7, 2024 13:34
A stopwatch in Arduino Uno with DFRobot v1.1 board. #clang #arduino #prototype
/**
* cronometr.ino
* Implements a stopwatch in Arduino Uno with DFRobot v1.1 board.
* Author: José Lopes de Oliveira Jr. <jilo.cc>
* License: GPLv3+
*/
#include <LiquidCrystal.h>
@lopes
lopes / pack.sh
Last active August 7, 2024 13:34
Packs an entire directory by zipping and encrypting it. #shell #shellscript #cryptography #files
#!/bin/bash
#pack.sh
#
# Zips and crypts a directory.
#
# TODO
# - Ask confirmation before delete.
##
OUTPUT="$(basename $(pwd))" #current dirname
@lopes
lopes / sync-bkps.sh
Last active August 7, 2024 13:33
Syncs backups from different servers in a single file server. #shell #shellscript #files #backup
#!/bin/bash
#sync-bkps.sh
#
# Syncs backups from different servers in a single
# place, using rsync. This "single place", in this
# case is a shared folder in a Windows 2008 system.
# So, we have to mount it using Samba first.
#
# AUTHOR.: José Lopes de Oliveira Jr. <indiecode.com.br>
# LICENSE: GPLv3+
@lopes
lopes / indipv4.py
Last active August 7, 2024 13:32
A class to handle IPv4 addresses. You can try it by running directly this script. #python #ip #prototype
#!/usr/bin/env python
#coding: utf8
"""IP
Provides a class that stores an IPv4 address like an
integer number. But it is transparent to the user.
"""
@lopes
lopes / macaddr.sh
Last active August 7, 2024 13:32
A really simple shell script to identify your NIC's manufacturers according to its MAC addresses. #shell #shellscript #nic #mac
#!/bin/bash
#macaddr.sh
#
# It will catch all of your network interfaces and
# find out what's the manufacturer of each according
# to its OUI.
#
# José Lopes de Oliveira Jr. <indiecode.com.br>
#
# GPLv3
@lopes
lopes / ervilha.sh
Last active August 7, 2024 13:31
Displays the sequence until its Nth item, passed through $1. The sequence starts with 1 and its next item will be given by the read of the current item. #shell #shellscript #challenge
#!/bin/bash
#ervilha.sh
#
#
# Displays the sequence until its Nth item, passed through $1.
# The sequence starts with 1 and its next item will be given
# by the read of the current item.
# For exemple, if the 4th item is 1211 --three one and one
# two--, the 5th item will be 3112.
#
@lopes
lopes / webfortune.sh
Last active August 7, 2024 13:30
An obsolete implementation of Fortunes. It reads the last Pensador's tweet, store it and display for the user. 1 tweet a day. #linux #conf
#!/bin/bash
#webfortune.sh
# Retrieves the last @pensador's tweet. Manages it retrieving one
# tweet per day, by using a file to cache the quote.
#
#
# José Lopes de O. Júnior <http://indiecode.com.br>
#