From dba5e68d3b174513da36cce2ab72c16b63b9d2f3 Mon Sep 17 00:00:00 2001 From: G <52905881+giga-a@users.noreply.github.com> Date: Sat, 6 Feb 2021 11:31:26 -0800 Subject: [PATCH] [special request] added yes, maybe & no to ouput - ref 20a22f21 & 35b59df6 --- app.js | 9 +++++---- app.py | 8 ++++---- modules/fast-scan.js | 12 +++++++++++- modules/helper.js | 1 + public/app.html | 10 +++++----- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/app.js b/app.js index 5179cdf..de6b6ab 100644 --- a/app.js +++ b/app.js @@ -454,6 +454,7 @@ async function check_user_cli(argv) { } else { var temp_detected = { "detected": [], + "maybe": [], "unknown": [], "failed": [] } @@ -466,7 +467,7 @@ async function check_user_cli(argv) { item = clean_up_item(item,argv.options) temp_detected.detected.push(item) } else { - item = delete_keys(item,['found','rate','method','good']) + item = delete_keys(item,['found','rate','exist','method','good']) item = clean_up_item(item,argv.options) temp_detected.unknown.push(item) } @@ -477,11 +478,11 @@ async function check_user_cli(argv) { temp_detected.detected.push(item) } } else if (item.method == "get") { - item = delete_keys(item,['found','rate','method','good']) + item = delete_keys(item,['found','rate','exist','method','good']) item = clean_up_item(item,argv.options) temp_detected.unknown.push(item) } else if (item.method == "failed") { - item = delete_keys(item,['found','rate','method','good','text','language','title','type']) + item = delete_keys(item,['found','rate','exist','method','good','text','language','title','type']) item = clean_up_item(item,argv.options) temp_detected.failed.push(item) } @@ -501,7 +502,7 @@ async function check_user_cli(argv) { if (argv.output == "pretty" || argv.output == "") { if ('detected' in temp_detected) { - helper.log_to_file_queue(req.body.uuid, "\n[Detected] " + temp_detected.detected.length + " Profile[s]\n"); + helper.log_to_file_queue(req.body.uuid, "\n[detected] " + temp_detected.detected.length + " Profile[s]\n"); helper.log_to_file_queue(req.body.uuid, temp_detected.detected, true); } if ('unknown' in temp_detected) { diff --git a/app.py b/app.py index d68f6ea..d10fe20 100644 --- a/app.py +++ b/app.py @@ -349,7 +349,7 @@ def check_user_cli(argv): item = clean_up_item(item,argv.options) temp_detected["detected"].append(item) else: - item = delete_keys(item,["found","rate","method","good"]) + item = delete_keys(item,["found","rate","exist","method","good"]) item = clean_up_item(item,argv.options) temp_detected["unknown"].append(item) elif item["method"] == "find": @@ -358,11 +358,11 @@ def check_user_cli(argv): item = clean_up_item(item,argv.options) temp_detected["detected"].append(item) elif item["method"] == "get": - item = delete_keys(item,["found","rate","method","good"]) + item = delete_keys(item,["found","rate","exist","method","good"]) item = clean_up_item(item,argv.options) temp_detected["unknown"].append(item) else: - item = delete_keys(item,["found","rate","method","good","text","title","language","rate"]) + item = delete_keys(item,["found","rate","exist","method","good","text","title","language","rate"]) item = clean_up_item(item,argv.options) temp_detected["failed"].append(item) @@ -434,4 +434,4 @@ if __name__ == "__main__": list_all_websites() elif argv.mode == "fast": if argv.username != "" and argv.websites != "": - check_user_cli(argv) \ No newline at end of file + check_user_cli(argv) diff --git a/modules/fast-scan.js b/modules/fast-scan.js index daf3f28..bf3fb87 100644 --- a/modules/fast-scan.js +++ b/modules/fast-scan.js @@ -128,7 +128,17 @@ async function find_username_site(uuid, username, options, site) { temp_profile.title = title; temp_profile.language = language; if (temp_profile.good == "true") { - temp_profile.rate = "%" + ((temp_profile["found"] / detections_count) * 100).toFixed(2); + var temp_value = ((temp_profile["found"] / detections_count) * 100).toFixed(2) + temp_profile.rate = "%" + temp_value; + if (temp_value >= 100.00){ + temp_profile.exist = "Yes" + } + else if (temp_value >= 50.00 && temp_value < 100.00){ + temp_profile.exist = "Maybe" + } + else{ + temp_profile.exist = "No" + } } temp_profile.link = site.url.replace("{username}", username); temp_profile.type = site.type diff --git a/modules/helper.js b/modules/helper.js index e9a41ae..2a64283 100644 --- a/modules/helper.js +++ b/modules/helper.js @@ -28,6 +28,7 @@ var profile_template = { "image": "", "link": "", "rate": "", + "exist": "No", "title": "", "language": "", "text": "", diff --git a/public/app.html b/public/app.html index b6896d5..260d0db 100644 --- a/public/app.html +++ b/public/app.html @@ -1018,7 +1018,7 @@ if (site.image != "") { temp_image = '' } - temp_tr += '
Link: ' + site.link + '
Rate: ' + site.rate + '
Title: ' + site.title + + temp_tr += '' } }); @@ -1047,7 +1047,7 @@ data.user_info_normal.data.forEach(function(site) { if (site.method == "all") { if (site.good == "true"){ - temp_tr += '