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
#!/bin/bash | |
SERVER_IP=$1 | |
SERVER_PORT=$2 | |
ping_result=$(ping -c 1 -w 1 $SERVER_IP > /dev/null && echo "online" || "offline") | |
get_latency() { | |
local latency_output=$(ping -c 1 "$SERVER_IP" -p "$SERVER_PORT" | grep -oP 'time=\K\d+(.\d+)?') | |
echo "$latency_output" |
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
from __future__ import annotations | |
from typing import List, Optional | |
def create_variations(key_word_string: Optional[str] = None) -> Optional[str]: | |
if key_word_string is None or not isinstance(key_word_string, str): | |
return None | |
tmp_variations: List = [] | |
for char_i in range(len(key_word_string)): | |
tmp_variation_list: list[str] = list(key_word_string) |
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
if ! hash python3; then | |
echo "[!] ERR: python is not installed" | |
exit 1 | |
fi | |
ver=$(python3 -V 2>&1 | sed 's/.* \([0-9]\).\([0-9]\).*/\1\2/') | |
if [ "$ver" -lt "31" ]; then | |
echo "[!] ERR: This script requires python 3.10 or greater" | |
exit 1 | |
fi |
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
[BITS 16] | |
[ORG 0x7C00] | |
; change video mode to 80x25 | |
mov ah, 0x00 | |
mov al, 0x03 | |
int 0x10 ; call bios | |
; change boot backgrund color to blue | |
mov ah, 0x0B |