-
Notifications
You must be signed in to change notification settings - Fork 252
Expand file tree
/
Copy pathputtest.sh
More file actions
executable file
·37 lines (27 loc) · 894 Bytes
/
puttest.sh
File metadata and controls
executable file
·37 lines (27 loc) · 894 Bytes
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
36
#!/bin/bash
##########################################################################
# Coloured variables
##########################################################################
red=`echo -e "\033[31m"`
lcyan=`echo -e "\033[36m"`
yellow=`echo -e "\033[33m"`
green=`echo -e "\033[32m"`
blue=`echo -e "\033[34m"`
purple=`echo -e "\033[35m"`
normal=`echo -e "\033[m"`
read -e -p "Enter Target Web Server (e.g. http://domain.com:8080): " target
echo ""
echo "$yellow Trying Method 1.. $normal"
echo ""
curl -i -X PUT -H "Content-Type: application/xml; charset=utf-8" -d @"/tmp/some-file.xml" $target/newpage
echo ""
echo ""
echo "$yellow Trying Method 2.. $normal"
echo ""
curl -i -H "Accept: application/json" -X PUT -d "text or data to put" $target/new_page
echo ""
#echo ""
#echo "Trying Method X.."
#echo ""
#curl -X PUT -d "text or data to put" $target/destination_page
echo ""