OpenWPM icon indicating copy to clipboard operation
OpenWPM copied to clipboard

Document how to use primed profile

Open vringar opened this issue 4 years ago • 5 comments

Currently there is no documentation on how to use primed profiles e.g. to run crawls with Addons or with some previous set of Cookies and Site Data.

vringar avatar Jun 28 '21 17:06 vringar

I was trying to run a crawl with the uBlock Origin extension and I am unable to get it working.

The steps I took were:

  • Created a new firefox profile called 'uBO_profile'
  • Opened a new instance of firefox using that profile
  • Installed the uBlock Origin extension
  • Closed all instances of firefox
  • Located the profile directory and compressed it to a .tar file
  • In the demo.py file included, I set display_mode='native' and added seed_tar=Path('path/to/profile.tar')

image

  • Ran the crawl and did not see the extensions on the toolbar

image

image

This was done inside of a Linux mint VM.

One thing I noticed while trying to confirm that the profile was loaded is that the profile directory is created ( the uBO_profile ) inside of the firefox profile created in the tmp directory. But that may be intended.

8-legged-elephant avatar Jun 29 '21 03:06 8-legged-elephant

I just remembered that we already wrote something on the topic. See here.

It sounds to me like you tarred the profile directory instead of the contents of the profile directory. That's why your profile is copied in a subfolder in the active profile instead overwriting the active profile.

vringar avatar Jun 29 '21 07:06 vringar

Okay, thanks for clarifying. I did not see the doc entry about profiles. I think it is because I do not have much experience with Firefox profiles, so I was looking for 'adding extensions' instead of 'adding profiles'.

I appreciate all the help.

8-legged-elephant avatar Jun 29 '21 14:06 8-legged-elephant

No worries. I just had the feeling that I had already seen some docs for this. And then I found the solution to your error there.

I'll write up something explicitly mentioning add-ons

vringar avatar Jun 29 '21 19:06 vringar

@8-legged-elephant Did you try just installing the xpi with selenium's install_addon function in the deploy_firefox.py file?

MaazBinMusa avatar Aug 30 '21 19:08 MaazBinMusa