Skip to content

Instantly share code, notes, and snippets.

@kotakanbe
kotakanbe / ipcalc.go
Created September 17, 2015 02:59
get all IP address from CIDR in golang
package main
import (
"net"
"os/exec"
"github.com/k0kubun/pp"
)
func Hosts(cidr string) ([]string, error) {
  • Based on https://gist.github.com/mdziekon/221bdb597cf32b46c50ffab96dbec08a
  • Installation date: 16-08-2019
  • Additional notes based on my own experience
  • EFI boot
  • Ubuntu 19.04 -> 21.04
  • This should work on any computer. Only the RAID > AHCI change described below and the device name for the nvme ssd drive are specific to this laptop.
  • The process describes a completely fresh installation with complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled) as long as Windows already boots with EFI.
  • The process was conducted on Dell's XPS 15 9560 (2017) with specs:
  • CPU: i7-7700HQ
@ruzickap
ruzickap / git-repository-gpg-crypt
Created November 1, 2019 15:54
Make git repository encrypted with generated GPG key which can be used by CI/CD to access the git repo when using GitHub Actions
# Make sure you are using gpg2
git config --global gpg.program gpg2
# Clone empty repository
git clone git@github.com:ruzickap/terraform-gitops.git
# Configure a repository to use git-crypt
cd terraform-gitops
git-crypt init

Metasploitable (60 min)

Metasploitable est un serveur sous Ubuntu 8.0.4 server. Un certain nombre de services vulnérables sont inclus : tomcat, distcc, tkiwiki, twiki et un serveur de base de données MySQL.

Metasploitable 2 (60 min)

La deuxième machine virtuelle metasploitable fournie par Offensive Security.

SSH Agent Hijacking (60 min)

Vous venez d’arriver dans l’équipe et votre collègue sysadmin refuse de vous donner les droits root car "il est trop tôt".