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

node-curl-impersonate

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-curl-impersonate - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "node-curl-impersonate",
"version": "1.1.1",
"version": "1.1.2",
"description": "A wrapper around cURL-impersonate, a binary which can be used to bypass TLS fingerprinting.",

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

@@ -108,28 +108,8 @@ /*

getRequest(flags: Array<string>, headers: string) {
return new Promise((resolve, reject) => {
// GET REQUEST
const binpath = path.join(__dirname, '..', 'bin', this.binary);
const args = `${flags.join(' ')} ${headers} ${this.url}`;
const childProcess = proc.spawn(`${binpath} ${args}`, { shell: true });
let stdoutData = '';
childProcess.stdout.on('data', (data) => {
stdoutData += data.toString();
});
childProcess.on('error', (error) => {
reject(error);
});
childProcess.on('close', (code) => {
if (code === 0) {
resolve(stdoutData);
} else {
reject(new Error(`Child process exited with code ${code}`));
}
});
});
}
// GET REQUEST
let binpath = path.join(__dirname, '..', 'bin', this.binary);
let args = `${flags.join(' ')} ${headers} ${this.url}`;
const result = proc.spawnSync(`${binpath} ${args}`, { shell: true });
return result.stdout.toString(); // Convert the stdout buffer to a string and return it
}

@@ -136,0 +116,0 @@ postRequest(flags: Array<string>, headers: string) {

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