This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const unzipper = require('unzipper'); | |
(async () => { | |
try { | |
const directory = await unzipper.Open.file('path/to/your.zip'); | |
const extracted = await directory.files[0].buffer('PASSWORD'); | |
// If the extracted entity is a file, | |
// converting the extracted buffer to string would print the file content | |
console.log(extracted.toString()); | |
} catch(e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const proxy = require('./proxy'); // Our own proxy module | |
(async () => { | |
// Connect to the Tor network | |
const ip = await proxy(); | |
console.log('Connected to IP:', ip); | |
let browser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { spawn, exec } = require('child_process'); | |
let tor; | |
const proxy = kill => | |
new Promise(resolve => { | |
if (kill && tor) { | |
tor.stdin.pause(); | |
tor.kill(); | |
resolve('killed'); | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Person class. | |
* | |
* @constructor | |
* @param {String} name - name of a person. | |
* @param {Number} age - age of a person. | |
* @param {String} gender - gender of a person. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Person class. | |
* | |
* @constructor | |
* @param {String} name - name of a person. | |
* @param {Number} age - age of a person. | |
* @param {String} gender - gender of a person. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Person class. | |
* | |
* @constructor | |
* @param {String} name - name of a person. | |
* @param {Number} age - age of a person. | |
* @param {String} gender - gender of a person. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
// Try to use process.env.PRIVATE_KEY instead of exposing your key | |
const privateKey = `-----BEGIN RSA PRIVATE KEY----- | |
XXXXXXXX | |
XXXXXXXX | |
XXXXXXXX | |
XXXXXXXX | |
-----END RSA PRIVATE KEY-----` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
// Try to use process.env.PRIVATE_KEY instead of exposing your key | |
const privateKey = `-----BEGIN RSA PRIVATE KEY----- | |
XXXXXXXX | |
XXXXXXXX | |
XXXXXXXX | |
XXXXXXXX | |
-----END RSA PRIVATE KEY-----` |
NewerOlder