Skip to content

Instantly share code, notes, and snippets.

View Qubasa's full-sized avatar
🐞

Luis Hebendanz Qubasa

🐞
View GitHub Profile
@Qubasa
Qubasa / gen_terminal_colors.py
Created November 26, 2024 13:52
Generate terminal colors that work in white and dark backgrounds
import random
from typing import Tuple, List
import json
import math
import webcolors
from pathlib import Path
from typing import Tuple
def rgb_to_name(rgb: Tuple[int, int, int]) -> str:
@Qubasa
Qubasa / getrandom_hook.c
Last active June 4, 2024 18:47
Replaces getrandom() syscalls with pseudo random random() function
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/reg.h>
#include <sys/user.h>
#include <unistd.h>
#include <linux/ptrace.h>
@Qubasa
Qubasa / Profile.md
Last active April 9, 2024 14:27
My profile description

Welcome to My GitHub Profile! 🌟

I'm Luis Hebendanz, an IT consultant with a passion for solving complex technical challenges. My expertise includes:

  • Nix/NixOS: I believe that reproducible development environments are essential for the success of complex projects.
  • IT Security: From code reviews to malware analysis and reverse engineering
  • Testing/Fuzzing: Building testing and fuzzing harnesses
  • UI Design: If your highly technical product needs a Web or Native UI
  • Kernel Development: Whether it’s building kernel drivers or crafting custom kernels
  • Virtualization: I specialize in creating products that leverage custom virtualization solutions
@Qubasa
Qubasa / example.c
Last active March 30, 2024 00:26
Python ctypes callback that returns pointer to struct with free string in c
#include "example.h"
#include <stdio.h>
#include <stdlib.h>
void callFuncAndPrint(FuncStruct fs) {
ExampleStruct* es = fs.func();
printf("a: %s, b: %d, c: %d\n", es->a, es->b, es->c);
free(es->a);
}
environment.systemPackages =
with pkgs; [
glxinfo
vulkan-tools
];
hardware.enableRedistributableFirmware = true;
# Enable opengl
@Qubasa
Qubasa / traffic_debugging.md
Last active June 9, 2023 10:58
How to debug dropped packets in Linux
  • Do a packet capture from your router. <--- BEST THING TO DO
  • ip -s
  • ethool -S
@Qubasa
Qubasa / flake.nix
Last active August 14, 2022 23:13
Flutter flake nix
{
inputs = {
naersk.url = "github:nix-community/naersk/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
luispkgs.url = "github:Luis-Hebendanz/nixpkgs/luispkgs";
};
outputs = { self, nixpkgs, utils, naersk, luispkgs }:
utils.lib.eachDefaultSystem (system:
@Qubasa
Qubasa / default.nix
Last active October 1, 2022 12:26
Talon nix package
{ stdenv
, lib
, requireFile
, makeWrapper
, dbus
, fontconfig
, freetype
, glib
, libGL
, libxkbcommon_7
@Qubasa
Qubasa / dep_chain.py
Last active June 25, 2021 22:42
ldd dependency tree
#!/usr/bin/env python3
import os
import argparse
import re
import subprocess
import sys
def ldd(filename):