summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-20 08:14:35 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-20 08:14:35 (GMT)
commitc6e9cce694840ff0a7592d74d062e73c1703b36b (patch)
tree2c1d649b11a62770dbee1b0f3f14abc53b981732
parent6c8379d9377bee937afacbd2d99498f894da4fd0 (diff)
Add info about return value
-rw-r--r--webengineviewer/src/checkphishingurl/searchfullhashjob.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp b/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp
index a0be23f..31703c2 100644
--- a/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp
+++ b/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp
@@ -54,6 +54,39 @@ void SearchFullHashJob::setUseCompactJson(bool useCompactJson)
void SearchFullHashJob::parse(const QByteArray &replyStr)
{
+ /*
+
+{
+ "matches": [{
+ "threatType": "MALWARE",
+ "platformType": "WINDOWS",
+ "threatEntryType": "URL",
+ "threat": {
+ "hash": "WwuJdQx48jP-4lxr4y2Sj82AWoxUVcIRDSk1PC9Rf-4="
+ },
+ "threatEntryMetadata": {
+ "entries": [{
+ "key": "bWFsd2FyZV90aHJlYXRfdHlwZQ==", // base64-encoded "malware_threat_type"
+ "value": "TEFORElORw==" // base64-encoded "LANDING"
+ }]
+ },
+ "cacheDuration": "300.000s"
+ }, {
+ "threatType": "SOCIAL_ENGINEERING",
+ "platformType": "WINDOWS",
+ "threatEntryType": "URL",
+ "threat": {
+ "hash": "771MOrRPMn6xPKlCrXx_CrR-wmCk0LgFFoSgGy7zUiA="
+ },
+ "threatEntryMetadata": {
+ "entries": []
+ },
+ "cacheDuration": "300.000s"
+ }],
+ "minimumWaitDuration": "300.000s",
+ "negativeCacheDuration": "300.000s"
+}
+*/
QJsonDocument document = QJsonDocument::fromJson(replyStr);
if (document.isNull()) {
Q_EMIT result(WebEngineViewer::SearchFullHashJob::Unknown, mUrl);