Skip to content

Instantly share code, notes, and snippets.

View socram8888's full-sized avatar
🐲
Unprofessional lizardman

Marcos Del Sol Vives socram8888

🐲
Unprofessional lizardman
View GitHub Profile
@socram8888
socram8888 / sha256.py
Created December 13, 2023 11:54
Pure Python SHA-256 implementation
# Pure Python SHA-256 implementation
# (c) Marcos Del Sol Vives <marcos@orca.pet>
# License: WTFPL
import struct
# 32-bit right rotation
def rotr32(a, c):
return ((a >> c) | (a << (32 - c))) & 0xFFFFFFFF
@socram8888
socram8888 / .gitattributes
Created November 17, 2021 15:11
Personal gitattributes
# Version: 2021.05.25.01
# Force all text files to be LF
* text=auto eol=lf
# Project source files
*.bat text eol=crlf
*.c text diff=cpp
*.conf text
*.config text
@socram8888
socram8888 / update-nexus.sh
Last active November 4, 2021 10:54
Semi-automated Nexus update script
#!/bin/bash -e
cd $(dirname "$0")
log() {
echo -e "\e[92m---\e[39m $1"
}
err() {
echo -e "\e[91m!!!\e[39m $1" >&2

Grabación de rutas

Al respecto, la Agencia Española de Protección de Datos en la [guía de videovigilancia][guia-videovigilancia] en el punto 5.1 sobre cámaras a bordo dice:

Las grabaciones para una finalidad "doméstica", están exceptuadas de la aplicación de la normativa de protección de datos. Por ejemplo, el uso de estas cámaras en los cascos de un ciclista o motorista, que fuesen tomando imágenes paisajísticas.

@socram8888
socram8888 / rc4mi.py
Last active April 3, 2024 05:14 — forked from h3ku/rc4mi.py
Encryption and decryption tool for Xiaomi Mi Home's API
from base64 import b64decode, b64encode
import hashlib, argparse
def rc4mi(data, key):
S, j, out = bytearray(range(256)), 0, bytearray()
for i in range(256):
j = (j + key[i % len(key)] + S[i]) % 256
S[i], S[j] = S[j], S[i]
@socram8888
socram8888 / stubby.sh
Created January 3, 2021 16:58
Stubby sysvinit init script
#!/bin/sh
### BEGIN INIT INFO
# Provides: stubby
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: stubby service
# Description: stubby, the secure DNS proxy
@socram8888
socram8888 / relay.py
Created December 28, 2020 11:23
Tp-Link Tapo C200 video relaying test
#!/usr/bin/env pyton3
import uuid
import requests
import ssl
import socket
import http.client
import json
import sys
@socram8888
socram8888 / wg-refresh.sh
Last active December 18, 2023 12:00
Refresh script for CloudFlare Warp on OpenWRT devices
#!/bin/ash
set -euo pipefail
cd $(dirname "$0")
CF_API=https://api.cloudflareclient.com/v0i1909051800
WG_IFACE=cfwarp
regen=true
if [ -e keys.cfg ]; then
// FM11RF005SH dump tool for libnfc
// Made by Marcos Del Sol Vives <marcos@orca.pet>
// License: WTFPL 2.0
#include <stdio.h>
#include <stdint.h>
#include <nfc/nfc.h>
int main(int argc, char ** argv) {
int ret = 1;
#!/usr/bin/env python3
import asyncio
import websockets
import json
import uuid
import httpx
# I got these by MitM'ing a valid client!
DEVICE_TOKEN = None