Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shrvr

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shrvr

Shell server

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
2
Weekly downloads
 
Created
Source

Shell server

Start a web server to execute templated shell command directly.

###Usage Install

npm i shrvr -g

Writing the shell template.

alias iptable_path = /iptables/:source_ip/:port/:destination
alias delete_rule = iptables -D PREROUTING -p tcp -s #source_ip --dport #port -j DNAT --to-destination #destination
alias add_rule = iptables -A PREROUTING -p tcp -s #source_ip --dport #port -j DNAT --to-destination #destination
POST iptable_path delete_rule && add_rule && echo "delete_rule" | at now + 48hour
DELETE iptable_path delete_rule

The command on this template will forward requests from :port of :source_ip to :destination. And automatic revoke this rule after 48 hours. A valid command is:

iptable -A PREROUTING -p tcp -s 1.2.3.4 --dport 21135 -j DNAT --to-destination 192.168.2.1:8080

Start shrvr:

shrvr -t example-routes/iptable.route -p 6333 -b 192.168.1.10

Add an iptable rule via shrvr

curl -X POST http://192.168.1.10:6333/1.2.3.4/21135/192.168.2.1:8080

Keywords

FAQs

Package last updated on 09 Mar 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc