LoginSignup
0
0

More than 1 year has passed since last update.

cscの作法 その240

Posted at

概要

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

>

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0