概要
cscの作法、調べてみた。
virustotalのapi叩いてみた。
サンプルコード
using System.Collections;
using System.IO;
using System;
using System.Text;
using LitJson;
using System.Net;
using System.Net.Http;
namespace app
{
class test0 {
static void Main() {
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
string url = "https://www.virustotal.com/vtapi/v2/file/report?apikey=******&resource=52d3df0ed60c46f336c131bf2ca454f73bafdc4b04dfa2aea80746f5ba9e6d1c";
HttpClient client = new HttpClient();
string response = client.GetStringAsync(url).Result;
LitJson.JsonData json = LitJson.JsonMapper.ToObject(response);
Console.WriteLine("total: " + json["total"]);
Console.WriteLine("positive: " + json["positives"]);
}
}
}
実行結果
>virustotal0
total: 67
positive: 55
>
以上。