In the concern website, (https://zoom.us/signin) when I login in manually through browser, opened with geckodriver webdriver :
browser = webdriver.Firefox() #(Just an example, real code at the end of the answer)
It first prompts for captcha (which isn't asked for when login through normal browser on same website). Please note that I entered the link manually too. Then, after solving the captcha, it gives me the following error :
error: Http 401 Unauthorized
And I couldn't login at all, even though I did everything manually, which points out that it is somehow detecting that I'm using webdrive (please note that I'm NOT using headless Firefox).
Now, regarding my findings:
I used inspect element and tried to find what triggers when I click the sign in button.
and, functions from only two files are trigger :
login.min.js, and all.min.js
I fetched the login.min.js and arranged it in readable form, here it is https://pastebin.com/SMFt1stC
all.min.js is mix of common library, here's the link: https://st1.zoom.us/static/5.1.1662/js/all.min.js
One of the function on login.min.js that gets triggered on clicking sign in is this :
var c = $("#login-form");
.....
.....
l.on("click", function() {
c.find("span.help-block").remove();
c.find("div.has-error").removeClass("has-error");
var t = c.valid();
if (!t) {
c.find("div.has-error input").length && c.find("div.has-error input").eq(0).trigger("focus");
return
}
if (signinNeedCaptcha && newCaptcha.isReCaptcha) {
l.disableBtn();
window.setTimeout(function() { l.enableBtn() }, 3000);
newCaptcha.executeReCaptcha(s, n)
} else {
c.trigger("submit")
}
From here, I can clearly see what gets trigger after I click sign in.
I entered it in console manually, that did a HTTP POST request, and it returned with same "Http 401 Unauthorized" error, which made me think what exactly is making it fail.
In short, I want to know how exactly the site finds out that I'm using webdrive, so that I can mitigate it.
To find this out, will I have to read every single JavaScript in the webpage myself to actually figure it out, or am I missing something obvious, or it isn't possible to figure out how they might be detecting browser as the code that might be doing it is in the backend? I'm new to web development so can't really figure that out.
This is how I'm starting the webdriver through Python Selenium: https://pastebin.com/Aey09mCu