root@rpi4:~# uptime
00:16:11 up 3 min, 2 users, load average: 0,09, 0,27, 0,13
root@rpi4:~# vcgencmd measure_temp
temp=61.0'C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# Switch the default GIT branch from `master` to `main` | |
# for GitHub users, it can do the remote change too, but: | |
# 1. assumes that the name of the current directory name is the repo name | |
# 2. you must provide valid user and token to authenticate | |
user= | |
token= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* rxmastree - tool to find reverse Xmas tree declarations in a source tree | |
* Copyright (C) 2019 Matteo Croce <mcroce@redhat.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
lip=192.168.0.1 | |
rip=192.168.0.2 | |
ip netns add peer | |
ip link add name vethov type veth peer name vethov netns peer | |
ip addr add ${lip}/24 dev vethov | |
ip -n peer addr add ${rip}/24 dev vethov | |
ip link set vethov up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
lip=192.168.0.1 | |
rip=192.168.0.2 | |
lip2=192.168.1.1 | |
rip2=192.168.1.2 | |
wg genkey >wg1.priv | |
wg pubkey <wg1.priv >wg1.pub | |
wg genkey >wg2.priv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SCTPrank - a tool to fill the kernel memory using SCTP network buffers | |
* its main purpose was to test CVE-2019-3874 | |
* Copyright (C) 2019 Matteo Croce <mcroce@redhat.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* numbers.c - number formatting library | |
* Copyright (C) 2019 Matteo Croce <mcroce@redhat.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* maint.go - convert MAINTAINERS file from plain text to JSON | |
* Copyright (C) 2018 Matteo Croce <mcroce@redhat.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <arpa/inet.h> | |
#include <asm/byteorder.h> | |
#include <linux/bpf.h> | |
#include <linux/if_ether.h> | |
#include <linux/ip.h> | |
#include <linux/tcp.h> | |
#include <linux/pkt_cls.h> | |
/* |