socket.error: [Errno 32] Broken pipe error

4.4k views Asked by At

When I am running the code provided by Virustotal, I am getting this error:

socket.error: [Errno 32] Broken pipe error

I am naive in Python, Any help will be highly appreciated..

import postfile
host = "www.virustotal.com"
selector = "https://www.virustotal.com/vtapi/v2/file/scan"
fields = [("apikey", "1fe0ef5feca2f84eb450bc3617f839e317b2a686af4d651a9bada77a522201b0")]
file_to_send = open("test.txt", "rb").read()
files = [("file", "test.txt", file_to_send)]
json = postfile.post_multipart(host, selector, fields, files)
print json
0

There are 0 answers