send more data for request data
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
class RequestDataPojo {
|
||||
glvd
|
||||
glrd
|
||||
hc
|
||||
br_oh
|
||||
br_ow
|
||||
br_h
|
||||
br_w
|
||||
rs_h
|
||||
rs_w
|
||||
rs_cd
|
||||
ars_h
|
||||
ars_w
|
||||
plg
|
||||
eva
|
||||
vnd
|
||||
plu
|
||||
ua
|
||||
dvm
|
||||
acw
|
||||
cookiesStr
|
||||
|
||||
constructor(glvd,
|
||||
glrd,
|
||||
hc,
|
||||
br_oh,
|
||||
br_ow,
|
||||
br_h,
|
||||
br_w,
|
||||
rs_h,
|
||||
rs_w,
|
||||
rs_cd,
|
||||
ars_h,
|
||||
ars_w,
|
||||
plg,
|
||||
eva,
|
||||
vnd,
|
||||
plu, ua, dvm, acw) {
|
||||
this.glvd = glvd
|
||||
this.glrd = glrd
|
||||
this.hc = hc
|
||||
this.br_oh = br_oh
|
||||
this.br_ow = br_ow
|
||||
this.br_h = br_h
|
||||
this.br_w = br_w
|
||||
this.rs_h = rs_h
|
||||
this.rs_w = rs_w
|
||||
this.rs_cd = rs_cd
|
||||
this.ars_h = ars_h
|
||||
this.ars_w = ars_w
|
||||
this.plg = plg
|
||||
this.eva = eva
|
||||
this.vnd = vnd
|
||||
this.plu = plu
|
||||
this.ua = ua
|
||||
this.dvm = dvm
|
||||
this.acw = acw
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module.exports = RequestDataPojo
|
||||
+2
-1
@@ -3,6 +3,7 @@ const amqp = require("amqplib");
|
||||
const QUEUE_HOST = "amqp://appointment:ZyuhJZ2xEYWhElhpJjy7YEpZGZwNYJz2fHIu@appointment.lpaconsulting.fr:5672"
|
||||
const REQUEST_DATA_QUEUE_FR = 'REQUEST_DATA';
|
||||
const REQUEST_DATA_QUEUE_DE = 'REQUEST_DATA_DE';
|
||||
const REQUEST_DATA_OBJECT = "REQUEST_DATA_OBJECT"
|
||||
|
||||
class Sender {
|
||||
channel;
|
||||
@@ -21,7 +22,7 @@ class Sender {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Sender
|
||||
module.exports = {Sender, REQUEST_DATA_OBJECT}
|
||||
|
||||
// let sender = new Sender()
|
||||
// sender.initConnection().then((r) => {
|
||||
|
||||
+37
-15
@@ -1,21 +1,43 @@
|
||||
const CommandorPage = require("./workers/CommandorPage");
|
||||
const ContactPojo = require("./models/ContactPojo");
|
||||
const {MongoManager} = require("./workers/mongo_manager");
|
||||
const RequestDataPojo = require("./models/RequestDataPojo");
|
||||
const mongoManager = new MongoManager();
|
||||
|
||||
|
||||
mongoManager.connect().then(r => {
|
||||
// let contact = new ContactPojo("0649614591", "1234567890", "PAN", "Lei", "panleicim@gmail.com")
|
||||
// let commandPage = new CommandorPage(contact, null, mongoManager)
|
||||
// commandPage.deleteFromBlackList().then(r => {
|
||||
// console.log("saved to db")
|
||||
// })
|
||||
mongoManager.getAllAcceptedAppointments().then(acceptedList => {
|
||||
acceptedList.forEach((item) => {
|
||||
console.log(item.email)
|
||||
console.log(item.accepted_at)
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
// mongoManager.connect().then(r => {
|
||||
// // let contact = new ContactPojo("0649614591", "1234567890", "PAN", "Lei", "panleicim@gmail.com")
|
||||
// // let commandPage = new CommandorPage(contact, null, mongoManager)
|
||||
// // commandPage.deleteFromBlackList().then(r => {
|
||||
// // console.log("saved to db")
|
||||
// // })
|
||||
// mongoManager.getAllAcceptedAppointments().then(acceptedList => {
|
||||
// acceptedList.forEach((item) => {
|
||||
// console.log(item.email)
|
||||
// console.log(item.accepted_at)
|
||||
// })
|
||||
// }
|
||||
// )
|
||||
// }
|
||||
// )
|
||||
let glvd = "Qualcomm"
|
||||
let glrd = "Adreno (TM) 630"
|
||||
let hc = 8
|
||||
let br_oh = 711
|
||||
let br_ow = 384
|
||||
let br_h = 711
|
||||
let br_w = 384
|
||||
let rs_h = 811
|
||||
let rs_w = 384
|
||||
let rs_cd = 24
|
||||
let ars_h = 811
|
||||
let ars_w = 384
|
||||
let plg = 2
|
||||
let eva = 33
|
||||
let vnd = "Google Inc."
|
||||
let plu = "rVpzZz4,dt9mbseP"
|
||||
let ua = "Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36"
|
||||
let dvm = 1
|
||||
let requestPojo = new RequestDataPojo(glvd, glrd, hc, br_oh, br_ow, br_h, br_w, rs_h, rs_w, rs_cd, ars_h, ars_w, plg, eva, vnd, plu, ua, dvm)
|
||||
requestPojo.cookiesStr = "datadome=vUwJoG9aItJ3LTQ28~u_6wOr4YM7CjqF6TBMXPmehhR0UffLzVaSooP~K5xJ6iKcdGnuYDsvd4ozNQuMyFLPb39m0enuy3XinRDnfWiuypj0IEKrD_4fgA2bgeOp46lG;policy=accepted;app.sig=CpeG6QFWmHWaWV3E6Ohul8Jud4k;app=eyJmbGFzaCI6e30sImNhY2hlZmxhc2giOltdLCJjc3JmU2VjcmV0IjoiNDBtd2xPV25MeUNXdHBLaG5YZGxLcTZDIn0=;lang=fr;"
|
||||
console.log(JSON.stringify(requestPojo))
|
||||
@@ -9,6 +9,8 @@ const SlidingCaptchaSolver = require("./SlidingCaptchaSolver");
|
||||
const OCRChecker = require("./OCRChecker");
|
||||
const {exec} = require("child_process");
|
||||
const {openUrlWithAdb} = require("../utiles/CmdUtils");
|
||||
const RequestDataPojo = require("../models/RequestDataPojo");
|
||||
const {REQUEST_DATA_OBJECT} = require("../queue/Sender");
|
||||
// const RDV_URL = "http://192.168.0.44:8000/test_appointment.html"
|
||||
const RDV_URL = "https://rendezvousparis.hermes.com/client/register";
|
||||
const BLANK_URL = "about:blank"
|
||||
@@ -74,7 +76,7 @@ function logWithDevice(message, device) {
|
||||
const searchTexts = ['hermes+rdv+online+paris', 'hermes+rdv+enligne+paris', 'hermes+rdv+en+ligne+paris', 'hermes+rendezvous+en+ligne+paris', 'hermes+appointment+online+paris', 'hermes+appointment+online+paris', 'appointment+hermes+paris+on+line', 'hermes+rendez+vous+online+paris', 'hermes+rendez+vous+paris+en+ligne', 'hermes+rendez+vous+paris+enligne', 'hermes+rendez+vous+paris+online', 'online+appointment+hermes+paris', 'hermes+online+appointment+paris', 'paris+hermes+online+appointment']
|
||||
|
||||
class CommandorPage {
|
||||
constructor(contact, device, sender, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false, alertBeep = false, port = 9000, onlyForCookies = false) {
|
||||
constructor(contact, device, sender, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false, alertBeep = false, port = 9000, onlyForCookies = true) {
|
||||
this.contact = contact;
|
||||
this.device = device;
|
||||
this.mongoManager = mongoManager;
|
||||
@@ -1159,6 +1161,106 @@ class CommandorPage {
|
||||
}
|
||||
}
|
||||
|
||||
async getRequestData() {
|
||||
const {
|
||||
glvd,
|
||||
glrd,
|
||||
hc,
|
||||
br_oh,
|
||||
br_ow,
|
||||
br_h,
|
||||
br_w,
|
||||
rs_h,
|
||||
rs_w,
|
||||
rs_cd,
|
||||
ars_h,
|
||||
ars_w,
|
||||
plg,
|
||||
eva,
|
||||
vnd,
|
||||
plu, ua, dvm, acw
|
||||
} = await this.page.evaluate(() => {
|
||||
let webglContext = document.createElement('canvas').getContext("webgl")
|
||||
let webglDebugRenderInfo = webglContext.getExtension("WEBGL_debug_renderer_info")
|
||||
let glvd = webglContext.getParameter(webglDebugRenderInfo.UNMASKED_VENDOR_WEBGL)
|
||||
let glrd = webglContext.getParameter(webglDebugRenderInfo.UNMASKED_RENDERER_WEBGL)
|
||||
let hc = navigator.hardwareConcurrency
|
||||
let br_oh = window.outerHeight
|
||||
let br_ow = window.outerWidth
|
||||
let br_h = Math.max(
|
||||
document.documentElement.clientHeight,
|
||||
window.innerHeight || 0
|
||||
)
|
||||
|
||||
let br_w = Math.max(
|
||||
document.documentElement.clientWidth,
|
||||
window.innerWidth || 0
|
||||
)
|
||||
let rs_h = window.screen.height
|
||||
let rs_w = window.screen.width
|
||||
let rs_cd = window.screen.colorDepth
|
||||
|
||||
let ars_h = screen.availHeight || 0
|
||||
let ars_w = screen.availWidth || 0
|
||||
let plg = navigator.plugins.length
|
||||
let eva = eval.toString().length
|
||||
let vnd = window.navigator.vendor
|
||||
let plugins = navigator.plugins
|
||||
let pluginsName = []
|
||||
for (let i = 0; i < plugins.length; i++) {
|
||||
name = plugins[i].name;
|
||||
pluginsName.push(name)
|
||||
}
|
||||
let plu = pluginsName
|
||||
let ua = navigator.userAgent
|
||||
let dvm = navigator['deviceMemory'] || -1
|
||||
let audio = document['createElement']("audio")
|
||||
|
||||
let acw = audio.canPlayType(('audio/wav; codecs="1"'))
|
||||
return {
|
||||
glvd,
|
||||
glrd,
|
||||
hc,
|
||||
br_oh,
|
||||
br_ow,
|
||||
br_h,
|
||||
br_w,
|
||||
rs_h,
|
||||
rs_w,
|
||||
rs_cd,
|
||||
ars_h,
|
||||
ars_w,
|
||||
plg,
|
||||
eva,
|
||||
vnd,
|
||||
plu,
|
||||
ua,
|
||||
dvm, acw
|
||||
}
|
||||
})
|
||||
|
||||
logWithDevice("glvd:" + glvd, this.device)
|
||||
logWithDevice("glrd:" + glrd, this.device)
|
||||
logWithDevice("hc:" + hc, this.device)
|
||||
logWithDevice("br_oh:" + br_oh, this.device)
|
||||
logWithDevice("br_ow:" + br_ow, this.device)
|
||||
logWithDevice("br_h:" + br_h, this.device)
|
||||
logWithDevice("br_w:" + br_w, this.device)
|
||||
logWithDevice("rs_h:" + rs_h, this.device)
|
||||
logWithDevice("rs_w:" + rs_w, this.device)
|
||||
logWithDevice("rs_cd:" + rs_cd, this.device)
|
||||
logWithDevice("ars_h:" + ars_h, this.device)
|
||||
logWithDevice("ars_w:" + ars_w, this.device)
|
||||
logWithDevice("plg:" + plg, this.device)
|
||||
logWithDevice("eva:" + eva, this.device)
|
||||
logWithDevice("vnd:" + vnd, this.device)
|
||||
logWithDevice("plu:" + plu, this.device)
|
||||
logWithDevice("ua:" + ua, this.device)
|
||||
logWithDevice("dvm:" + dvm, this.device)
|
||||
logWithDevice("acw:" + acw, this.device)
|
||||
return new RequestDataPojo(glvd, glrd, hc, br_oh, br_ow, br_h, br_w, rs_h, rs_w, rs_cd, ars_h, ars_w, plg, eva, vnd, plu, ua, dvm, acw)
|
||||
}
|
||||
|
||||
|
||||
async sendCookiesToQueue() {
|
||||
try {
|
||||
@@ -1169,7 +1271,9 @@ class CommandorPage {
|
||||
})
|
||||
console.log(cookiesString);
|
||||
if (this.onlyForCookies) {
|
||||
this.sender.sendMessage(cookiesString, "REQUEST_DATA_DE")
|
||||
let pojoToSend = await this.getRequestData()
|
||||
pojoToSend.cookiesStr = cookiesString
|
||||
this.sender.sendMessage(JSON.stringify(pojoToSend), REQUEST_DATA_OBJECT)
|
||||
} else
|
||||
this.sender.sendMessage(cookiesString)
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user