Skip to content

Instantly share code, notes, and snippets.

Just copy and paste the following codes and execute them.

cd /usr/local/share && wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2 && ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs && ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs && which phantomjs && phantomjs --version

You should get something like the following:

@simasta
simasta / secure-wordpress-apache.conf
Last active January 12, 2020 14:36
Secure Wordpress Apache Config
<files wp-config.php>
order allow,deny
deny from all
</files>
<files readme.html>
Order allow,deny
Deny from all
</files>
@simasta
simasta / phantomjsGoogleSearch
Created January 26, 2020 12:59 — forked from ndhu/phantomjsGoogleSearch
phantomjs. example on how to search google, collect links of search result and scrape multiple pages of the search result
/**
* Created by andy hulstkamp
*/
var webpage = require("webpage"),
fs = require("fs");
var debug = false,
pageIndex = 0,
allLinks = [],
@simasta
simasta / reddit-signup.js
Last active June 27, 2020 18:10 — forked from jsoverson/reddit-signup.js
Reddit signup script w/Puppeteer and 2Captcha
//see: https://medium.com/@jsoverson/bypassing-captchas-with-headless-chrome-93f294518337
const puppeteer = require('puppeteer');
const request = require('request-promise-native');
const poll = require('promise-poller').default;
const siteDetails = {
sitekey: '6LeTnxkTAAAAAN9QEuDZRpn90WwKk_R1TRW_g-JC',
pageurl: 'https://old.reddit.com/login'
}

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',