This file contains hidden or 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
/* | |
* m1cat: a proof of concept for the M1RACLES vulnerability in the Apple M1. | |
* | |
* This program implements a covert channel that can be used to transmit data | |
* between two processes when run on the Apple Silicon "M1" CPUs. | |
* | |
* The channel is slightly lossy due to (presumably) the scheduler sometimes | |
* scheduling us on the wrong CPU cluster, so this PoC sends every byte twice | |
* together with some metadata/framing bits, which is usually good enough. | |
* A better approach would be to use proper FEC or something like that. |
This file contains hidden or 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
echo test |
This file contains hidden or 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
Ali-CDN-Real-IP | |
CF-Connecting-IP | |
Cdn-Real-Ip | |
Cdn-Src-Ip | |
Client-IP | |
Fastly-Client-Ip | |
Forwarded | |
Forwarded-For | |
Proxy-Client-IP | |
True-Client-IP |
This file contains hidden or 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
pandoc -i p1hlafsis71j51eol1rjn12gd1v694.md -o podsuj.pdf --template=./eisvogel.latex -V book -V table-use-row-colors:true -V toc-own-page:true -V papersize:a5 -V fontsize="8pt" --listings --number-sections --highlight-style espresso --top-level-division=chapter -V classoption=oneside -V listings-no-page-break -V geometry:top=2cm -V geometry:bottom=2cm -V geometry:left=1cm -V geometry:right=1cm |
This file contains hidden or 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
# usage pods_on.sh <node1> <node2> <label1=value1> <label2=value2> <...> <kubectl_flags> | |
# example pods_on.sh node1 "ingress in (true)" -o wide | |
flags=(); nodes=(); k=true | |
for arg in "${@}"; do | |
if [[ $arg == "-"* ]]; then k=false; fi | |
$k && { [[ $arg == *"="* || $arg == *"("* ]] && nodes+=($(kubectl get nodes -l "$arg" -o jsonpath='{.items[*].metadata.name}')) || nodes+=($arg); } || flags+=($arg) | |
done | |
nodes=($(echo "${nodes[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')) |
This file contains hidden or 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
# jqw data.json | |
jqw () | |
{ | |
echo '' | fzf --print-query --preview "cat $1 | jq {q}" | |
} | |
# fzi "cat a.json | jq {q}" | |
# fzi "cat a.json | awk {q}" | |
fzi () | |
{ | |
echo '' | fzf --print-query --preview $1 |
This file contains hidden or 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/python3 | |
from bcc import BPF | |
from time import sleep | |
from bcc.syscall import syscall_name, syscalls | |
program = r""" | |
RAW_TRACEPOINT_PROBE(sys_enter) { | |
u64 uid; | |
u64 counter = 0; |
This file contains hidden or 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
table_alphabet = "AZBYCVÇÜDUETFŞGSĞRHPIÖİOJNKML" | |
alphabet = "ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ" | |
def vinegere_table(alphabet): | |
table = [] | |
for i in range(len(alphabet)): | |
table.append(alphabet[-i:] + alphabet[:-i]) | |
return table | |
table = vinegere_table(table_alphabet) |
This file contains hidden or 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
package main | |
import "fmt" | |
type AND map[bool]map[bool]bool | |
const ( | |
TRUE = true | |
FALSE = false | |
) |
This file contains hidden or 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
list=$(ls out) | |
# #ffmpeg -i out/comp_GMT329_113NC_396B_1105_CHINA_v04_SDR_FINAL_20180706_F900F2700_SDR_2K_HEVC.mkv -c copy -f null - 2>&1 | grep time= | awk -F 'time=' '{print $2}' | awk '{print $1}' | awk '{split($1,a,":"); print a[3]}' | |
for file in $list; do | |
time=$(ffmpeg -i out/$file -c copy -f null - 2>&1 | grep time= | awk -F 'time=' '{print $2}' | awk '{print $1}' | awk '{split($1,a,":"); print a[3]}') | |
# parse float | |
time=$(echo $time | awk '{print int($1)}') | |
if [ $time -lt 20 ]; then | |
#rm out/$file |