-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] -> detect JS tampering #9
Comments
Thanks! |
@unixfox Though, you've forgot to click the button at brotector. Does that cause detection? |
Thank you for your reply! Indeed I clicked on the button using the documentation: https://ulixee.org/docs/hero/basic-client/interactions const Hero = require('@ulixee/hero-playground');
(async () => {
const hero = new Hero();
await hero.goto('https://kaliiiiiiiiii.github.io/brotector/');
const tab = hero.activeTab;
await new Promise(resolve => setTimeout(resolve, 1000));
const aElem = hero.document.querySelector('button');
await hero.interact({ click: { element: aElem } })
await new Promise(resolve => setTimeout(resolve, 3000));
const screenshot = await tab.takeScreenshot({fullPage: true});
require("fs").writeFile("out.png", screenshot, 'base64', function(err) {
console.log(err);
});
await hero.close();
})(); And brotector found some interesting things. But maybe we can detect it earlier like creepjs is doing? |
Well, hero injects javascript into the main world which patches stuff. Usually smth specific to the framework, and code signature-based detection. Lines 1 to 4 in a39efef
Lines 370 to 389 in a39efef
|
Thank you for pointing in the right direction! That's indeed a good idea. I think creepjs recognize that something is fishy pretty easily thanks to its good prediction mechanism. Here is a portion of a screenshot taken with hero on creepjs: Hero advertise itself as an Apple device: Hard giveaway when it is ran on a Linux machine. |
resources for that
Maybe I should start implementing a proper framework with TS... don't really have the time tho |
Hero: https://github.com/ulixee/hero
Seems to claim that it is better than puppeteer, playwright when it comes to scraping: https://ulixee.org/docs/hero/overview/basic-concepts
For now, it doesn't get detected by brotector:
I tried to see if there were some things obvious by using https://deviceandbrowserinfo.com/info_device but couldn't find anything.
But creepjs detects it: https://abrahamjuliot.github.io/creepjs/ as "smart enemy".
Example code:
The text was updated successfully, but these errors were encountered: