Skip to content

Instantly share code, notes, and snippets.

View maesoser's full-sized avatar
:shipit:

Sergio maesoser

:shipit:
View GitHub Profile
#!/bin/bash
# install the smartctl package first! (apt-get install smartctl)
if sudo true
then
true
else
echo 'Root privileges required'
@maesoser
maesoser / sitespeed.sh
Created April 20, 2025 23:06
sitespeed
#!/usr/bin/env bash
function sitespeed {
docker run --rm \
-v "$1" \
--add-host=${2}:${3} \
sitespeedio/sitespeed.io:33.6.1 "$4" \
--outputFolder /home/chrome/reports \
--plugins.add analysisstorer \
--summary-detail \
@maesoser
maesoser / threat_intel_sources.md
Last active March 25, 2025 11:56
Threat Intelligence Sources
#!/usr/bin/env python3
'''
atlas-dig --country ES --probes 3 www.google.es
'''
import urllib3
import requests, argparse, base64, json, os
from time import sleep
from tabulate import tabulate
@maesoser
maesoser / qbitorrentctl
Created March 8, 2024 09:16
It resumes or pauses all downloads while using qbittorrent
#!/usr/bin/env bash
# 0 23 * * * qbitorrentctl start
# 0 8 * * * qbitorrentctl stop
url="http://127.0.0.1:8080"
passwd="password"
user="user"
if [ "$#" -ne 1 ]; then
@maesoser
maesoser / dnsdiscover
Last active March 28, 2024 13:36
Simple dictionary based subdomain discovery tool
#! /usr/bin/env python3
import dns.resolver
from tabulate import tabulate
from multiprocessing.dummy import Pool
from random import shuffle
import ipaddress, argparse
CEND = '\33[0m'
@maesoser
maesoser / ifblinkd.c
Created December 23, 2022 00:33
Armbian/Raspberry led blink daemon
#include <wiringPi.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define TRAFFIC_TRESH 64
#define BLINK_DELAY 83
#define TX_LED 7 // GREEN
#define RX_LED 0 // RED
@maesoser
maesoser / banner-scan
Last active March 4, 2024 08:00
Fast and small multithreading http scanner and html title grabber
#!/usr/bin/env python3
'''
python3 -u titleget --ports 8080 80 443 8443 5601 3000 1900 9000 4444 9090 7777 5555 2332 8888 6002 6001 8000 80 1234 7001 50100 3128 20183 \
--threads 512 \
--input targets --output targets.json
'''
import urllib3
@maesoser
maesoser / cloudflared
Created September 18, 2022 21:10
Cloudflare tunnel service for openwrt
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=30
TOKEN="ey000...0000"
COLO="nyc"
stop_service() {
echo "Stopping cloudflared tunnel"
@maesoser
maesoser / nping
Created June 11, 2022 11:55
Small python script that performs a tcp handshake to see if port is open
#! /usr/bin/env python3
import sys
import socket
try:
target = socket.gethostbyname(sys.argv[1])
port = int(sys.argv[2])
except Exception as e:
print("Error: {}".format(e))