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> | |
#include<string.h> | |
void main(){ | |
const char str[] = "Heya Buddy"; | |
printf("sizeof(%s): %zu\n", str ,sizeof(str)); | |
printf("strlen(%s): %zu\n", str, strlen(str)); |
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 | |
if [[ $EUID -ne 0 ]]; then | |
echo "[-] This script must be run as root [-]" | |
exit 1 | |
fi | |
echo "[+] Reseting Initiated [+]" | |
ufw disable | |
echo "[?] Current Status [?]" | |
ufw status numbered verbose |
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 signal | |
TIMEOUT = 2 # number of seconds your want for timeout | |
import sys | |
flag = 0 | |
def interrupted(signum, frame): | |
"called when read times out" | |
#raise RuntimeError() | |
sys.exit(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
from hashlib import sha1 | |
import sys | |
def pow(challenge = "Bitcoin", numZeros = 2): | |
""" | |
Calculating the token that matches the proof of work. | |
Sample values by default: "Bitcoin" and 2 consecutive zeroes. | |
""" |