| 1 | #!/bin/bash |
| 2 | |
| 3 | protocol='https'; #https? |
| 4 | |
| 5 | #<p>The answer to your request is located <a href="/reanalisis.html?031765e5cda19bbc8deb2aba9385b5da1e2d2586488553a400cf2474f4c655df-1243110100">here</a>.</p> |
| 6 | #<p>The answer to your request is located <a href="/analisis/6cba671c2012a2bc8931b00808c3635953eb28e02737e33b4cfddeaa66fd415c-1243110122">here</a>.</p> |
| 7 | #curl --location -F "archivo=@good" -F "distribuir=1" 'http://www.virustotal.com/vt/en/recepcion'; |
| 8 | |
| 9 | echo "Uploading file..." |
| 10 | location=$(curl -# -F "archivo=@bad" -F "distribuir=1" "$protocol://www.virustotal.com/vt/en/recepcion" | grep -o '<a href=".*">' | cut -d '"' -f 2); |
| 11 | |
| 12 | if [[ "$?" == "0" ]] && [[ "$location" =~ /(.*)[\?/](.*) ]]; then |
| 13 | vthash="${BASH_REMATCH[2]}"; |
| 14 | else |
| 15 | echo hoops; |
| 16 | exit 2; |
| 17 | fi; |
| 18 | |
| 19 | vturl="$protocol://www.virustotal.com/analisis/$vthash"; |
| 20 | echo $vturl; |
| 21 | |
| 22 | |
| 23 | #curl -d hash=$(md5sum bad) "https://www.virustotal.com/vt/en/consultamd5" |