Updated docs

This commit is contained in:
Zakary Timson 2022-04-03 20:11:49 -04:00
parent a95b1d844d
commit 322c5f72d4

168
README.md
View File

@ -1,10 +1,13 @@
# BitBurner - Scripts
These scripts are for playing the [open source](https://github.com/danielyxie/bitburner) game [BitBurner](https://danielyxie.github.io/bitburner/)
A collection of scripts & information pertaining to the [open source](https://github.com/danielyxie/bitburner) game
[BitBurner](https://danielyxie.github.io/bitburner/).
## Table of Contents
- [BitBurner - Scripts](#bitburner-scripts)
- [Table of Contents](#table-of-contents)
- [Quick Start](#quick-start)
- [Guide](#guide)
- [BitNode 1](#bitnode-1)
- [Scripts](#scripts)
- [botnet-manager.js (WIP)](#botnet-managerjs-wip)
- [connect.js](#connectjs)
@ -15,7 +18,7 @@ These scripts are for playing the [open source](https://github.com/danielyxie/bi
- [miner.js](#minerjs)
- [network-graph.js](#network-graphjs)
- [rootkit.js](#rootkitjs)
- [server-manager.js](#server-managerjs)
- [server-manager.js (WIP)](#server-managerjs-wip)
- [update.js](#updatejs)
## Quick Start
@ -29,8 +32,8 @@ run scripts/update.js # Repeat to pull the latest
run scripts/network-graph.js --verbose
run scripts/netowkr-graph.js -v --filter CSEC # Find path to a specific device
# Start the node manager & cap it at 8 nodes
run scripts/node-manager.js 8
# Start the node manager in auto-mode
run scripts/node-manager.js -a
# Chain the crawler & rootkit to root all devices on the network
run scripts/crawler.js --not-rooted /scripts/rootkit.js {{TARGET}}
@ -45,14 +48,35 @@ run scripts/connect.js CSEC
backdoor
```
Learn more about the [availible scripts](#scripts) bellow or pass the `--help` flag to any of the included scripts in-game.
Learn more about the [available scripts](#scripts) bellow or pass the `--help` flag to any of the included scripts in-game.
## Guide
This guide documents how you can use this repository to progress through the game. You should complete the tutorial
first if you haven't already.
### BitNode 1
1. First you need to download this repo into the game. Manually download `update.js` & run it:
`wget https://gitlab.zakscode.com/ztimson/BitBurner/-/raw/develop/scripts/update.js scripts/update.js; run scripts/update.js`
2. Scan the network to figure out your bearings, take note of discovered server's required hack level:
`run scripts/network-graph.js -vd 3`
3. Root the lowest level server (probably n00dles) & make it hack itself for money. You should repeat this step when
ever your hack level is high enough to hack another a new server. `run scripts/rootkit.js n00dles /scripts/miner.js`
4. Start `hacknet-manger.js`. You won't have enough *RAM* in the beginning to run the manager & hack servers. It's
recommended you `tail` the manager, so you can easily start/stop it as needed. `run script/hacknet-manager.js -a`
5. Once you have enough money ($??,???.??), upgrade your home severs *RAM*:
`City > alpha ent. > Upgrade 'home' RAM (8.00GB -> 16.00GB)`
6. At this point you have enough *RAM* to use `crawler.js` to automatically discover servers & hack them. Continue to
run this periodically as your hack level increases & you unlock more exploits:
`run scripts/crawler.js -n /scripts/rootkit.js {{TARGET}} /scripts/miner.js`
## Scripts
### [botnet-manager.js (WIP)](./scripts/botnet-manager.js)
**RAM:** 7.15 GB
Connect & manage a network of devices to launch distributed attacks.
Late-game solution to hack servers. It orchestrates an unlimited number of servers to carry out distributed batched
attacks against targets. It includes a bunch of utilities to quickly dispatch single commands to all workers. Manger
can be tailed for live updates.
```
[home ~/]> run /scripts/botnet-manager.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -77,10 +101,24 @@ Commands:
start Start this device as the swarm manager
```
#### Examples
```bash
# Start the manager
run scripts/botnet-manager.js start
# Add a single server to the botnet
run scripts/botnet-manager.js join --device n00dles
# Add all rooted servers to the botnet
run scripts/crawler.js -r /scripts/botnet-manager.js join --device {{TARGET}}
# Distribute & run a script on the entire botnet network
run scripts/botnet-manager.js run /scripts/miner.js n00dles
```
### [connect.js](./scripts/connect.js)
**RAM:** 1.85 GB
Search the network for a device and connect to it.
The built in `connect` command only allows you to connect to devices in the immediate vicinity or servers that have
backdoors installed requiring you to make several jumps. This script will automatically find a path & connect you saving
you some time.
```
[home ~/]> run /scripts/connect.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -97,10 +135,19 @@ Options:
-h --help Display this help message
```
#### Examples
```bash
# Connect to a server without knowing where it is
run scripts/connect.js CSEC
run scripts/connect.js I.I.I.I
```
### [copy.js](./scripts/copy.js)
**RAM:** 3.50 GB
Copy a file/script to a device along with any dependencies.
Scripts often import other scripts requiring multiple `scp` calls before it can be run on a remote machine. This script
will automatically scan the file being copied for imports & recursively scan & copy the dependencies. Plus it has a
fancy animated loading bar.
```
[home ~/]> run scripts/copy.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -115,15 +162,23 @@ Usage: run copy.js [OPTIONS] FILE DEVICE
DEVICE Device to copy file(s) to
Options:
-d --no-deps Skip copying dependencies
-n --no-deps Skip copying dependencies
-s --silent Surpress program output
-h --help Display this help message
```
#### Examples
```bash
# Copy the miner script with it's dependencies
run scripts/copy.js /scripts/miner.js n00dles
# Copy without the animated bar & dependencies
run scripts/copy.js -sn /scripts/miner.js n00dles
```
### [crawler.js](./scripts/crawler.js)
**RAM:** 4.15 GB
Search the network for devices to execute a script against.
Mid-game solution to distribute & run scripts across the network.
```
[home ~/]> run scripts/crawler.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -151,10 +206,21 @@ Options:
-h --help Display this help message
```
#### Examples
```bash
# Run a command on the local machine targeting discovered devices
run scripts/crawler.js -n /scripts/rootkit.js {{TARGET}}
# Chain the miner to the rootkit to automatically deploy it
run scripts/crawler.js -n /scripts/rootkit.js {{TARGET}} /scripts/miner.js
# Deploy a script on rooted devices
run scripts/crawler.js -re /scripts/miner.js n00dles
```
### [find-target.js](./scripts/find-target.js)
**RAM:** 6.00 GB
Scan the network for the best device(s) to mine.
A utility to help figure out which server is worth hacking the most. It does this by estimating the financial yield per
minute for each server & returns the servers in a sorted list.
```
[home ~/]> run scripts/find-target.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -173,10 +239,18 @@ Options:
-h --help Display this help message
```
#### Examples
```bash
# Rank all the servers on the network
run scripts/find-target.js -v
# Best server currently rooted
run scripts/find-target.js -rc 1
```
### [hacknet-manager.js](./scripts/hacknet-manager.js)
**RAM:** 5.70 GB
Buy, upgrade & manage Hacknet nodes automatically. Tail for live updates.
An early game solution to automate the hacknet & get easy money.
```
[home ~/]> run scripts/hacknet-manager.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -196,10 +270,19 @@ Options:
-h --help Display this help message
```
#### Examples
```bash
# Start the manager to 8 nodes & prevent spending while we have less than $1 million
run scripts/hacknet-manager.js -b 1E6 8
# Let the hacknet manage & grow itself
run scripts/hacknet-manager.js -a
```
### [miner.js](./scripts/miner.js)
**RAM:** 2.45 GB
Weaken, Grow, Hack loop to "mine" device for money. Tail for live updates.
An early-game HGW script to steal money from servers. You can deploy this on each server and have them hack themselves,
or they can all target the server with the most money which is more efficient (see [find-target.js](#find-targetjs)).
```
[home ~/]> run scripts/miner.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -216,10 +299,23 @@ Options:
-h --help Display this help message
```
#### Examples
```bash
# Use home to hack another server
run scripts/miner.js n00dles
# Make remote server hack itself
run scripts/rootkit.js noodles /scripts/miner.js
# Make remote server hack another remote server
run scripts/rootkit.js noodles /scripts/miner.js foodnstuff
# Distribute the miner on entire network to hack a single server
run scripts/crawler.js /scripts/rootkit.js {{TARGET}} /scripts/miner.js foodnstuff
```
### [network-graph.js](./scripts/network-graph.js)
**RAM:** 3.85 GB
Scan the network for devices and display as an ASCII tree.
A utility to scan the network & build a visual tree of all the devices. It comes with lots of flags to narrow down the
results. It's useful for figuring out where you are, manually finding targets & discovering the path to a server.
```
[home ~/]> run /scripts/network-graph.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -248,12 +344,25 @@ Options:
-h --help Display this help message
```
#### Example
```bash
# Show the entire network
run scripts/network-graph.js -v
# Show servers within 3 hops that still need to be rooted
run scripts/network-graph.js -nvd 3
# Show servers you have rooted
run scripts/network-graph.js -r
# Find a specific server
run scripts/network-graph.js -f CSEC
```
### [rootkit.js](./scripts/rootkit.js)
**RAM:** 5.05 GB <small>(Can be reduced to 4.80 GB)</small>
Programs can be commented out to lower the cost of running.
Automatically gain root on a target machine. A file can also be uploaded & executed.
Automatically gains root on the local or remote server. A script can be passed as an additional argument; it will be
copied and automatically executed with the maximum number of threads after being rooted.
```
[home ~/]> run scripts/rootkit.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -274,10 +383,18 @@ Options:
-h --help Display this help message
```
### [server-manager.js](./scripts/server-manager.js)
#### Examples
```bash
# Hack a remote server
run scripts/rootkit.js n00dles
# Start the miner after hacking
run scripts/rootkit.js n00dles /scripts/miner.js foodnstuff
```
### [server-manager.js (WIP)](./scripts/server-manager.js)
**RAM:** 9.35 GB
Automate the buying & upgrading of servers.
Early game script to handle purchasing and upgrading servers for more computer power.
```
[home ~/]> run /scripts/server-manager.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -296,10 +413,17 @@ Options:
-h, --help Display this help message
```
#### Examples
```bash
# Start automatically purchasing & upgrading servers
run scripts/server-manager.js --ram 16
```
### [update.js](./scripts/update.js)
**RAM:** 2.65 GB
Download the latest script updates from the repository using wget.
Uses the in-game `wget` to download all the scripts in this repository. Can target remote servers to quickly copy the
entire toolkit to the target.
```
[home ~/]> run scripts/update.js --help
Running script with 1 thread(s), pid 1 and args: ["--help"].
@ -317,3 +441,11 @@ Options:
--no-banner Hide the banner (Used internally)
-h --help Display this help message
```
#### Examples
```bash
# Download the scripts to local computer
run scripts/update.js
# Download scripts to a remote computer
run scripts/update.js n00dles
```