Skip to content

Instantly share code, notes, and snippets.

View iordic's full-sized avatar
🐱
cat README.md

Jordi ⛫☠ iordic

🐱
cat README.md
View GitHub Profile
@iordic
iordic / tcp_checksum_test.c
Created September 30, 2020 14:50
Comprobar un checksum de TCP a partir de un hexstream copiado desde Wireshark.
/*
* Comprobador del checksum de TCP a partir de un hexstream copiado de Wireshark.
* Copyright (C) 2020 @iordic
*
* Licencia (GPLv3):
* =================
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
/*
* Cracker sencillo para ataques mediante diccionario contra ficheros 'shadow'
* Copyright (C) 2020 @iordic
*
* Licencia (GPLv3):
* =================
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@iordic
iordic / corona-app.html
Created March 26, 2020 13:48
Aplicación para el cálculo del test de coronavirus
<html>
<head>
<meta charset="utf-8">
<style>
body {
font-family: sans-serif;
padding: 1em;
}
#result {
display: none;
@iordic
iordic / reto-cifrar-gui.py
Created October 29, 2019 10:23
Reto propuesto con cifrado improvisado
"""
1. Pasar a texto el pin: "elpindelatarjetaesunodostrescuatro"
2. ROT-13 a cada caracter
3. Convertir a posición del alfabeto en número
4. Convertir a binario
5. De cada byte del carácter se le suma a cada bit un número de su teléfono (8 últimos dígitos.)
6. se convierte cada resultado a un digito hexadecimal (por si suman 10)
7. se guarda el valor hexadecimal a un fichero
"""
import tkinter as tk
@iordic
iordic / scratch_vernam.py
Created July 21, 2019 17:45
Cifrador muy simple basado en Vernam, para uso conceptual
"""Cifrador simple basado en cifrado de Vernam
hecho por @iordic
Este script está creado con fines educativos para tener nociones de cifrado simétrico
basándonos en el algoritmo más simple que se me ha ocurrido: el cifrado Vernam.
Se puede usar con cualquier fichero, ya que el fichero de entrada se lee la
información binaria del fichero. De todos modos te recomiendo que uses ficheros de
texto para comprobar los resultados.
@iordic
iordic / APK-reversing-cheatsheet.md
Last active March 16, 2019 00:38
Basic android app reversing cheatsheet

Cheatsheet for APK reversing

Get an apk from adb interface

  1. Enable debugging usb in your phone and connect it to your computer via usb cable.
  2. Ensure your computer recognize your device: adb devices
  3. If not, start the server: adb start-server. Or restart: adb kill-server and then: adb start-server
  4. List all installed packages: adb shell pm list packages
  5. Find the package you want to download and copy the full package name. Example: com.example.app
  6. Get the apk path: adb shell pm path com.example.app
  7. Copy the result path and pull: adb pull /url/to/app/example.apk
@iordic
iordic / dinamic_matrix.c
Last active February 10, 2018 23:00
Dinamic matrix with memory allocation.
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main() {
// Declare constant sizes
const int rows = 8;
const int cols = 6;
// Seed for random numbers generation
#! /usr/bin/env python
# BRONCO~1.WSF code deobfuscation
import sys
import os
def usage():
print "Usage: " + os.path.basename(sys.argv[0]) + " <file> <output_file>"
def main():
@iordic
iordic / IPlogger.sh
Last active April 8, 2017 16:17
Script de sh que registra la ip pública en un fichero de texto a modo de log
#! /bin/sh
# Script que registra la ip publica en un fichero de texto
# Usado en un router con OpenWrt
# Author: Jordi Castelló
wget http://checkip.dyndns.com/index.html -O iplog.tmp 2>/dev/null
cut -d' ' -f6 iplog.tmp > iplog-cache.tmp # Eliminamos las partes que no nos interesan
cut -d'<' -f1 iplog-cache.tmp > iplog.tmp
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import hashlib
def sha1Gen(file):
hash = hashlib.sha1()
with open(file, 'rb') as f:
for chunk in iter(lambda: f.read(4096), ''):
hash.update(chunk)