Skip to content

Instantly share code, notes, and snippets.

View chadyred's full-sized avatar
💭
I may be slow to respond.

Florian Cellier chadyred

💭
I may be slow to respond.
  • YouStock
View GitHub Profile
@chadyred
chadyred / proxmox-proxy
Created April 3, 2024 09:57 — forked from basoro/proxmox-proxy
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@chadyred
chadyred / .eslintrc.json
Created November 6, 2023 15:24
First eslint with Allman brace style (brace to next line after class header) used for typescript
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": ["./tsconfig.json"] },
"plugins": [
@chadyred
chadyred / backup_kvm.sh
Last active November 26, 2018 13:45
Backup - restore KVM VM with disk and image and XML
#!/bin/bash
#
# Liste des domaines
#
#-----------------------------------------------------------------
if [ "$(groups $USER | grep staff)" == "" ] || [ "$(groups $USER | grep sudo)" == "" ]; then
echo "Vous ne faites pas partie du staff ou vous n'êtes pas sudoer !"
exit 1
fi
#
@chadyred
chadyred / exec_as_uid_set_by_c_script
Last active October 28, 2018 15:37
change-uid-gid-based-one-right-of-file => gcc -m32 -o droit-user droit-user.c
#!/tmp/sh
echo "Content repository of" `whoami`
# ou echo "Contenu du répertoire de" $(whoami)
ls -a /home/user
#!/usr/bin/python3
import abc
from typing import Callable, IO, cast
from east_displayer import Output, OutputStream
from east_typer import StringComputer, String, StringReceiver, ReceiverOfString
class MessageTemplating(metaclass=abc.ABCMeta):
@chadyred
chadyred / east_parse_csv_to_dataframe_with_extract.py
Last active June 19, 2018 08:55
Allow use to get a given column on a CSV with a dataframe
#!/usr/bin/python3
import abc
import sys
import json, base64
from typing import Callable, IO, cast
import requests
import pandas as pd
import attr
@chadyred
chadyred / virus_total.py
Created June 12, 2018 10:07
Create report with virus total
#!/usr/bin/python3
import abc
import sys
from typing import Callable, IO, cast
import requests
import attr
class MessageTemplating(metaclass=abc.ABCMeta):
@chadyred
chadyred / sniffer.py
Last active May 22, 2018 15:02
East sniffer
#!/usr/bin/python3
import abc
import time, json, sys
from typing import Callable, IO, cast
import shutil
from subprocess import Popen as popen_call # Execute a shell command
from subprocess import call as system_call # Execute a shell command
import attr
@chadyred
chadyred / check.sh
Created January 10, 2018 14:13
shasum-check-key
#!/bin/sh
# $1 : file with keys
# $2 : certificat (256 - 512)
# $3 : binary to check.
cat $1 | grep "`shasum -a $2 $3`"
if grep -q "`shasum -a $2 $3`" $1
then
@chadyred
chadyred / check.sh
Created January 10, 2018 14:13
shasum-check-key
#!/bin/sh
# $1 : file with keys
# $2 : certificat (256 - 512)
# $3 : binary to check.
cat $1 | grep "`shasum -a $2 $3`"
if grep -q "`shasum -a $2 $3`" $1
then