puppeteer-extra icon indicating copy to clipboard operation
puppeteer-extra copied to clipboard

Update index.js for bypass creepjs proxy detection

Open cg10036 opened this issue 1 year ago • 7 comments

Update index.js for bypass creepjs proxy detection

cg10036 avatar Jul 21 '22 16:07 cg10036

@cg10036 thanks! does this have negative side effects elsewhere?

berstend avatar Jul 22 '22 02:07 berstend

@berstend No! This code just change stack trace, so it will have no negative effets maybe.

// before bypass
TypeError: Function.prototype.toString requires that 'this' be a Function
    at Function.toString (<anonymous>)
    at newHandler.<computed> [as apply] (eval at <anonymous> (:4:65), <anonymous>:18:30)
    at newHandler.<computed> [as apply] (eval at <anonymous> (:4:65), <anonymous>:18:30)
    at newHandler.<computed> [as apply] (eval at <anonymous> (:4:65), <anonymous>:18:30)
    at newHandler.<computed> [as apply] (eval at <anonymous> (:4:65), <anonymous>:18:30)
// after bypass
TypeError: Function.prototype.toString requires that 'this' be a Function
    at Function.toString (<anonymous>)
    at you (https://abrahamjuliot.github.io/creepjs/creep.js:1685:50)
    at cant (https://abrahamjuliot.github.io/creepjs/creep.js:1686:24)
    at hide (https://abrahamjuliot.github.io/creepjs/creep.js:1687:24)
    at getNewObjectToStringTypeErrorLie (https://abrahamjuliot.github.io/creepjs/creep.js:1688:5)
    at https://abrahamjuliot.github.io/creepjs/creep.js:5622:8
    at getHeadlessFeatures (https://abrahamjuliot.github.io/creepjs/creep.js:5633:8)
    at async Promise.all (index 0)
    at async fingerprint (https://abrahamjuliot.github.io/creepjs/creep.js:11412:8)
    at async https://abrahamjuliot.github.io/creepjs/creep.js:11690:7

CreepJS lies

// before bypass
// lies (207)
Function.toString:
- failed object toString error <- bypassed this
- failed at too much recursion error
- failed at too much recursion __proto__ error
- failed at chain cycle __proto__ error
- failed at reflect set proto

And More
// after bypass
// lies (22)
Function.toString:
- failed at too much recursion error
- failed at too much recursion __proto__ error
- failed at chain cycle __proto__ error
- failed at reflect set proto

And more

cg10036 avatar Jul 22 '22 04:07 cg10036

I like it 😄 quite an elegant solution 👍

berstend avatar Jul 22 '22 04:07 berstend

Will merge it in & release it after the weekend, currently having some Github CI issues

berstend avatar Jul 22 '22 06:07 berstend

Can we please merge this ?

Bllacky avatar Jul 26 '22 07:07 Bllacky

Can we please merge this?

HTensor avatar Aug 02 '22 09:08 HTensor

@berstend Can we merge this?

mikeyfarina avatar Aug 11 '22 19:08 mikeyfarina

Doesn't seem to work anymore.

sagistrauss avatar Dec 21 '22 13:12 sagistrauss

This does not seem to work anymore - does anybody know of another walkaround to this issue? maybe @cg10036 ?

philipnimble avatar Jan 15 '23 11:01 philipnimble

Does not work anymore, closing pr

cg10036 avatar Mar 06 '23 17:03 cg10036