Skip to content

Instantly share code, notes, and snippets.

View ChaelCodes's full-sized avatar

Rachael Wright-Munn ChaelCodes

View GitHub Profile
@ChaelCodes
ChaelCodes / autoHack.js
Last active November 29, 2020 19:37
Server Status Dashboard for BitBurner
import { networkTraversal } from '/scripts/networkTraversal.js';
export async function main(ns) {
let home = ns.getHostname();
networkTraversal(ns, home, home, crackAndHack);
}
function crackAndHack(ns, targetServer, originServer) {
if (!ns.hasRootAccess(targetServer) && hackableServer(ns, targetServer)) {
crackServer(ns, targetServer);
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
{
"binary_file_patterns":
[
"generated/*",
"*.tbz2",
"*.gzip",
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
@ChaelCodes
ChaelCodes / Kill Unterminated Rails Server
Created August 8, 2019 12:59
Kill Unterminated Rails Server
lsof -wni tcp:3000
kill -9 <pid>