paloaltonetworks:api:url_testing
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| paloaltonetworks:api:url_testing [2020/05/23 12:15] – created bstafford | paloaltonetworks:api:url_testing [2022/11/23 12:49] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| If you want to process the URL category example, you can use the following. It produces the format ''< | If you want to process the URL category example, you can use the following. It produces the format ''< | ||
| < | < | ||
| + | |||
| + | |||
| + | |||
| + | ====== Check URL Category from File List ===== | ||
| + | |||
| + | Run the following file called ' | ||
| + | < | ||
| + | It will output to cleandata.csv | ||
| + | < | ||
| + | |||
| + | Counter=0 | ||
| + | |||
| + | NameOfOutput=cleandata.csv | ||
| + | |||
| + | TotalLines=`wc -l $1 | awk -F " " ' | ||
| + | |||
| + | StartTime=`date` | ||
| + | |||
| + | echo " " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " " | ||
| + | |||
| + | while IFS='' | ||
| + | ((Counter++)) | ||
| + | |||
| + | KEY=" | ||
| + | |||
| + | CMD="< | ||
| + | |||
| + | URL=" | ||
| + | |||
| + | echo " | ||
| + | curl --insecure -g -s -X GET $URL | grep Cloud | sed ' | ||
| + | |||
| + | done < " | ||
| + | |||
| + | echo " " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo "Start time : $StartTime" | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | ===== Check DNS From File List ===== | ||
| + | < | ||
| + | |||
| + | Counter=0 | ||
| + | |||
| + | NameOfOutput=cleandns.csv | ||
| + | |||
| + | TotalLines=`wc -l $1 | awk -F " " ' | ||
| + | |||
| + | StartTime=`date` | ||
| + | |||
| + | echo " " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " " | ||
| + | |||
| + | while IFS='' | ||
| + | ((Counter++)) | ||
| + | |||
| + | KEY=" | ||
| + | |||
| + | CMD="< | ||
| + | |||
| + | URL=" | ||
| + | |||
| + | echo " | ||
| + | curl --insecure -g -s -X GET $URL | grep result | sed s/ | ||
| + | |||
| + | done < " | ||
| + | |||
| + | echo " " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo "Start time : $StartTime" | ||
| + | echo " | ||
| + | |||
| + | #output | ||
| + | # | ||
| + | # | ||
| + | #0=benign | ||
| + | #1=malware | ||
| + | #2=c2 | ||
| + | #3=phishing | ||
| + | #4=dynamic | ||
| + | #5=new | ||
| + | #6=grayware | ||
| + | #7=parked | ||
| + | # | ||
paloaltonetworks/api/url_testing.1590236159.txt.gz · Last modified: (external edit)
