콘텐츠로 건너뛰기
라이엇 비트

라이엇 비트

  • 집
  • 소식
  • 가이드
  • 비디오 가이드
  • 패치 노트
  • 남용 신고
  • 검색 양식 전환
비트버너

비트버너 – 루트 접근자 스크립트

에 게시됨 12/29/2021 에 의해 Crunchynut 코멘트 없음 ~에 비트버너 – 루트 접근자 스크립트
  • 제목: 비트버너
  • 출시일:
  • 개발자:
  • 발행자:
Bitburner에 대한 정보는 아직 불완전합니다.. 이것을 사용하여 게임의 세부 정보를 입력할 수 있도록 도와주세요. 문의 양식.

Attempts to gain root access to all servers and present them in an easy-to-see and use format.

개요

This script gets all servers, opens all ports possible, and attempts to gain root access, all while presenting the user with easy-to-read and useful information.

사용방법

Create each script below and paste the code appropriately.

Run the script!

명령:

run RootAccessor.ns

Runs the script against all servers. Displays results.

run RootAccessor.ns -h

brings up the help menu for the script. The script does not process any further if it contains “-시간” as an argument.

run RootAccessor.ns -s

lists all servers with root access as a space-separated list if users want to utilize them as arguments in other scripts.

run RootAccessor.ns joesguns n00dles max-hardware

attempts to gain root access on target servers (each argument is a server name).

run RootAccessor.ns joesguns n00dles max-hardware -s
run RootAccessor.ns -s joesguns n00dles max-hardware
run RootAccessor.ns joesguns n00dles -s max-hardware

“-에스” can be added as an argument at any time.

RootAccessor.ns Script

Create a new script with whatever name you’d like. I called mine “RootAccessor.ns”. Paste the below code into it. 그것은 포함되어 있습니다 3 functions that make up the entire script.

/** @param {NS} ns **/
수입 {allServers} ~에서 "./lib-getServers.ns";

비동기 함수 메인 내보내기(ns) {
	var approved = [];
	var deniedhack = [];
	var deniedports = [];
	var denied = [];
	var other = [];
	var files = [0, 0, 0, 0, 0];
	var maxPorts = 0;

	//suppress all default log messages
	ns.tail(); ns.disableLog('모두'); ns.clearLog();

	//check for help argument.
	만약에 (ns.args.includes("-시간")) {돕다(ns); 반품;}
	ns.print("For script help use argument '-h' ");
	
	ns.print("Executing...");
	
	//process argument calls
	var target = [];
	만약에 (ns.args.length > 0) {
		만약에 (ns.args[0] === "-에스") {
			target = await allServers(ns);
		} 또 다른 {
			target = ns.args;
		}
	} 또 다른 {
		target = await allServers(ns);
	}

	//check max ports available to open
	if (ns.FileExists("BruteSSH.exe"))  {파일[0] = 1; maxPorts++; ns.print("BruteSSH.exe file exists");}  또 다른 {ns.print("BruteSSH.exe not found");}
	만약에 (ns.FileExists("FTPCrack.exe"))  {파일[1] = 1; maxPorts++; ns.print("FTPCrack.exe file exists");}  또 다른 {ns.print("FTPCrack.exe not found");}
	만약에 (ns.FileExists("relaySMTP.exe")) {파일[2] = 1; maxPorts++; ns.print("relaySMTP.exe file exists");} 또 다른 {ns.print("relaySMTP.exe not found");}
	만약에 (ns.FileExists("HTTPWorm.exe"))  {파일[3] = 1; maxPorts++; ns.print("HTTPWorm.exe file exists");}  또 다른 {ns.print("HTTPWorm.exe not found");}
	만약에 (ns.FileExists("SQLInject.exe")) {파일[4] = 1; maxPorts++; ns.print("SQLInject.exe file exists");} 또 다른 {ns.print("SQLInject.exe not found");}
	ns.print("Maximum ports able to open: [" + maxPorts + "]\N");

	//open all ports and attempt root access
	for (const n of target) {
		만약에 (ns.serverExists(N)) {
			const serverHackLvl = ns.getServerRequiredHackingLevel(N);
			const playerHackingLvl = ns.getHackingLevel();
			
			만약에 (playerHackingLvl >= serverHackLvl) {
				만약에 (파일[0]) { Ns.Brutessh(N); }
				만약에 (파일[1]) { ns.ftpcrack(N); }
				만약에 (파일[2]) { ns.relaysmtp(N);}
				만약에 (파일[3]) { ns.httpworm(N); }
				만약에 (파일[4]) { ns.sqlinject(N);}

				gainRootAccess(N, maxPorts, approved, deniedports, denied, other, ns);

			} 또 다른 {
				denied.push(N);
				deniedhack.push("[DENIED] - hack level too low [" + playerHackingLvl + '/' + serverHackLvl + "] ~을 위한 " + N);
			}
		}
	}

	//output results
	if (deniedhack.length>0) ns.print(deniedhack.join("\N"));
	만약에 (deniedports.length>0) ns.print(deniedports.join("\N"));
	만약에 (other.length>0) ns.print("[ALREADY ACQUIRED ROOT ACCESS] ~을 위한 " + other.join("\N[ALREADY ACQUIRED ROOT ACCESS] ~을 위한 "));
	만약에 (approved.length>0) ns.print("[ROOT ACCESS APPROVED] ~을 위한 " + approved.join("\N[ROOT ACCESS APPROVED] ~을 위한 "));

	만약에 (ns.args.includes("-에스")) {
		ns.print("Copiable list of rooted servers:\N" + approved.join(" ") + other.join(" "));
	}
}

function gainRootAccess(server, portCount, approved, deniedports, denied, other, ns) {
	만약에 (!ns.hasRootAccess(server)) {
		만약에 (portCount >= ns.getServerNumPortsRequired(server)) {
			ns.wull(server);
			approved.push(server);
		} 또 다른 {
			denied.push(server);
			deniedports.push("[ROOT ACCESS DENIED] ~을 위한 " + server + " - Not enough open PORTS");
		}
	} 또 다른 {
		other.push(server);
	}
}

function help(ns) {
	const text = [
		"<========================HELP=====================>\N",
		"- Script takes in [N] arguments or none at all.",
		"  [N]: server names that you wish to be rooted.",
		"  예를 들어: run rootAccessor.ns n00dles joesguns zer0\n",
		"- No args will attempt root access on all servers\n",
		"- include argument '-s' as an argument to print",
		"  copiable list of all rooted servers\n",
		"<=================================================>"
		];
	ns.print(text.join("\N"));
}

lib-getServers.ns Script

Create a new script named “lib-getServers.ns” and paste the below helper function.

/** @param {NS} ns **/

export function allServers(ns, removePurchased=true) {
	만약에 (removePurchased) var pservs = ns.getPurchasedServers();
	const nodes = new Set;
	function dfs(마디) {
		nodes.add(마디);
		~을 위한 (const neighbor of ns.scan(마디)) {
			만약에 (removePurchased) {
				만약에 (!pservs.includes(neighbor)) {
					만약에 (!nodes.has(neighbor)) {
						dfs(neighbor);
					}
				}
			} 또 다른 {
				만약에 (!nodes.has(neighbor)) {
					dfs(neighbor);
				}
			}
		}
	}
	dfs("집");
	반품 [...노드];
}

이것이 오늘 우리가 공유하는 모든 것입니다. 비트버너 가이드. 이 가이드는 원래 작성자가 작성하고 작성했습니다. Crunchynut. 이 가이드를 업데이트하지 못한 경우, 다음을 수행하여 최신 업데이트를 찾을 수 있습니다. 링크.

이 사이트의 콘텐츠가 귀하의 권리를 침해한다고 생각하는 경우, 귀하의 지적 재산권을 포함하여, 문의 양식을 사용하여 즉시 문의하십시오..
가이드 태그:비트버너

탐색 후

이전 게시물: 철도 회사 – How to Make Easy Money
다음 게시물: 비트버너 – 모든 서버를 검색하는 방법

답장을 남겨주세요 답장 취소

귀하의 이메일 주소는 공개되지 않습니다. 필수 입력란이 표시되어 있습니다 *

  • 제목: 비트버너
  • 출시일:
  • 개발자:
  • 발행자:
Bitburner에 대한 정보는 아직 불완전합니다.. 이것을 사용하여 게임의 세부 정보를 입력할 수 있도록 도와주세요. 문의 양식.

부인 성명

인용된 모든 콘텐츠는 해당 소스에서 파생됩니다.. 귀하의 콘텐츠를 허가 없이 사용했다고 생각되는 경우, 우리에게 연락하면 진지하게 받아 들일 것입니다..
  • 회사 소개
  • 문의하기
  • 개인 정보 정책
  • 서비스 약관

저작권 © 2025 라이엇 비트.

에 의해 구동 프레스북 뉴스 WordPress 테마