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 / omcencoding.py
Created December 11, 2024 23:00
Decoder and encoder for Samsung CSC XML files
# Decoder and encoder for Samsung CSC XML files
# (c) Marcos Del Sol Vives <[email protected]>
# License: WTFPL
import io
import gzip
class OmcEncoding:
SHIFT = [1, 1, 0, 2, 2, 4, 5, 0, 4, 7, 1, 6, 5, 3, 3, 1, 2, 5, 0, 6, 2, 2, 4, 2, 2, 3, 0, 2, 1, 2, 4, 3, 4, 0, 0, 0, 3, 5, 3, 1, 6, 5, 6, 1, 1, 1, 0, 0, 3, 2, 7, 7, 5, 6, 7, 3, 5, 1, 0, 7, 6, 3, 6, 5, 4, 5, 3, 5, 1, 3, 3, 1, 5, 4, 1, 0, 0, 2, 6, 6, 6, 6, 4, 0, 1, 1, 0, 5, 5, 4, 2, 4, 6, 1, 7, 1, 2, 1, 1, 6, 5, 4, 7, 6, 5, 1, 6, 7, 0, 2, 6, 3, 1, 7, 1, 1, 7, 4, 0, 4, 2, 5, 3, 1, 1, 5, 6, 0, 3, 5, 3, 6, 5, 7, 2, 5, 6, 6, 2, 2, 3, 6, 0, 4, 3, 2, 0, 2, 2, 3, 5, 3, 3, 2, 5, 5, 5, 1, 3, 1, 1, 1, 4, 5, 1, 6, 2, 4, 7, 1, 4, 6, 0, 6, 4, 3, 2, 6, 1, 6, 3, 2, 1, 6, 7, 3, 2, 1, 1, 5, 6, 7, 2, 2, 2, 7, 4, 6, 7, 5, 3, 1, 4, 2, 7, 1, 6, 2, 4, 1, 5, 6, 5, 4, 5, 0, 1, 1, 6, 3, 7, 2, 0, 2, 5, 0, 1, 3, 3, 2, 6, 7, 7, 2, 5, 6, 0, 4, 1, 2, 5, 3, 7, 6, 5, 2, 5, 2, 0, 1, 3, 1, 4, 3, 4, 2]
SALT = bytes([65, 197, 33, 222, 107, 28, 149, 55, 78, 17, 175, 6, 176, 135, 221, 233, 72, 12
@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 <[email protected]>
# 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 January 13, 2025 16:10 — 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 <[email protected]>
// License: WTFPL 2.0
#include <stdio.h>
#include <stdint.h>
#include <nfc/nfc.h>
int main(int argc, char ** argv) {
int ret = 1;