(req)
| 7 | import engine from './engine.js' |
| 8 | |
| 9 | async function find_username_normal (req) { |
| 10 | helper.log_to_file_queue(req.body.uuid, '[init] Selected websites: ' + helper.websites_entries.filter((item) => item.selected === 'true').length + ' for username: ' + req.body.string) |
| 11 | const time = new Date() |
| 12 | let all_results = [] |
| 13 | const [first_re_try, first_profiles] = await find_username_normal_wrapper(req, helper.websites_entries) |
| 14 | helper.verbose && console.log(`Total time ${new Date() - time}`) |
| 15 | const [second_re_try, second_profiles] = await find_username_normal_wrapper(req, first_re_try) |
| 16 | helper.verbose && console.log(`Total time ${new Date() - time}`) |
| 17 | const [third_re_try, third_profiles] = await find_username_normal_wrapper(req, second_re_try) |
| 18 | helper.verbose && console.log(`Total time ${new Date() - time}`) |
| 19 | if (third_re_try.length > 0) { |
| 20 | const failed_sites = await get_failed(req, third_re_try) |
| 21 | all_results = Array.prototype.concat(first_profiles, second_profiles, third_profiles, failed_sites) |
| 22 | } else { |
| 23 | all_results = Array.prototype.concat(first_profiles, second_profiles, third_profiles) |
| 24 | } |
| 25 | |
| 26 | all_results = all_results.filter(item => item) |
| 27 | return all_results.sort((first, second) => { |
| 28 | return helper.compare_objects(first, second, 'rate') |
| 29 | }) |
| 30 | } |
| 31 | |
| 32 | async function get_failed (req, failed) { |
| 33 | const temp_result = [] |
nothing calls this directly
no test coverage detected