node-virustotal
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "node-virustotal", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "An implementation of the Virustotal API for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "code.js", |
@@ -45,7 +45,16 @@ # node-virustotal | ||
### PublicConnection.checkIPv4() | ||
This function takes 3 parameters: an IPv4 address, a function to perform if a result is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. | ||
This function takes 3 parameters: an IPv4 address, a function to perform if a result is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. It analyzes a particular IP address. | ||
### PublicConnection.getDomainReport() | ||
This function takes 3 parameters: a DNS address "without the protocol", a function to perform if a result is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. | ||
This function takes 3 parameters: a DNS address "without the protocol", a function to perform if a result is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. It analyzes a domain name. | ||
### PublicConnection.submitUrlForScanning() | ||
This function takes 3 parameters: a URL for scanning "with the protocol", a function to perform if a confirmation is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. It submits a URL for the analysis queue. | ||
### PublicConnection.retrieveUrlAnalysis() | ||
This function takes 3 parameters: a URL for scanning "with the protocol", a function to perform if a confirmation is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. It checks to see if the report on a given URL is done, and continues checking until it's done or an error happens. This can take hours, so DO NOT USE THIS FOR ANYTHING WITH A CLIENT RESPONSE! | ||
### PublicConnection.retrieveUrlAnalysisWithRescan() | ||
This function takes 3 parameters: a URL for scanning "with the protocol", a function to perform if a confirmation is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. This does the same thing as retrieveUrlAnalysis, but it also requests that the URL in question be rescanned. | ||
### PublicConnection example | ||
@@ -70,2 +79,12 @@ | ||
}); | ||
con.submitUrlForScanning("http://wikionemore.com",function(data){ | ||
console.dir(data); | ||
}, function(err){ | ||
console.error(err); | ||
}); | ||
con.retrieveUrlAnalysis("http://wikionemore.com",function(data){ | ||
console.dir(data); | ||
}, function(err){ | ||
console.error(err); | ||
}); | ||
/*Sidenote: That's a real phishing site. It was shut down, but I still advise against going to it.*/ | ||
@@ -95,2 +114,12 @@ ``` | ||
### Honeypot2Connection.submitUrlForScanning() | ||
This function takes 3 parameters: a URL for scanning "with the protocol", a function to perform if a confirmation is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. It submits a URL for the analysis queue. | ||
### Honeypot2Connection.retrieveUrlAnalysis() | ||
This function takes 3 parameters: a URL for scanning "with the protocol", a function to perform if a confirmation is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. It checks to see if the report on a given URL is done, and continues checking until it's done or an error happens. This can take hours, so DO NOT USE THIS FOR ANYTHING WITH A CLIENT RESPONSE! | ||
### Honeypot2Connection.retrieveUrlAnalysisWithRescan() | ||
This function takes 3 parameters: a URL for scanning "with the protocol", a function to perform if a confirmation is obtained, and a function to perform if an error is obtained. The two functions both take a single parameter. In the case of the first function, said parameter will always be a response object. In the case of the second parameter, this is an error object which may be an object of some kind. This does the same thing as retrieveUrlAnalysis, but it also requests that the URL in question be rescanned. | ||
### Honeypot2Connection example | ||
@@ -115,2 +144,12 @@ | ||
}); | ||
con.submitUrlForScanning("http://wikionemore.com",function(data){ | ||
console.dir(data); | ||
}, function(err){ | ||
console.error(err); | ||
}); | ||
con.retrieveUrlAnalysis("http://wikionemore.com",function(data){ | ||
console.dir(data); | ||
}, function(err){ | ||
console.error(err); | ||
}); | ||
/*Sidenote: That's a real phishing site. It was shut down, but I still advise against going to it.*/ | ||
@@ -123,1 +162,3 @@ ``` | ||
The Virustotal API supports 3 hash algorithms: MD5, SHA1, and SHA256 "A member of the SHA2 family". MD5 is well known to be broken. SHA1 is theorized to have collisions, though none are known. SHA2 is not widely regarded as flawed, but was published by the US NSA, so make what you will of that. | ||
The site mentioned in the example code is a known phishing site. It was shut down, but I still advise against going to it. It is used here because it makes an easy to understand example. |
@@ -8,3 +8,2 @@ var vt = require("./code.js"); | ||
console.log(con.getDelay()); | ||
con.checkIPv4("90.156.201.27",function(data){ | ||
@@ -20,3 +19,3 @@ console.dir(data); | ||
}); | ||
con.retrieveUrlAnalysis("wikionemore.com",function(data){ | ||
con.retrieveUrlAnalysis("http://wikionemore.com",function(data){ | ||
console.dir(data); | ||
@@ -23,0 +22,0 @@ }, function(err){ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17098
160