1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spoofing Browser Fingerprint in Selenium?

Discussion in 'General Scripting Chat' started by Sam Green, Feb 16, 2017.

  1. Sam Green

    Sam Green Junior Member

    Joined:
    Dec 15, 2016
    Messages:
    134
    Likes Received:
    30
    Im currently trying to use Random Agent Spoofer, a firefox extension, to randomize my fingerprint. By default though a lot of its better spoofing settings like timezone spoofing and setting my user agent to mobile are disabled.

    I cant find any way to edit the extension settings from selenium webdriver (python). Does anyone know where extensions save their settings? Or if not a better way of spoofing my browser fingerprint in selenium?
     
    Last edited: Feb 16, 2017
  2. Palesantos

    Palesantos Registered Member

    Joined:
    Dec 22, 2016
    Messages:
    93
    Likes Received:
    3
    Gender:
    Male
    I am currently using MultiLoginApp, it appears to be an independent spoofing and proxy app which supports chrome, firefox and many more.
     
  3. BloodyNinja

    BloodyNinja Power Member

    Joined:
    Oct 28, 2013
    Messages:
    583
    Likes Received:
    547
    Location:
    Deeptown
    Short answer: you cannot edit add-on settings through selenium webdriver.

    If you want to automate browser fingerprint management, you need software like Multiloginapp. Here you can get a feeling of its API https://multiloginapp.com/documentation-automation-api/ and here see some automation examples https://github.com/multiloginapp
     
  4. Sam Green

    Sam Green Junior Member

    Joined:
    Dec 15, 2016
    Messages:
    134
    Likes Received:
    30
    turns out selenium can actually edit extension settings actually. Extension settings are stored in the about:config menu where firefox stores all its other settings.

    in selenium you can edit about:config options including those of the extensions :D
     
  5. BloodyNinja

    BloodyNinja Power Member

    Joined:
    Oct 28, 2013
    Messages:
    583
    Likes Received:
    547
    Location:
    Deeptown
    Sorry for misinforming you then. Frankly didn't know about this possibility.
     
  6. Sam Green

    Sam Green Junior Member

    Joined:
    Dec 15, 2016
    Messages:
    134
    Likes Received:
    30
    No problem. The information about extension settings being stored there was rather hard to find. And your Multiloginapp suggestion is interesting I'll have to look into that.
     
  7. whiteroot

    whiteroot Junior Member

    Joined:
    Oct 22, 2015
    Messages:
    102
    Likes Received:
    32
    Gender:
    Male
    Occupation:
    Software engineer, freelancer
    Location:
    France
    create a profile where you store the user-agent you want (and other stuff) :

    profile = webdriver.FirefoxProfile('/home/user/.mozilla/firefox/n34w7dcm.user/')
    profile.set_preference("general.useragent.override","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0")
    profile.set_preference("places.history.enabled", False)
    profile.set_preference("privacy.clearOnShutdown.offlineApps", True)
    profile.set_preference("privacy.clearOnShutdown.passwords", True)
    profile.set_preference("privacy.clearOnShutdown.siteSettings", True)
    profile.set_preference("privacy.sanitize.sanitizeOnShutdown", True)
    profile.update_preferences()
    driver = webdriver.Firefox(firefox_profile=profile)
     
    • Thanks Thanks x 1
  8. Palesantos

    Palesantos Registered Member

    Joined:
    Dec 22, 2016
    Messages:
    93
    Likes Received:
    3
    Gender:
    Male
  9. BloodyNinja

    BloodyNinja Power Member

    Joined:
    Oct 28, 2013
    Messages:
    583
    Likes Received:
    547
    Location:
    Deeptown
    Sorry for upping this old topic but I missed your post somehow.

    Yes, Multiloginapp is trustable. You can find a lot of mentions and reviews on bhw and the internet. There are many resources on the official website like a blog, a video academy, a documentation, all usual user policies along with the explanation how data is secured within a program. Certainly doesn't look like a hoax :)