Jan 2, 2020 10:59 AM
(This post was last modified: Jan 2, 2020 11:02 AM by ๖ۣۜchαmєllєσ.)
I am trying to lookup/scan the status of URLs with the Google Safe Browsing API v4, I tried the method I found in this link How to use Google Safe Browsing (v4) with .NET, but i get a null response returned.
Here's the code:
My Response:
At this point I feel I am doing something very wrong and I need HELP!!!
Here's the code:
Code
private async void checkUrlBtn_Click(object sender, EventArgs e)
{
var service = new SafebrowsingService(new BaseClientService.Initializer
{
ApplicationName = "dotnet-client",
ApiKey = "[Fake API Key]AIzaSkuyfkuyI_kbyfuylijldcDfhG-g6t"
});
var request = service.ThreatMatches.Find(new FindThreatMatchesRequest()
{
Client = new ClientInfo
{
ClientId = "Dotnet-client",
ClientVersion = "1.5.2"
},
ThreatInfo = new ThreatInfo()
{
ThreatTypes = new List<string> { "SOCIAL_ENGINEERING" },
PlatformTypes = new List<string> { "PLATFORM_TYPE_UNSPECIFIED" },
ThreatEntryTypes = new List<string> { "URL" },
ThreatEntries = new List<ThreatEntry>
{
new ThreatEntry
{
Url = "https://someurlIGotFromPhishtank.com"
}
}
}
});
var response = await request.ExecuteAsync();
string json = JsonConvert.SerializeObject(response);
string jsonFormatted = JToken.Parse(json).ToString(Formatting.Indented);
Console.WriteLine(jsonFormatted);
}My Response:
Code
{
"matches": null,
"ETag": null
}![[Image: KCnKyds.jpg]](https://i.imgur.com/KCnKyds.jpg)



![[Image: vp6iypF.gif]](https://i.imgur.com/vp6iypF.gif)
