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

grabzit

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grabzit - npm Package Compare versions

Comparing version 3.2.9 to 3.3.0

75

lib/grabzit.js
var crypto = require('crypto');
var file = require('fs');
var urlUtility = require('url');
var http = require('http');

@@ -79,2 +80,3 @@ var https = require('https');

PARAMETER_INVALID_PROXY: 173,
PARAMETER_INVALID_NO_NOTIFY: 174,
NETWORK_SERVER_OFFLINE: 200,

@@ -93,2 +95,3 @@ NETWORK_GENERAL_ERROR: 201,

this.port = 80;
this.proxy = null;
this.applicationKey = applicationKey;

@@ -273,2 +276,19 @@ this.applicationSecret = applicationSecret;

if (this.proxy != null)
{
protocol = 'http';
if (this.port == 433)
{
protocol = 'https';
}
options.path = protocol + '://' + options.host + options.path
options.host = this.proxy.host;
options.port = this.proxy.port;
if (this.proxy.username != null && this.proxy.password != null)
{
options.headers = {'proxy-authorization':'Basic ' + new Buffer(this.proxy.username + ':' + this.proxy.password).toString('base64')};
}
}
var request = _getNet().request(options, function (res) {

@@ -303,3 +323,3 @@ if (type == 'binary') {

function _getNet(self){
if (this.port == 433){
if (this.port == 433 && this.proxy == null){
return https;

@@ -396,3 +416,5 @@ }

'proxy': '',
'mergeId': ''
'mergeId': '',
'noCookieNotifications':false,
'address': ''
};

@@ -450,3 +472,5 @@

'proxy': context['proxy'],
'mergeid': context['mergeId']
'mergeid': context['mergeId'],
'nonotify': _toInt(context['noCookieNotifications']),
'address': context['address']
};

@@ -462,3 +486,4 @@

+ '|' + context['postData'] + '|' + context['targetElement'] + '|' + context['templateId'] + '|' + context['templateVariables']
+ '|' + context['pageHeight'] + '|' + context['pageWidth'] + '|' + context['browserWidth'] + '|' + context['proxy'] + '|' + context['mergeId'];
+ '|' + context['pageHeight'] + '|' + context['pageWidth'] + '|' + context['browserWidth'] + '|' + context['proxy'] + '|' + context['mergeId']
+ '|' + context['address'] + '|' + _toInt(context['noCookieNotifications']);

@@ -500,3 +525,5 @@ return new Request(url, requestParams, _createFirstSignature(applicationSecret, target, isPost), signaturePartTwo, isPost, startDelay, target);

'proxy': '',
'mergeId': ''
'mergeId': '',
'noCookieNotifications':false,
'address': ''
};

@@ -556,3 +583,5 @@

'proxy': context['proxy'],
'mergeid': context['mergeId']
'mergeid': context['mergeId'],
'nonotify': _toInt(context['noCookieNotifications']),
'address': context['address']
};

@@ -568,3 +597,3 @@

+ '|' + context['exportUrl'] + '|' + context['waitForElement'] + '|' + context['encryptionKey'] + '|' + _toInt(context['noAds'])
+ '|' + context['postData']+ '|' + context['browserWidth']+ '|' + context['pageHeight']+ '|' + context['pageWidth']+ '|' + context['templateVariables'] + '|' + context['proxy'] + '|' + context['mergeId'];
+ '|' + context['postData']+ '|' + context['browserWidth']+ '|' + context['pageHeight']+ '|' + context['pageWidth']+ '|' + context['templateVariables'] + '|' + context['proxy'] + '|' + context['mergeId'] + '|' + context['address'] + '|' + _toInt(context['noCookieNotifications']);

@@ -587,3 +616,4 @@ return new Request(url, requestParams, _createFirstSignature(applicationSecret, target, isPost), signaturePartTwo, isPost, startDelay, target);

'postData':'',
'proxy': ''
'proxy': '',
'address': ''
};

@@ -608,3 +638,4 @@

'post': context['postData'],
'proxy': context['proxy']
'proxy': context['proxy'],
'address': context['address']
};

@@ -617,3 +648,4 @@

+ '|' + _toInt(context['includeHeaderNames']) + '|' + context['targetElement'] + '|' + context['format'] + '|' + parseInt(context['requestAs'])
+ '|' + context['country'] + '|' + context['exportUrl'] + '|' + context['encryptionKey'] + '|' + context['postData'] + '|' + context['proxy'];
+ '|' + context['country'] + '|' + context['exportUrl'] + '|' + context['encryptionKey'] + '|' + context['postData'] + '|' + context['proxy']
+ '|' + context['address'];

@@ -694,3 +726,5 @@ return new Request(url, requestParams, _createFirstSignature(applicationSecret, target, isPost), signaturePartTwo, isPost, startDelay, target);

'postData':'',
'proxy': ''
'proxy': '',
'noCookieNotifications':false,
'address': ''
};

@@ -727,3 +761,5 @@

'post': context['postData'],
'proxy': context['proxy']
'proxy': context['proxy'],
'nonotify': _toInt(context['noCookieNotifications']),
'address': context['address']
};

@@ -737,3 +773,4 @@

+ '|' + context['hideElement'] + '|' + context['exportUrl'] + '|' + context['waitForElement'] + '|' + _toInt(context['transparent'])
+ '|' + context['encryptionKey'] + '|' + _toInt(context['noAds']) + '|' + context['postData'] + '|' + context['proxy'];
+ '|' + context['encryptionKey'] + '|' + _toInt(context['noAds']) + '|' + context['postData'] + '|' + context['proxy'] + '|' + context['address']
+ '|' + _toInt(context['noCookieNotifications']);

@@ -772,3 +809,3 @@ return new Request(url, requestParams, _createFirstSignature(applicationSecret, target, isPost), signaturePartTwo, isPost, startDelay, target);

error.message = 'File: ' + filePath + ' does not exist';
error.code = self.FILE_NON_EXISTANT_PATH;
error.code = this.FILE_NON_EXISTANT_PATH;
throw error;

@@ -1244,2 +1281,12 @@ };

GrabzItClient.prototype.set_local_proxy = function (proxyUrl) {
const pUrl = urlUtility.parse(proxyUrl);
this.proxy = {
'host':pUrl.hostname,
'port':pUrl.port,
'username':pUrl.username,
'password':pUrl.password
}
}
/*

@@ -1246,0 +1293,0 @@ * This method creates a cryptographically secure encryption key to pass to the encryption key parameter.

2

package.json
{
"name": "grabzit",
"description": "Automatically convert HTML or URL's into images, DOCX or PDF documents. Additionally convert online videos into animated GIF's or convert HTML tables to CSV.",
"version": "3.2.9",
"version": "3.3.0",
"main": "./lib/grabzit",

@@ -6,0 +6,0 @@ "keywords": [

@@ -1,2 +0,2 @@

GrabzIt 3.2
GrabzIt 3.3
===========

@@ -3,0 +3,0 @@

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