New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

restringer

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restringer - npm Package Compare versions

Comparing version 1.6.3 to 1.6.4

2

package.json
{
"name": "restringer",
"version": "1.6.3",
"version": "1.6.4",
"description": "Deobfuscate Javascript with emphasis on reconstructing strings",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -30,3 +30,3 @@ /**

const arg = declBody.body[0].argument;
if (arg.type === 'Identifier' || (arg.type === 'CallExpression' && !arg.arguments.length)) {
if (arg.type === 'Identifier' || (arg.type === 'CallExpression' && !arg.arguments?.length)) {
arb.markNode(c, arg);

@@ -33,0 +33,0 @@ }

@@ -24,3 +24,3 @@ /**

n.body.body[0].argument?.type === 'CallExpression' &&
n.body.body[0].argument.arguments.length === n.params.length &&
n.body.body[0].argument.arguments?.length === n.params?.length &&
n.body.body[0].argument.callee.type === 'Identifier' &&

@@ -27,0 +27,0 @@ candidateFilter(n));

@@ -19,6 +19,7 @@ /**

for (const c of candidates) {
const args = (c.callee.property?.name || c.callee.property?.value) === 'apply' ? c.arguments[1].elements : c.arguments.slice(1);
arb.markNode(c, {
type: 'CallExpression',
callee: c.callee.object,
arguments: (c.callee.property?.name || c.callee.property?.value) === 'apply' ? c.arguments[1].elements : c.arguments.slice(1),
arguments: Array.isArray(args) ? args : (args ? [args] : []),
});

@@ -25,0 +26,0 @@ }

@@ -42,2 +42,4 @@ const evalInVm = require(__dirname + '/evalInVm');

if (callee?.declNode || callee?.object?.declNode) continue;
if ((callee?.object?.type || callee.type ) === 'ThisExpression' ||
(callee?.property?.name || callee?.property?.value) === 'constructor') continue;
const safeImplementation = safeImplementations[callee.name];

@@ -44,0 +46,0 @@ if (safeImplementation) {

Sorry, the diff of this file is not supported yet

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