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
#define _GNU_SOURCE | |
#include <fcntl.h> | |
#include <sched.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, const char *argv[]) { | |
if (argc != 3) { | |
printf("Usage:\n"); |
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
nodes: | |
- name: R1 | |
image: nicolaka/netshoot | |
interfaces: | |
- { name: net0, type: direct, args: R2#net0 } | |
- { name: net1, type: direct, args: C11#net0 } | |
- { name: net2, type: direct, args: C21#net0 } | |
- name: R2 | |
image: nicolaka/netshoot | |
interfaces: |
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
#!/usr/bin/env bpftrace | |
#include <linux/netdevice.h> | |
#include <linux/skbuff.h> | |
tracepoint:skb:kfree_skb { | |
$skb = (struct sk_buff *)args->skbaddr; | |
if ($skb->mark == 0x23456) { | |
printf("------------------------------------------------------------\n"); |
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
// in Cargo.toml | |
// [dependencies] | |
// libc = "0.2.83" | |
// nix = "0.19.0" | |
use std::os::unix::io::AsRawFd; | |
use std::net::UdpSocket; | |
use std::net::SocketAddr; | |
use nix::cmsg_space; |
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
Vagrant.configure("2") do |config| | |
config.vm.provider "libvirt" do |libvirt| | |
libvirt.uri = "qemu:///system" | |
end | |
config.vm.define "server" do |config| | |
config.vm.box = "generic/ubuntu1804" | |
config.vm.network "private_network", ip: "192.0.2.2", auto_config: false | |
config.vm.provider "libvirt" do |libvirt| | |
libvirt.cpus = 16 |
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 <linux/init.h> | |
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/kthread.h> | |
#include <net/net_namespace.h> | |
#include <linux/socket.h> | |
#include <linux/in.h> | |
#include <linux/delay.h> |
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
from copy import deepcopy | |
from dataclasses import dataclass | |
from typing import Any, Callable, List, TypeVar | |
Input = TypeVar("Input") | |
Output = TypeVar("Output") | |
@dataclass |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import dataclasses | |
from fractions import Fraction | |
import math | |
from queue import PriorityQueue | |
from typing import * | |
@dataclasses.dataclass | |
class InformationSourceElement: |
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
/opt/zoom/zoom { | |
file, | |
network, | |
# capability, | |
# mount, | |
# ptrace, | |
signal, | |
unix, | |
# change_profile, | |
dbus, |
NewerOlder