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
#Lists the binary files which runs with privileged rights | |
find / -perm -u=s -type f 2>/dev/null | |
# add the lines below to .bashrc file for autostarting the ssh-agent and adding all the private keys in msys2 | |
eval `ssh-agent -s` 1>/dev/null | |
find ~/.ssh/ -type f -exec grep -l "PRIVATE" {} \; | xargs ssh-add >/dev/null 2>&1 | |
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
# list connections of a process by name | |
alias lsofproc='lsof -a -i -c' | |
# list all executables in a folder | |
alias lse='find . -maxdepth 1 -type f -executable' | |
# go one level directory up | |
alias ..='cd ..' | |
# go three level directory up | |
alias ...='cd ../../' | |
alias c='clear' | |
# untar a file |
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
Server is tinydtls, compiled with both Raw Public Key and PSK support, version 0.8.6 | |
psk_identity=Client_identity | |
psk_key=secretPSK | |
# psk in hex form | |
psk_key=73656372657450534b | |
# start tinydtls server | |
./dtls-server -v 6 | |
# generate a secp256r1(prime256v1 or Nist 256-p) private and public key |
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
"astyle.cmd_options": [ | |
"--style=allman", | |
"--indent=spaces=4", | |
"--indent-col1-comments", | |
"--pad-oper", | |
"--pad-comma", | |
"--pad-header", | |
//"--style=1tbs", | |
"--attach-extern-c", | |
"--attach-closing-while", |
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
// C program to illustrate | |
// non I/O blocking calls | |
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> // library for fcntl function | |
#define MSGSIZE 16 | |
char* msg1 ="hello"; | |
char* msg2 ="bye !!"; |
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
openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name prime256v1) -keyout cert.key -out cert.crt -days 365 |
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 <stdio.h> | |
void dump_hex(const void *data, size_t size, char *output) | |
{ | |
char ascii[17]; | |
size_t i, j; | |
ascii[16] = '\0'; | |
for (i = 0; i < size; ++i) | |
{ |
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
# create a folder with name .duckdns in the current user | |
# fill the domain and token fields in the code below | |
# then create a file with name duck.py and copy the lines starting with #!/usr/bin/python3 | |
# chmod +x duck.py | |
# then create an entry in crontab with the line below | |
# */15 * * * * ~/.duckdns/duck.py >> ~/.duckdns/cron.log 2>&1 | |
#!/usr/bin/python3 |
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
Linux rock64 4.4.167-1213-rockchip-ayufan-g34ae07687fce #1 SMP Tue Jun 18 20:44:49 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux | |
rock64@rock64:~$openssl speed -aead -evp aes-128-gcm | |
rock64@rock64:~$openssl speed -aead -evp aes-256-gcm | |
rock64@rock64:~$openssl speed -aead -evp chacha20-poly1305 | |
type 2 bytes 31 bytes 136 bytes 1024 bytes 8192 bytes 16384 bytes | |
---- ------- -------- --------- ---------- ---------- ----------- | |
aes-128-gcm 2326.81k 29137.11k 108788.53k 360005.63k 482115.58k 492399.27k | |
aes-256-gcm 2256.78k 28163.19k 102470.97k 320374.44k 420995.35k 423843.16k | |
chacha20-poly1305 807.76k 11608.37k 32482.65k 129967.34k 167075.84k 169951.23k |
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/bash | |
# download hosts file | |
wget -O /opt/adblock/hostfiles/someonewhocares.hosts https://someonewhocares.org/hosts/zero/hosts | |
wget -O /opt/adblock/hostfiles/winhelp2002.hosts http://winhelp2002.mvps.org/hosts.txt | |
wget -O /opt/adblock/hostfiles/tgccloud.hosts https://tgc.cloud/downloads/hosts.txt | |
wget -O /opt/adblock/hostfiles/stevensblack.hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | |
wget -O /opt/adblock/hostfiles/hblock.hosts https://hblock.molinero.dev/hosts | |
wget -O /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts https://raw.githubusercontent.com/x0uid/SpotifyAdBlock/master/hosts | |
wget -O /opt/adblock/hostfiles/spotify_saminnet_spotify_adblock_script.hosts https://raw.githubusercontent.com/saminnet/spotify-adblock-script/master/block.txt |
OlderNewer