Simple server for fetching static web pages using Firefox Marionette
661
Simple application fetching static HTML via Firefox Marionette.
It is designed most for internal using. YOU HAVE TO PREVENT SECURITY ISSUE YOURSELF.
Prpr accepts following environmental variables:
SECRET: shared secret. Default to "" which disables authenticating.FIREFOX: path to Firefox binary. Default to "firefox".DEBUG_FIREFOX: disable --headless mode.FIREFOX_OPTS: extra command line arguments passed to Firefox.BIND: binding address passed to ListenAndServe. Default to ":9801".QUEUE_SIZE: max concurrent loading pages. Default to 1.It always passes --marionette and --safe-mode to Firefox.
The docker image ronmi/prpr will create new profile directory in /tmp each run,
which might waste disk space if you start/stop it frequently.
You can mount a volume somewhere and pass it in envvar FIREFOX_PROFILE
docker run -d --name prpr \
-v "$(pwd)/data:/fxprofile" \
-e "FIREFOX_PROFILE=/fxprofile" \
-p "127.0.0.1:9801:9801" \
ronmi/prpr
It is much more complex in real code as prpr now supports concurrent loading.
wget \
--post-data='uri=http://google.com&wait=queryString&secret=mysecret' \
http://127.0.0.1:9801/grab
uri: URL you want to fetch from.wait: CSS-selector to wait for.secret: your shared secret.It returns HTML code if success, 400 if shared secret mismatch and 500 when failed.
MAKE SURE YOU KNOW WHAT YOU ARE FETCHING!
WTFPL
Content type
Image
Digest
Size
156.6 MB
Last updated
over 6 years ago
docker pull ronmi/prpr