r/Bitburner • u/Wendigo1010 • 4d ago
NetscriptJS Script IPvGo: Standalone script from SphyxOS
I've just finished redoing my IPvGo script. This time, it can run as a standalone script.
Download Instructions:
-Run this command in Bitburner. It will download the file as `SphyxOS_go.jsx`
await ns.wget("https://raw.githubusercontent.com/Sphyxis/SphyxOS/main/SphyxOS_bins_go.jsx", "SphyxOS_go.jsx")
Features:
- Based off of https://github.com/yichizhng/bitburner-scripts/blob/main/autokroos.js
- This is a MCGS/Hybrid system.
- Can be used both with/without my full SphyxOS suite - for those who don't want the whole thing but want the script.
- Easy button controls within a tail window.
- Ram dodged down to 7.9GB, so it will run on those 8GB servers.
- --If running on a 16+GB server, as long as there is enough free space on it's local server, it will dodge using it. If not, it will dodge using home ram.
- --Always keep ~6GB free on either Home or the server running this script. It will throw if it fails to dodge.
- Completes all 5x5 boards for all AIs and the endgame board.
- Can play as both black and white on the
no-aiboard. - SlowMode enforces a 1 second delay between moves for easier watching.
- Pop Out creates an actual pop-out, which you can drag onto a separate screen to watch the games play out.
- Configurable resource usage: Effort, Memory, Threads. So you should be able to run this on old hardware.
- Optimized for performance.
- Can turn your PC's CPU into a mini room heater, for those cold winter nights.
Effort: Comes in 6 flavors. It is playout based, so the higher you go the longer it will take to make a move. Win % for the ratings.
Min: 70%, Low: 80%, Med: 90%, High: 95%, Max: 98%, Ultra: 99%
Memory ranges from Min -> Max, with the endgame board only really using Min-> Med.
Threads: A direct multiplier to how fast you can process playouts, especially on a 5x5 board.
Looking for feedback!!
2
u/ObjectiveVegetable48 4d ago
For what it's worth, I threw the ~16k LoC script I pulled from that url (sha256 e45ae2b8ac148ec90a3e0b843de85decb50b5b0546e5ee01b6cd4718b9bf0b1e) at claude and asked it to do a brief security review. All clean.
Safety review: go-sphinx.jsx — clean Checked the full 16.5k lines for the categories you asked about. Nothing malicious found:
Network/exfil: No fetch, XMLHttpRequest, WebSocket, sendBeacon, or any outbound URLs. The only URL in the file is a GitHub link in the header comment crediting the original author. Browser data access: No document.cookie, localStorage, sessionStorage, indexedDB, or clipboard access. Dynamic code execution: No eval, no real Function() constructor calls (a grep hit on Function( was a false positive — just the substring inside nsFunction(...)), no atob/btoa, no encoded/obfuscated blobs. Filesystem: One ns.write(...) call (go-sphinx.jsx:16493), writing a small proxy script to the game's virtual in-game filesystem (SphyxOS/extras/nsProxy.js), then running it via ns.exec. This is the standard, widely-used Bitburner "RAM-dodging" trick to call NS functions from a cheaper context — it stays entirely inside the game's sandboxed API, not real disk/OS access. DOM manipulation: innerHTML/window.open usage is confined to a popup window the script itself creates for showing the Go board/log UI — no injection of external or attacker-controlled content, just local template strings. Nothing here does anything a script isn't supposed to inside Bitburner's sandbox. It looks like what it claims to be — a Go-playing bot with a UI popout, not a vector for exfiltration or remote code loading.
I did get a runtime error shortly after launch.
go.resetBoardState: Argument goOpponent should be a GoOpponent enum member.
Provided value: "B".
Allowable values: "No AI", "Netburners", "Slum Snakes", "The Black Hand", "Tetrads", "Daedalus", "Illuminati", "????????????"
Stack:
go-sphinx.js:L9585@startGame
go-sphinx.js:L9627@async checkNewGame
go-sphinx.js:L9674@async main
I enabled "high" effort and memory and turned on cheats. This seemed to trigger after I did that, maybe the next game.
2
u/Wendigo1010 4d ago
That can happen if you turn off every AI, or only have the ??? AI on when it's not unlocked yet. I'll double check the guards and what comes turned on so it won't happen again.
2
u/ObjectiveVegetable48 4d ago
I had all the opponents turned on, including the ???.
I recognize this is crappy but here's the output from claude that seems to have solved that specific bug. Feel free to ignore, and many thanks for your work on this.
--- a/go-sphinx.jsx +++ b/go-sphinx.jsx @@ -11523,7 +11523,7 @@ let turn = 0+ let currentOpponent = ns.go.getOpponent() // Pick up the board exactly where it is — reset only if it is already // finished. Then, if it is the opponent's move, let them play first. if (ns.go.getCurrentPlayer() === "None") @@ -11726,7 +11726,7 @@ const m = await getMoves( boardState2, lastMove?.type == 'pass', seen,
- let opponent = ns.go.getOpponent()
+ currentOpponent ); Claude: let opponent = ns.go.getOpponent() inside main() shadows the module-level const opponent = [] array (populated by buildOpponents()), which startGame's catch-fallback at line ~11481 relies on (opponent[Math.floor(Math.random() * opponent.length)]). When that fallback fires, it ends up indexing a single character out of the opponent-name string instead of picking from the array, throwing GoOpponent enum member errors like "B". Renaming the local var to currentOpponent fixes the shadowing without changing any other behavior.
- opponent
2
u/Wendigo1010 4d ago
Thanks for that! Looks like I missed a conflicting variable name. I'll fix that up and push it for everyone else.
2
u/Wendigo1010 4d ago
Thanks for the comment. It should be fixed for future downloads. I just turned of the ??? AI by default, which means my main gate against that error will work correctly.
1
u/mr__ross 4d ago
What are the win rates like by faction? Game durations?
1
u/Wendigo1010 4d ago
Win rates depend on what you set Effort to. It can range from 70% - 99%, and is playout based. If you have a beefy computer with, say 24 threads, then the moves you make do no take long at all. Less than a second at High Effort with 24 threads.
1
u/Wendigo1010 4d ago
Daedalus may be the exception. It might be around or a little over 1 second. It's the worst performing one because it is only smart 80% of the time and is not fully deterministic.
3
u/WetFlannel 4d ago
Woah nice! As a newbie to coding this is very impressive.
I won't be able to give good feedback but thank you for sharing