Skip to content

Instantly share code, notes, and snippets.

View msterhuj's full-sized avatar
💾
findings

Gabin L msterhuj

💾
findings
View GitHub Profile
@msterhuj
msterhuj / worldlist_sorter.sh
Last active January 17, 2021 18:58
worldlist sorter
#!/usr/bin/env bash
# tested for this web site https://wiki.skullsecurity.org/Passwords
# only no account
# @MsterHuj
echo "[*] Uncompress all .bz2 archives..."
bzip2 -vd --best *.bz2
echo "[*] Passting all on one file and remove the old file..."
cat * >> all.lst
@msterhuj
msterhuj / memcache_udp_scanner.py
Created June 22, 2020 15:03
Memcache udp scanner on python3
import socket
TIME_OUT = 1
IP_LIST = "ips.txt" # Ip list for check
OUTPUT_FILE = "vuln.txt"
PAYLOAD = "\x00\x00\x00\x00\x00\x01\x00\x00\x73\x74\x61\x74\x73\x0d\x0a" # ........stats
def scan(ip):
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
@msterhuj
msterhuj / create_nfs_share_apline.sh
Created January 17, 2021 18:58
Create a nfs share on apline linux
apk add nfs-utils
rc-update add nfs
rc-update add nfsmount
rc-update add netmount
rc-service nfs start
rc-service nfsmount start
rc-service netmount start
rc-status
@msterhuj
msterhuj / setup_vps_projet_anuel.md
Created March 30, 2021 08:57
Comment Setup le vps pour le project anuel

Comment Setup le vps pour le project anuel

Ce doc sera mis a jour avec tout ce quil faut pour metre le site en ligne avec les certifica ssl une base de donnée et php de bien config avec apache2 (meme si je prefer nginx mais on a pas le droit de lutiliser)

Etape 1 - la connection

Récupéré les information de connection

Lors de lachat de votre vps vous allez reçevoir un mail de ovh avec les information de connection. le plus important dans les mail est la ligne "L'addresse IPv4 du VPS et X.X.X.X" et deux ligne en dessous "Nom dutilisateur: Debian" et "Mot de passe: ***

@msterhuj
msterhuj / starulm.md
Last active May 28, 2022 13:33
Patch staruml 5.0.x

StarUML 5.0.x 🚀

Tested on 5.0.1

Install

  • Install starUML : starUML.io
  • Install nodejs : nodejs.org
  • After install nodejs install asar npm install -g asar
@msterhuj
msterhuj / main.go
Created July 1, 2022 10:56
simple go api call
package main
import (
"encoding/json"
"fmt"
"net/http"
)
type Brand struct {
Id int `json:"brand_id"`
@msterhuj
msterhuj / django_hot_reload.py
Created July 10, 2022 21:03
Hot reload for django when using gunicorn
from os import kill, getppid
from signal import SIGHUP
from django.http import JsonResponse
def reload(request):
"""
Restart all worker and master of gunicorn app
https://docs.gunicorn.org/en/stable/signals.html#reload-the-configuration
"""
@msterhuj
msterhuj / reset_cert_pve.sh
Created November 21, 2022 09:42
Reset Cert PVE
#!/bin/bash
# SRC https://forum.proxmox.com/threads/broken-proxmox-by-trying-to-add-ssl-certificates.59166/
rm /etc/pve/priv/pve-root-ca.key
rm /etc/pve/pve-root-ca.pem
rm /etc/pve/local/pve-ssl.pem /etc/pve/local/pve-ssl.key /etc/pve/local/pveproxy-ssl.pem /etc/pve/local/pveproxy-ssl.key
pvecm updatecerts
systemctl restart pveproxy
@msterhuj
msterhuj / create_debian_template.sh
Created December 23, 2022 21:22
function for createing template from cloud image on pve
#!/bin/bash
function create_template() {
if [ $# -ne 6 ]; then
echo "Usage: $0 URL TEMPLATE_ID TEMPLATE_NAME DATASTORE BRIDGE VLAN_ID"
echo "Cannot init creation if not all args are set, exiting..."
return 1
fi
URL=$1
TM_ID=$2
- name: "Config Router"
hosts: all
gather_facts: false
vars:
ansible_user:
ansible_ssh_pass:
ansible_become_pass:
ansible_network_os: ios
ansible_connection: network_cli
ansible_become_method: enable