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

shrvr

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shrvr - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

3

dist/lib/util.js

@@ -39,3 +39,3 @@ var Command, createHandler, debug, exec, extend, fslib, parse, parseFile;

src = "return''";
regex = /#(\w+)/g;
regex = /#(\w+(:?\.\w+)*)/g;
latestIndex = 0;

@@ -55,2 +55,3 @@ placeholders = 0;

}
debug(src);
return this._fn = new Function("_d", src);

@@ -57,0 +58,0 @@ };

@@ -11,3 +11,3 @@ var exec, pathlib, util;

var cmds;
cmds = ['iptables -A INPUT -s 192.168.1.15 -p tcp --dport 8080 -j ACCEPT', 'iptables -A INPUT -s #source_ip -p tcp --dport 8080 -j ACCEPT', 'iptables -A PREROUTING -s #source_ip -p tcp --dport #port -j DNAT --to-destination 192.168.1.3:8080', 'iptables -A PREROUTING -s #source_ip -p tcp --dport #port -j DNAT --to-destination #destination'];
cmds = ['iptables -A INPUT -s 192.168.1.15 -p tcp --dport 8080 -j ACCEPT', 'iptables -A INPUT -s #source_ip -p tcp --dport 8080 -j ACCEPT', 'iptables -A PREROUTING -s #source_ip -p tcp --dport #port -j DNAT --to-destination 192.168.1.3:8080', 'iptables -A PREROUTING -s #source_ip -p tcp --dport #port -j DNAT --to-destination #destination', 'Hello #user.name, son of #user.father.'];
describe('Command', function() {

@@ -50,2 +50,12 @@ describe('#constructor', function() {

});
it('should subsitute nested placeholders ', function() {
var command;
command = new util.Command(cmds[4]);
return command.toString({
user: {
name: 'Gimli',
father: 'Glóin'
}
}).should.eql('Hello Gimli, son of Glóin.');
});
return it('should output unsafe subsitution', function() {

@@ -52,0 +62,0 @@ var command;

{
"name": "shrvr",
"version": "0.0.3",
"version": "0.0.4",
"description": "Shell server",

@@ -34,2 +34,3 @@ "bin": {

"dependencies": {
"body-parser": "^1.12.0",
"debug": "^2.1.1",

@@ -44,4 +45,5 @@ "express": "^4.11.2",

"gulp-coffee": "^2.3.1",
"gulp-util": "^3.0.3"
"gulp-util": "^3.0.3",
"gulp-header": "^1.2.2"
}
}
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