Control Linux servers over XMPP chat

  1. Install node.js
  2. mkdir xmpp-bot && cd $_
    npm install optimist
    sudo npm install forever -g
    npm install simple-xmpp
    mkdir conf
  3. Download the three JS files from the link.
  4. Put uptime.js inside the xmpp-bot/conf folder.
  5. Run
    export NODE_PATH=`pwd`/node_modules:$NODE_PATH
  6. dir structure should look like this
    pi@pi-lights:~/xmpp-bot/node_modules $ ls
    app.js  conf  helper.js
    pi@pi-lights:~/xmpp-bot/node_modules $ ls conf
    off1.js  on1.js  uptime.js
  7. Start the server with
    node app.js -u -p password -h '' --port 5222 --master
  8. If it’s working, you’ll see this
    (node) sys is deprecated. Use util instead.
    off1 loaded
    on1 loaded
    uptime loaded

    where all of the “loaded” statements are for the various modules you’ve created.

  9. To create new modules, copy the uptime.js file, rename it to whatever you want, then change the var, holder, and module.exports line to match the new module name you’ve created. Then on the child = exec line, change the part inside the quotation marks to the command you want to run. e.g.
    child = exec("/var/www/html/rfoutlet/codesend 5575996"

  10. To start service in the background, run forever start app.js -u -p <password> -h ‘’ –port 5222 –master

iptables insert rule at a specific position (prepend)

This is useful for putting rules on the input chain. Usually, you will have a DROP rule at the end of the chain, so if you want to add a new rule, it should go before DROP.

To start, figure out which line should be used for the new rule.

iptables -L -n --line-numbers

You will see output like this:

Chain INPUT (policy DROP)
num target prot opt source destination
22 ACCEPT tcp -- tcp dpt:993
23 DROP all --

That means there are 23 rules in the chain.
Next, you should insert the new rule at position 23, like the following:

iptables -I INPUT 23 -p tcp --dport 5222 -j ACCEPT

That will put the new rule at 23 and push the DROP rule down to 24.
Run the first command again and you’ll now see this:

23   ACCEPT     tcp  --              tcp dpt:5222
24   DROP       all  --  

Verifalia email validation SDK how to

Sign up for a free account and create a sub-account.

In Postman, set up a POST request to

Set the authorization to basic auth. Username is the sub-account ID, password is what you set up when creating the sub-account

Set the body to raw, change the type from Text to JSON, and set the request body as the following:

    entries: [
                { inputData: '' },
		{ inputData: '' }

Submit the request, and the response body will contain a line called uniqueID and a randomly generated GUID.

To get the status of the email validation you just submitted, set up a GET request to{the GUID from before}

and set the authorization in the same way as the previous step.

Each email address will be in a separate set of curly braces, with the line “status”: “Success” (or if it wasn’t a success, whatever the error is)


Blog at

Up ↑