
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
firefox-client
Advanced tools
firefox-client
is a node library for remote debugging Firefox.
With node.js npm package manager:
npm install firefox-client
Enable remote debugging (You'll only have to do this once)
Open the DevTools. Web Developer > Toggle Tools
Visit the settings panel (gear icon)
Check "Enable remote debugging" under Advanced Settings
Listen for a connection
Open the Firefox command line with Tools > Web Developer > Developer Toolbar.
Start a server by entering this command: listen 6000
(where 6000
is the port number)
Follow the instructions in this Hacks video
Use firefox-client from your node program with:
var FirefoxClient = require("firefox-client");
var client = new FirefoxClient();
client.connect(6000, function() {
client.listTabs(function(err, tabs) {
console.log("first tab:", tabs[0].url);
});
});
This library is compatible with Firefox Nightly.
A FirefoxClient
is the entry point to the API. After connecting, get a Tab
object with listTabs()
or selectedTab()
. Once you have a Tab
, you can call methods and listen to events from the tab's modules, Console
or Network
. There are also experimental DOM
and StyleSheets
tab modules.
Almost all API calls take a callback that will get called with an error as the first argument (or null
if there is no error), and a return value as the second:
tab.Console.evaluateJS("6 + 7", function(err, resp) {
if (err) throw err;
console.log(resp.result);
});
The modules are EventEmitter
s, listen for events with on
or once
, and stop listening with off
:
tab.Console.on("page-error", function(event) {
console.log("new error from tab:", event.errorMessage);
});
Summary of the offerings of the modules and objects:
Methods: connect()
, disconnect()
, listTabs()
, selectedTab()
Events: "error"
, "timeout"
, "end"
Properties: url
, title
Methods: reload()
, navigateTo()
, attach()
, detach()
Events: "navigate"
, "before-navigate"
Methods: evaluateJS()
, startListening()
, stopListening()
, getCachedLogs()
Events: "page-error"
, "console-api-call"
Properties: class
, name
, displayName
Methods: ownPropertyNames()
, ownPropertyDescriptor()
, ownProperties()
, prototype()
Methods: startLogging()
, stopLogging()
, sendHTTPRequest()
Events: "network-event"
Properties: url
, method
, isXHR
Methods: getRequestHeaders()
, getRequestCookies()
, getRequestPostData()
, getResponseHeaders()
, getResponseCookies()
, getResponseContent()
, getEventTimings()
Events: "request-headers"
, "request-cookies"
, "request-postdata"
, "response-start"
, "response-headers"
, "response-cookies"
, "event-timings"
Methods: document()
, documentElement()
, querySelector()
, querySelectorAll()
Properties: nodeValue
, nodeName
, namespaceURI
Methods: parentNode()
, parents()
, siblings()
, nextSibling()
, previousSibling()
, querySelector()
, querySelectorAll()
, innerHTML()
, outerHTML()
, setAttribute()
, remove()
, release()
Methods: getStyleSheets()
, addStyleSheet()
Properties: href
, disabled
, ruleCount
Methods: update()
, toggleDisabled()
Events: "disabled-changed"
, "ruleCount-changed"
fxconsole - a remote JavaScript console for Firefox
What do you need from the API? File an issue.
FAQs
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
The npm package firefox-client receives a total of 98 weekly downloads. As such, firefox-client popularity was classified as not popular.
We found that firefox-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.