Skip to content

Instantly share code, notes, and snippets.

View maesoser's full-sized avatar
:shipit:

Sergio maesoser

:shipit:
View GitHub Profile
@maesoser
maesoser / threat_intel_sources.md
Last active May 28, 2024 06:20
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))
@maesoser
maesoser / server.py
Last active October 20, 2021 14:39
python txt webserver
from http.server import HTTPServer, BaseHTTPRequestHandler
class handler(BaseHTTPRequestHandler):
def _answer(self):
content = f"USA\n"
self.send_response(200)
self.send_header("Content-type", "text/plain")
self.end_headers()
self.wfile.write(content.encode("utf-8"))
def do_GET(self):
@maesoser
maesoser / sdig
Last active February 19, 2024 18:36
sdig is a dig wrapper that adds some common options and query multiple entries at once
#!/usr/bin/env bash
DEFAULT_RESOLVER="1.0.0.1"
do_dig () {
ENTRYTYPES="A AAAA CAA CNAME MX NS PTR SOA SRV TXT DS DNSKEY RRSIG PTR SRV TLSA HINFO NSEC NSEC3 NSEC3PARAM SSHFP type65"
for type in $ENTRYTYPES; do
out=$(dig +noall +dnssec +answer $1 $2 $type | awk '{gsub("IN\t", "", $0); print}')
colorize "$out"
done