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/sh | |
if [[ ! -f sample.txt ]]; then | |
echo "Error : Sample.txt does not exist."; | |
exit; | |
fi | |
ORIGINAL_HASH=$(cat hash.txt); | |
NEW_HASH=$(openssl sha1 sample.txt); | |
if [ "$ORIGINAL_HASH" = "$NEW_HASH" ]; |
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
str1 = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:\"ZXCVBNM<>?" | |
str2 = "_ๅ/-ภถุึคตจขชๆไำพะัีรนยบลฃฟหกดเ้่าสวงผปแอิืทมใฝ%+๑๒๓๔ู฿๕๖๗๘๙๐\"ฎฑธํ๊ณฯญฐ,ฅฤฆฏโฌ็๋ษศซ.()ฉฮฺ์?ฒฬฦ" | |
in_text = input().strip() | |
out_text = '' | |
for char in in_text: | |
for i in range(0, len(str1)): | |
if str1[i] == char: |