mirror of
https://github.com/qeeqbox/social-analyzer.git
synced 2026-10-01 22:14:52 +02:00
[auto] windows support - ref 8d6756c4
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<p align="center"> <img src="https://raw.githubusercontent.com/qeeqbox/social-analyzer/main/readme/socialanalyzerlogo_.png"></p>
|
||||
|
||||
#
|
||||
[](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/stargazers)
|
||||
[](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/blob/main/info) [](https://github.com/qeeqbox/social-analyzer/stargazers)
|
||||
|
||||
API, CLI & Web App for analyzing & finding a person profile across +300 social media websites. It includes different string analysis and detection modules, you can choose which combination of modules to use during the investigation
|
||||
|
||||
@@ -11,9 +11,10 @@ This project *is currently used by some law enforcement agencies in countries wh
|
||||
|
||||
The results from the analysis could help in investigating profiles related to suspicious or malicious activities such as [cyberbullying](https://en.wikipedia.org/wiki/Wikipedia:Cyberbullying), [cybergrooming](https://de.wikipedia.org/wiki/Cyber-Grooming) & [cyberstalking](https://en.wikipedia.org/wiki/Cyberstalking), [spreading misinformation](https://en.wikipedia.org/wiki/Misinformation)
|
||||
|
||||
**All Pull Requests are welcomed!**
|
||||
Make sure to download this tool from GitHub - (ONLY) ⚠️
|
||||
|
||||
## Updates
|
||||
- Added Windows support (Some features are disabled)
|
||||
- Added detection levels (This checks if detection meets the requirement or not)
|
||||
- Added dynamic language detections for profiles
|
||||
- Added --websites "all" for python & NodeJS CLI (You can scan ALL the websites within 2~10 seconds)
|
||||
@@ -61,27 +62,36 @@ Profile images **will not** be blurred. If you want them to be blurred, turn tha
|
||||
- Gmail (example@gmail.com)
|
||||
- Google (example@example.com)
|
||||
|
||||
## Install and run as web app (NodeJS + NPM + Firefox)
|
||||
## Install and run as web app (Linux + NodeJS + NPM + Firefox)
|
||||
```bash
|
||||
sudo add-apt-repository ppa:mozillateam/ppa
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y firefox-esr tesseract-ocr git
|
||||
git clone https://github.com/qeeqbox/social-analyzer.git
|
||||
cd social-analyzer
|
||||
rm -rf package-lock.json node_modules
|
||||
npm install lodash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Install and run as CLI (NodeJS + NPM + Firefox)
|
||||
## Install and run as web app (Windows + NodeJS + NPM + Firefox)
|
||||
```bash
|
||||
Download & Install firfox esr (Extended Support Release) from https://www.mozilla.org/en-US/firefox/enterprise/#download
|
||||
Download & Install https://nodejs.org/en/download/
|
||||
Download & Extract https://github.com/qeeqbox/social-analyzer/archive/main.zip
|
||||
cd social-analyzer
|
||||
npm install lodash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Install and run as CLI (Linux + NodeJS + NPM + Firefox)
|
||||
```bash
|
||||
sudo add-apt-repository ppa:mozillateam/ppa
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y firefox-esr tesseract-ocr git
|
||||
git clone https://github.com/qeeqbox/social-analyzer.git
|
||||
cd social-analyzer
|
||||
rm -rf package-lock.json node_modules
|
||||
npm install lodash
|
||||
npm install
|
||||
# If you want to list all websites use node app.js --cli --list
|
||||
@@ -89,7 +99,7 @@ npm install
|
||||
node app.js --cli --mode "fast" --username "johndoe" --websites "youtube pinterest tumblr" --output "pretty"
|
||||
```
|
||||
|
||||
## Install and run as CLI (Python3 + NPM + Firefox)
|
||||
## Install and run as CLI (Linux + Python3 + NPM + Firefox)
|
||||
```bash
|
||||
sudo add-apt-repository ppa:mozillateam/ppa
|
||||
sudo apt-get update
|
||||
@@ -136,6 +146,7 @@ sudo kill -9 $(sudo lsof -t -i:9005)
|
||||
## Disclaimer\Notes
|
||||
- This tool meant to be used locally (It does not have any type of Access Control)
|
||||
- If you want your website to be excluded from this project, please reach out
|
||||
- Make sure to download this tool from GitHub - ONLY ⚠️
|
||||
|
||||
## Contact
|
||||
[](https://qeeqbox.slack.com/messages/social-analyzer)
|
||||
|
||||
@@ -57,18 +57,18 @@ var pe = new PrettyError();
|
||||
require('express-async-errors');
|
||||
var _tokenizer = tokenizer();
|
||||
|
||||
var helper = require("./modules/helper.js")
|
||||
var fastScan = require("./modules/fast-scan.js")
|
||||
var slowScan = require("./modules/slow-scan.js")
|
||||
var special = require("./modules/special.js")
|
||||
var externalApis = require("./modules/external-apis.js")
|
||||
var stringAnalysis = require("./modules/string-analysis.js")
|
||||
var nameAnalysis = require("./modules/name-analysis.js")
|
||||
|
||||
if (!fs.existsSync('logs')) {
|
||||
fs.mkdirSync('logs');
|
||||
}
|
||||
|
||||
var helper = require("./modules/helper.js")
|
||||
var fastScan = require("./modules/fast-scan.js")
|
||||
var slowScan = require("./modules/slow-scan.js")
|
||||
var specialScan = require("./modules/special-scan.js")
|
||||
var externalApis = require("./modules/external-apis.js")
|
||||
var stringAnalysis = require("./modules/string-analysis.js")
|
||||
var nameAnalysis = require("./modules/name-analysis.js")
|
||||
|
||||
var app = express();
|
||||
|
||||
app.use(express.urlencoded({
|
||||
@@ -80,8 +80,8 @@ app.use(express.static("public"));
|
||||
app.post("/get_logs", async function(req, res, next) {
|
||||
var last_line = "nothinghere"
|
||||
if (req.body.uuid != "") {
|
||||
req.body.uuid = req.body.uuid.replace(/[^a-zA-Z0-9\-]+/g, '');
|
||||
var data = fs.readFileSync("logs/" + req.body.uuid + "_log.txt").toString();
|
||||
temp_log_file = helper.get_log_file(req.body.uuid)
|
||||
var data = fs.readFileSync(temp_log_file).toString();
|
||||
if (typeof data !== 'undefined' && data) {
|
||||
last_line = data.split('\n').slice(-2)[0];
|
||||
}
|
||||
@@ -225,7 +225,7 @@ app.post("/analyze_string", async function(req, res, next) {
|
||||
req.body.uuid = req.body.uuid.replace(/[^a-zA-Z0-9\-]+/g, '');
|
||||
if (req.body.option.includes("FindUserProfilesSpecial")) {
|
||||
helper.log_to_file_queue(req.body.uuid, "[Starting] Checking user profiles special")
|
||||
user_info_special.data = await special.find_username_special(req);
|
||||
user_info_special.data = await specialScan.find_username_special(req);
|
||||
helper.log_to_file_queue(req.body.uuid, "[Done] Checking user profiles special")
|
||||
}
|
||||
if (req.body.option.includes("FindUserProfilesFast")) {
|
||||
@@ -354,7 +354,7 @@ process.on('unhandledRejection', function(err) {
|
||||
helper.verbose && console.log(pe.render(err));
|
||||
})
|
||||
|
||||
const server_host = '0.0.0.0';
|
||||
const server_host = 'localhost';
|
||||
const server_port = process.env.PORT || 9005;
|
||||
|
||||
async function check_user_cli(argv) {
|
||||
|
||||
+99387
File diff suppressed because it is too large
Load Diff
+12283
File diff suppressed because it is too large
Load Diff
+8063
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,12 @@
|
||||
{"version":"2021.V.2.14",
|
||||
{"version":"2021.V.2.15",
|
||||
"build":"pass",
|
||||
"test":"pass",
|
||||
"grid_test":"pass",
|
||||
"websites":"346",
|
||||
"detections":"946",
|
||||
"special":"3",
|
||||
"levels":"2",
|
||||
"linux":"pass",
|
||||
"windows":"pass",
|
||||
"full_scan":"2-14s",
|
||||
"awaiting_verification":"22",
|
||||
"auto_testing":"8b75bdda-9021-423f-b046-badd744e785f"}
|
||||
"auto_testing":"4b167f13-0c13-4591-861a-5ce6f1d04af2"}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var helper = require("./helper.js")
|
||||
var helper = require('./helper.js')
|
||||
var async = require("async");
|
||||
|
||||
async function get_words_info(all_words, words_info) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var helper = require("./helper.js")
|
||||
var helper = require('./helper.js')
|
||||
var async = require("async");
|
||||
var sanitizeHtml = require("sanitize-html");
|
||||
var {
|
||||
|
||||
+23
-4
@@ -1,8 +1,8 @@
|
||||
var verbose = false
|
||||
var verbose = false;
|
||||
var google_api_key = "";
|
||||
var google_api_cs = "";
|
||||
var grid_url = "";
|
||||
var proxy = ""
|
||||
var proxy = "";
|
||||
|
||||
var detection_level = {
|
||||
"extreme": {
|
||||
@@ -52,14 +52,30 @@ var url = require("url");
|
||||
var franc = require('franc');
|
||||
var langs = require('langs');
|
||||
var cheerio = require('cheerio');
|
||||
var path = require('path');
|
||||
var slash = require('slash');
|
||||
|
||||
var sites_json_path = slash(path.join(__dirname,'..','data', 'sites.json'))
|
||||
var names_json_path = slash(path.join(__dirname,'..','data', 'names.json'))
|
||||
var dict_json_path = slash(path.join(__dirname,'..','data', 'dict.json'))
|
||||
|
||||
var parsed_sites = JSON.parse(fs.readFileSync(sites_json_path));
|
||||
var parsed_names_origins = JSON.parse(fs.readFileSync(names_json_path));
|
||||
var parsed_json = JSON.parse(fs.readFileSync(dict_json_path));
|
||||
|
||||
var parsed_sites = JSON.parse(fs.readFileSync("sites.json"));
|
||||
var logs_queue = Promise.resolve();
|
||||
|
||||
function get_log_file(uuid) {
|
||||
_uuid = uuid.replace(/[^a-zA-Z0-9\-]+/g, '');
|
||||
_string = slash(path.join('logs', _uuid + "_log.txt"))
|
||||
return _string
|
||||
}
|
||||
|
||||
function log_to_file_queue(uuid, msg) {
|
||||
logs_queue = logs_queue.then(function() {
|
||||
return new Promise(function(resolve) {
|
||||
fs.appendFile("logs/" + uuid + "_log.txt", msg + "\n", function(err, data) {
|
||||
temp_log_file = slash(path.join('logs', uuid + "_log.txt"))
|
||||
fs.appendFile(temp_log_file, msg + "\n", function(err, data) {
|
||||
console.log(msg)
|
||||
resolve();
|
||||
});
|
||||
@@ -172,12 +188,15 @@ async function get_url_wrapper_text(url, time = 5) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
get_log_file,
|
||||
profile_template,
|
||||
detection_level,
|
||||
detected_websites,
|
||||
get_language_by_parsing,
|
||||
get_language_by_guessing,
|
||||
parsed_sites,
|
||||
parsed_names_origins,
|
||||
parsed_json,
|
||||
verbose,
|
||||
google_api_key,
|
||||
google_api_cs,
|
||||
|
||||
+20
-23
@@ -1,74 +1,71 @@
|
||||
var helper = require("./helper.js")
|
||||
var helper = require('./helper.js')
|
||||
var fs = require("fs");
|
||||
var stringSimilarity = require("string-similarity");
|
||||
|
||||
var parsed_names_origins = JSON.parse(fs.readFileSync("names.json"));
|
||||
|
||||
async function find_origins(req) {
|
||||
var found = []
|
||||
for (key in parsed_names_origins) {
|
||||
for (name in parsed_names_origins[key]['boy']) {
|
||||
if (req.body.string.includes(parsed_names_origins[key]['boy'][name])) {
|
||||
for (key in helper.parsed_names_origins) {
|
||||
for (name in helper.parsed_names_origins[key]['boy']) {
|
||||
if (req.body.string.includes(helper.parsed_names_origins[key]['boy'][name])) {
|
||||
found.push({
|
||||
"name": parsed_names_origins[key]['boy'][name],
|
||||
"name": helper.parsed_names_origins[key]['boy'][name],
|
||||
"origin": key,
|
||||
"gender": "boy",
|
||||
"matched": parsed_names_origins[key]['boy'][name],
|
||||
"matched": helper.parsed_names_origins[key]['boy'][name],
|
||||
"similar": ""
|
||||
})
|
||||
} else {
|
||||
var similarity = stringSimilarity.compareTwoStrings(req.body.string, parsed_names_origins[key]['boy'][name]);
|
||||
var similarity = stringSimilarity.compareTwoStrings(req.body.string, helper.parsed_names_origins[key]['boy'][name]);
|
||||
if (similarity > 0.7) {
|
||||
found.push({
|
||||
"name": req.body.string,
|
||||
"origin": key,
|
||||
"gender": "boy",
|
||||
"matched": "",
|
||||
"similar": parsed_names_origins[key]['boy'][name]
|
||||
"similar": helper.parsed_names_origins[key]['boy'][name]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
for (name in parsed_names_origins[key]['girl']) {
|
||||
if (req.body.string.includes(parsed_names_origins[key]['girl'][name])) {
|
||||
for (name in helper.parsed_names_origins[key]['girl']) {
|
||||
if (req.body.string.includes(helper.parsed_names_origins[key]['girl'][name])) {
|
||||
found.push({
|
||||
"name": parsed_names_origins[key]['girl'][name],
|
||||
"name": helper.parsed_names_origins[key]['girl'][name],
|
||||
"origin": key,
|
||||
"gender": "girl",
|
||||
"matched": parsed_names_origins[key]['girl'][name],
|
||||
"matched": helper.parsed_names_origins[key]['girl'][name],
|
||||
"similar": ""
|
||||
})
|
||||
} else {
|
||||
var similarity = stringSimilarity.compareTwoStrings(req.body.string, parsed_names_origins[key]['girl'][name]);
|
||||
var similarity = stringSimilarity.compareTwoStrings(req.body.string, helper.parsed_names_origins[key]['girl'][name]);
|
||||
if (similarity > 0.7) {
|
||||
found.push({
|
||||
"name": req.body.string,
|
||||
"origin": key,
|
||||
"gender": "girl",
|
||||
"matched": "",
|
||||
"similar": parsed_names_origins[key]['girl'][name]
|
||||
"similar": helper.parsed_names_origins[key]['girl'][name]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
for (name in parsed_names_origins[key]['uni']) {
|
||||
if (req.body.string.includes(parsed_names_origins[key]['uni'][name])) {
|
||||
for (name in helper.parsed_names_origins[key]['uni']) {
|
||||
if (req.body.string.includes(helper.parsed_names_origins[key]['uni'][name])) {
|
||||
found.push({
|
||||
"name": parsed_names_origins[key]['uni'][name],
|
||||
"name": helper.parsed_names_origins[key]['uni'][name],
|
||||
"origin": key,
|
||||
"gender": "uni",
|
||||
"matched": parsed_names_origins[key]['uni'][name],
|
||||
"matched": helper.parsed_names_origins[key]['uni'][name],
|
||||
"similar": ""
|
||||
})
|
||||
} else {
|
||||
var similarity = stringSimilarity.compareTwoStrings(req.body.string, parsed_names_origins[key]['uni'][name]);
|
||||
var similarity = stringSimilarity.compareTwoStrings(req.body.string, helper.parsed_names_origins[key]['uni'][name]);
|
||||
if (similarity > 0.7) {
|
||||
found.push({
|
||||
"name": req.body.string,
|
||||
"origin": key,
|
||||
"gender": "uni",
|
||||
"matched": "",
|
||||
"similar": parsed_names_origins[key]['uni'][name]
|
||||
"similar": helper.parsed_names_origins[key]['uni'][name]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var helper = require("./helper.js")
|
||||
var helper = require('./helper.js')
|
||||
var async = require("async");
|
||||
var sanitizeHtml = require("sanitize-html");
|
||||
var tesseract = require("node-tesseract-ocr");
|
||||
@@ -11,6 +11,12 @@ var {
|
||||
} = require("selenium-webdriver");
|
||||
var tmp = require("tmp");
|
||||
var fs = require("fs");
|
||||
var path = require('path');
|
||||
|
||||
if (process.platform == 'win32'){
|
||||
var package_path = path.join(path.dirname(require.resolve("geckodriver")),'..')
|
||||
process.env['PATH'] = process.env['PATH'] + ';' + package_path
|
||||
}
|
||||
|
||||
async function find_username_advanced(req) {
|
||||
const time = new Date();
|
||||
@@ -97,7 +103,7 @@ async function find_username_site(uuid, username, options, site) {
|
||||
detections_count += 1
|
||||
temp_detected.count += 1
|
||||
var temp_found = "false"
|
||||
if (detection.type == "ocr" && data != "") {
|
||||
if (detection.type == "ocr" && data != "" && process.platform == "linux") {
|
||||
tmpobj = tmp.fileSync();
|
||||
fs.writeFileSync(tmpobj.name, Buffer.from(data, "base64"));
|
||||
await tesseract.recognize(tmpobj.name, {
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
var helper = require('./helper.js')
|
||||
var async = require("async");
|
||||
var sanitizeHtml = require("sanitize-html");
|
||||
var tesseract = require("node-tesseract-ocr");
|
||||
var sanitizeHtml = require("sanitize-html");
|
||||
var firefox = require("selenium-webdriver/firefox");
|
||||
var {
|
||||
Builder,
|
||||
By,
|
||||
Key
|
||||
} = require("selenium-webdriver");
|
||||
|
||||
async function find_username_special(req) {
|
||||
const time = new Date();
|
||||
const functions = [];
|
||||
helper.parsed_sites.forEach((site) => {
|
||||
if ("status" in site) {
|
||||
if (site.status == "bad") {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
if (site.selected == "true") {
|
||||
site.detections.forEach((detection) => {
|
||||
if (detection.type == 'special') {
|
||||
if (detection.function == 'special_facebook_1') {
|
||||
functions.push(find_username_site_special_facebook_1.bind(null, req.body.uuid, req.body.string, site));
|
||||
} else if (detection.function == 'special_gmail_1') {
|
||||
functions.push(find_username_site_special_gmail_1.bind(null, req.body.uuid, req.body.string, site));
|
||||
} else if (detection.function == 'special_google_1') {
|
||||
functions.push(find_username_site_special_google_1.bind(null, req.body.uuid, req.body.string, site));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
const results = await async.parallelLimit(functions, 5);
|
||||
helper.verbose && console.log(`Total time ${new Date() - time}`);
|
||||
return results.filter(item => item !== undefined)
|
||||
}
|
||||
|
||||
async function find_username_site_special_facebook_1(uuid, username, site) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
helper.log_to_file_queue(uuid, "[Checking] " + helper.get_site_from_url(site.url))
|
||||
let driver = new Builder()
|
||||
.forBrowser("firefox")
|
||||
.setFirefoxOptions(new firefox.Options().headless().windowSize({
|
||||
width: 640,
|
||||
height: 480
|
||||
}))
|
||||
.build();
|
||||
|
||||
try {
|
||||
var timeouts = {
|
||||
implicit: 0,
|
||||
pageLoad: 10000,
|
||||
script: 10000
|
||||
};
|
||||
|
||||
var source = "";
|
||||
var data = "";
|
||||
var text_only = "unavailable";
|
||||
var title = "unavailable";
|
||||
var temp_profile = Object.assign({}, helper.profile_template);
|
||||
var link = "https://mbasic.facebook.com/login/identify/?ctx=recoveqr";
|
||||
await driver.manage().setTimeouts(timeouts);
|
||||
await driver.get(link);;
|
||||
await driver.findElement(By.id('identify_search_text_input')).sendKeys(username);
|
||||
await driver.findElement(By.id('did_submit')).click();
|
||||
source = await driver.getPageSource();
|
||||
text_only = await driver.findElement(By.tagName("body")).getText();
|
||||
await driver.quit()
|
||||
if (source.includes("Try Entering Your Password")) {
|
||||
temp_found = "true";
|
||||
temp_profile.found += 1
|
||||
}
|
||||
if (temp_profile.found > 0) {
|
||||
temp_profile.text = "unavailable";
|
||||
temp_profile.title = "unavailable";
|
||||
temp_profile.rate = "%" + ((temp_profile.found / 1) * 100).toFixed(2);
|
||||
temp_profile.link = site.url.replace("{username}", username);
|
||||
temp_profile.type = site.type
|
||||
resolve(temp_profile);
|
||||
} else {
|
||||
resolve(undefined)
|
||||
}
|
||||
} catch (err) {
|
||||
if (driver !== undefined) {
|
||||
try {
|
||||
await driver.quit()
|
||||
} catch (err) {
|
||||
helper.verbose && console.log("Driver Session Issue")
|
||||
}
|
||||
}
|
||||
resolve(undefined)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function find_username_site_special_gmail_1(uuid, username, site) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
helper.log_to_file_queue(uuid, "[Checking] " + helper.get_site_from_url(site.url))
|
||||
let driver = new Builder()
|
||||
.forBrowser("firefox")
|
||||
.setFirefoxOptions(new firefox.Options().headless().windowSize({
|
||||
width: 640,
|
||||
height: 480
|
||||
}))
|
||||
.build();
|
||||
|
||||
try {
|
||||
var timeouts = {
|
||||
implicit: 0,
|
||||
pageLoad: 10000,
|
||||
script: 10000
|
||||
};
|
||||
|
||||
var source = "";
|
||||
var data = "";
|
||||
var text_only = "unavailable";
|
||||
var title = "unavailable";
|
||||
var temp_profile = Object.assign({}, helper.profile_template);
|
||||
var link = "https://accounts.google.com/signup/v2/webcreateaccount?service=mail&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F%3Fpc%3Dtopnav-about-n-en&flowName=GlifWebSignIn&flowEntry=SignUp";
|
||||
await driver.manage().setTimeouts(timeouts);
|
||||
await driver.get(link);;
|
||||
await driver.findElement(By.id('username')).sendKeys(username);
|
||||
await driver.findElement(By.id('selectioni1')).click();
|
||||
source = await driver.getPageSource();
|
||||
text_only = await driver.findElement(By.tagName("body")).getText();
|
||||
await driver.quit()
|
||||
if (text_only.includes("That username is taken") && !text_only.includes('your username must be between') && !text_only.includes('You can use letters')) {
|
||||
temp_found = "true";
|
||||
temp_profile.found += 1
|
||||
}
|
||||
if (temp_profile.found > 0) {
|
||||
temp_profile.text = username + "@gmail.com";
|
||||
temp_profile.title = "unavailable";
|
||||
temp_profile.rate = "%" + ((temp_profile.found / 1) * 100).toFixed(2);
|
||||
temp_profile.link = "https://google.com"
|
||||
temp_profile.type = site.type
|
||||
resolve(temp_profile);
|
||||
} else {
|
||||
resolve(undefined)
|
||||
}
|
||||
} catch (err) {
|
||||
if (driver !== undefined) {
|
||||
try {
|
||||
await driver.quit()
|
||||
} catch (err) {
|
||||
helper.verbose && console.log("Driver Session Issue")
|
||||
}
|
||||
}
|
||||
resolve(undefined)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function find_username_site_special_google_1(uuid, username, site) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
helper.log_to_file_queue(uuid, "[Checking] " + helper.get_site_from_url(site.url))
|
||||
let driver = new Builder()
|
||||
.forBrowser("firefox")
|
||||
.setFirefoxOptions(new firefox.Options().headless().windowSize({
|
||||
width: 640,
|
||||
height: 480
|
||||
}))
|
||||
.build();
|
||||
|
||||
try {
|
||||
var timeouts = {
|
||||
implicit: 0,
|
||||
pageLoad: 10000,
|
||||
script: 10000
|
||||
};
|
||||
|
||||
var source = "";
|
||||
var data = "";
|
||||
var text_only = "unavailable";
|
||||
var title = "unavailable";
|
||||
var temp_profile = Object.assign({}, helper.profile_template);
|
||||
var link = "https://accounts.google.com/signin/v2/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin";
|
||||
await driver.manage().setTimeouts(timeouts);
|
||||
await driver.get(link);;
|
||||
await driver.findElement(By.id('identifierId')).sendKeys(username);
|
||||
await driver.findElement(By.xpath("//button[contains(.,'Next')]")).click();
|
||||
source = await driver.getPageSource();
|
||||
text_only = await driver.findElement(By.tagName("body")).getText();
|
||||
await driver.quit()
|
||||
if (text_only.includes("Couldn't sign you in") && !text_only.includes("Couldn't find your")) {
|
||||
temp_found = "true";
|
||||
temp_profile.found += 1
|
||||
}
|
||||
if (temp_profile.found > 0) {
|
||||
temp_profile.text = username + "@gmail.com";
|
||||
temp_profile.title = "unavailable";
|
||||
temp_profile.rate = "%" + ((temp_profile.found / 1) * 100).toFixed(2);
|
||||
temp_profile.link = "https://google.com"
|
||||
temp_profile.type = site.type
|
||||
resolve(temp_profile);
|
||||
} else {
|
||||
resolve(undefined)
|
||||
}
|
||||
} catch (err) {
|
||||
if (driver !== undefined) {
|
||||
try {
|
||||
await driver.quit()
|
||||
} catch (err) {
|
||||
helper.verbose && console.log("Driver Session Issue")
|
||||
}
|
||||
}
|
||||
resolve(undefined)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
find_username_special
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
var helper = require("./helper.js")
|
||||
var helper = require('./helper.js')
|
||||
var {
|
||||
findWord
|
||||
} = require("most-common-words-by-language");
|
||||
var fs = require("fs");
|
||||
var parsed_json = JSON.parse(fs.readFileSync("dict.json"));
|
||||
|
||||
var WordsNinjaPack = require("wordsninja");
|
||||
var WordsNinja = new WordsNinjaPack();
|
||||
|
||||
@@ -83,7 +83,7 @@ async function analyze_string(req, all_words) {
|
||||
helper.log_to_file_queue(req.body.uuid, "[Starting] String analysis")
|
||||
temp_rr_names = []
|
||||
string_to_check = req.body.string
|
||||
parsed_json.prefix.forEach(function(item, index) {
|
||||
helper.parsed_json.prefix.forEach(function(item, index) {
|
||||
if (string_to_check.indexOf(item) == 0 && !all_words.prefix.includes(item)) {
|
||||
all_words.prefix.push(item);
|
||||
temp = remove_word(string_to_check, item);
|
||||
@@ -92,7 +92,7 @@ async function analyze_string(req, all_words) {
|
||||
}
|
||||
}
|
||||
});
|
||||
parsed_json.m_names.forEach(function(item, index) {
|
||||
helper.parsed_json.m_names.forEach(function(item, index) {
|
||||
if (string_to_check.indexOf(item) >= 0 && !all_words.name.includes(item)) {
|
||||
all_words.name.push(item);
|
||||
temp = remove_word(string_to_check, item);
|
||||
@@ -101,7 +101,7 @@ async function analyze_string(req, all_words) {
|
||||
}
|
||||
}
|
||||
});
|
||||
parsed_json.f_names.forEach(function(item, index) {
|
||||
helper.parsed_json.f_names.forEach(function(item, index) {
|
||||
if (string_to_check.indexOf(item) >= 0 && !all_words.name.includes(item)) {
|
||||
all_words.name.push(item);
|
||||
temp = remove_word(string_to_check, item);
|
||||
|
||||
Generated
+5
@@ -1249,6 +1249,11 @@
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
|
||||
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
|
||||
},
|
||||
"slash": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
|
||||
+2
-1
@@ -31,7 +31,8 @@
|
||||
"tmp": "0.2.1",
|
||||
"wink-tokenizer": "1.1.0",
|
||||
"wordsninja": "1.0.0",
|
||||
"yargs": "16.2.0"
|
||||
"yargs": "16.2.0",
|
||||
"slash": "3.0.0"
|
||||
},
|
||||
"author": "QeeqBox",
|
||||
"license": "AGPL-3.0",
|
||||
|
||||
Reference in New Issue
Block a user