Fixed string messages

This commit is contained in:
g1n 2021-07-09 14:25:17 +00:00
parent 037437207b
commit 0894509a47
1 changed files with 2 additions and 2 deletions

View File

@ -19,11 +19,11 @@ usage() {
}
request(){
page=$(printf "$host /$path $post_len\r\n$post" | nc $host $port)
page=$(printf "$host /$path $post_len\r\n$post\r\n" | nc $host $port)
status=$(echo $page | awk 'NR == 1 {print $1}')
meta=$(echo $page | awk 'NR == 1 {$1=="";print}')
if [[ $status == 2 ]]; then
echo -e "$page\n" | awk 'NR > 1 {print}'
echo -e "$page" | awk 'NR > 1 {print}'
elif [[ $status == 3 ]]; then
#path=$meta
printf "%s %s %s\r\n%s\r\n" "$host" "/$path/" "$post_len" "$post" | nc $host $port | awk 'NR > 1 {print}'