
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
network-har
Advanced tools
CLI utility that uses Nightmare.js and the nightmare har plugin to capture network activity in HAR (HTTP Archive) format. It also provides a docker image which retrieves the HAR by running nightmarejs headlessly.
Only 1 command is required to be executed to retrive the network information. Can be used as a:
network-har [options]docker run --rm alexbardas/network-har [options]npm install -g network-har
network-har [options]
docker pull alexbardas/network-har
docker run --rm alexbardas/network-har [options]
Gain access inside the container:
docker run -it --entrypoint=/bin/bash --rm alexbardas/network-har
root@containerid:/src# ./network-har.sh [options]
The network-har.sh (docker's image entrypoint) can be used to headlessly retrieve the network information in a CI step which is based on the alexbardas/network-har docker image.
Jq command line JSON preprocessor is already installed on the provided docker image, so the json HAR output can be very easily parsed inside the container.
The following commands can be interchangeable, but they depend on the executing environment:
network-har [options] (if nodejs is available and the network-har npm package is installed and if the environment already has an X server -> many ifs)docker run --rm alexbardas/network-har [options] (if docker is installed)./network-har.sh [options] (inside a docker container created from the provided image. Useful in a CI step)--helpPrints detailed help information.
docker run --rm alexbardas/network-har --help
--debug (optional, no extra arguments)Opens a minimal window manager (jwm) and a vnc server (x11vnc) in the docker container to allow remote debugging. Connect with a vnc viewer to localhost:5900 using the password secret.
Free VNC viewers:
--url string (required)The website for which the har information is needed.
docker run --rm alexbardas/network-har \
--url https://news.ycombinator.com
--header string:string (optional, default: none)Additional headers to be added to the http request. Can be used multiple times.
docker run --rm alexbardas/network-har \
--url https://news.ycombinator.com \
--header "Cache-Control:no-cache" \
--header "Accept-Language:en-us"
--retries number (optional, default: 2)Number of maximum retries for getting the network HAR in case the the command fails with a network error. Useful because electron can have intermittent network failures.
docker run --rm alexbardas/network-har \
--url https://news.ycombinator.com \
--retries 3
--useragent string (optional, default: none)Overrides default electron useragent with a new value.
docker run --rm alexbardas/network-har \
--url https://news.ycombinator.com \
--useragent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2860.0 Safari/537.36"
--viewport number,number (optional, default: 375,667)Overrides default electron viewport with new values.
docker run --rm alexbardas/network-har \
--url https://news.ycombinator.com \
--viewport 1366,768
--wait number (optional, default: 5000)Waits for the specified number of ms after the request is made until retrieving the network information.
docker run --rm alexbardas/network-har \
--url https://news.ycombinator.com \
--wait 10000
--wait string (optional, default: none)Waits for a specific element defined by a string selector to be available in the DOM.
docker run --rm alexbardas/network-har \
--url https://news.ycombinator.com \
--wait "#hnmain"
Retrieve the network HAR for hackernews for:
1024x768 viewportnetwork-har useragentCache-Control: no-cache and Accept-Language: en-US headers10s wait time for network resources3 maximum retriesdocker run --rm alexbardas/network-har \
--url https://news.ycombinator.com \
--useragent "network-har" \
--viewport 1024,768 \
--header "Cache-Control:no-cache" \
--header "Accept-Language:en-US" \
--retries 3 \
--wait "#hnmain"
Nodejs binary:
Docker image:
--debug. An extra window manager and vnc server are started in order to enable debugging from the user's host machine inside the docker container.Network-har is an open source project and welcome contributions.
See CONTRIBUTING.md to get your local environment set up.
FAQs
CLI utility to retrieve network activity in HAR (HTTP Archive) format
We found that network-har 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.