تخطى الى المحتوى
أعمال الشغب

أعمال الشغب

  • بيت
  • أخبار
  • خطوط إرشاد
  • أدلة الفيديو
  • ملاحظات التصحيح
  • بلغ عن سوء معاملة
  • تبديل شكل البحث
بيتبورنر

بيتبورنر – Root Accessor Script

نشر على 12/29/2021 بواسطة Crunchynut لا تعليقات على بيتبورنر – Root Accessor Script
  • عنوان: بيتبورنر
  • تاريخ الافراج عنه:
  • المطور:
  • الناشر:
المعلومات حول 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!

Commands:

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. It contains 3 functions that make up the entire script.

/** @param {ن.س} نانوثانية **/
import {allServers} من "./lib-getServers.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('ALL'); ns.clearLog();

	//check for help argument.
	لو (ns.args.includes("-ح")) {يساعد(نانوثانية); return;}
	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(نانوثانية);
		} else {
			target = ns.args;
		}
	} else {
		target = await allServers(نانوثانية);
	}

	//check max ports available to open
	if (ns.fileExists("BruteSSH.exe"))  {files[0] = 1; maxPorts++; ns.print("BruteSSH.exe file exists");}  else {ns.print("BruteSSH.exe not found");}
	لو (ns.fileExists("FTPCrack.exe"))  {files[1] = 1; maxPorts++; ns.print("FTPCrack.exe file exists");}  else {ns.print("FTPCrack.exe not found");}
	لو (ns.fileExists("relaySMTP.exe")) {files[2] = 1; maxPorts++; ns.print("relaySMTP.exe file exists");} else {ns.print("relaySMTP.exe not found");}
	لو (ns.fileExists("HTTPWorm.exe"))  {files[3] = 1; maxPorts++; ns.print("HTTPWorm.exe file exists");}  else {ns.print("HTTPWorm.exe not found");}
	لو (ns.fileExists("SQLInject.exe")) {files[4] = 1; maxPorts++; ns.print("SQLInject.exe file exists");} else {ns.print("SQLInject.exe not found");}
	ns.print("Maximum ports able to open: [" + maxPorts + "]\ن");

	//open all ports and attempt root access
	for (const n of target) {
		لو (ns.serverExists(ن)) {
			const serverHackLvl = ns.getServerRequiredHackingLevel(ن);
			const playerHackingLvl = ns.getHackingLevel();
			
			لو (playerHackingLvl >= serverHackLvl) {
				لو (files[0]) { ns.brutessh(ن); }
				لو (files[1]) { ns.ftpcrack(ن); }
				لو (files[2]) { ns.relaysmtp(ن);}
				لو (files[3]) { ns.httpworm(ن); }
				لو (files[4]) { ns.sqlinject(ن);}

				gainRootAccess(ن, maxPorts, approved, deniedports, denied, other, نانوثانية);

			} else {
				denied.push(ن);
				deniedhack.push("[DENIED] - hack level too low [" + playerHackingLvl + '/' + serverHackLvl + "] ل " + ن);
			}
		}
	}

	//output results
	if (deniedhack.length>0) ns.print(deniedhack.join("\ن"));
	لو (deniedports.length>0) ns.print(deniedports.join("\ن"));
	لو (other.length>0) ns.print("[ALREADY ACQUIRED ROOT ACCESS] ل " + other.join("\ن[ALREADY ACQUIRED ROOT ACCESS] ل "));
	لو (approved.length>0) ns.print("[ROOT ACCESS APPROVED] ل " + approved.join("\ن[ROOT ACCESS APPROVED] ل "));

	لو (ns.args.includes("-ق")) {
		ns.print("Copiable list of rooted servers:\ن" + approved.join(" ") + other.join(" "));
	}
}

function gainRootAccess(server, portCount, approved, deniedports, denied, other, نانوثانية) {
	لو (!ns.hasRootAccess(server)) {
		لو (portCount >= ns.getServerNumPortsRequired(server)) {
			ns.nuke(server);
			approved.push(server);
		} else {
			denied.push(server);
			deniedports.push("[ROOT ACCESS DENIED] ل " + server + " - Not enough open PORTS");
		}
	} else {
		other.push(server);
	}
}

function help(نانوثانية) {
	const text = [
		"<========================HELP=====================>\ن",
		"- Script takes in [ن] arguments or none at all.",
		"  [ن]: 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("\ن"));
}

lib-getServers.ns Script

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

/** @param {ن.س} نانوثانية **/

export function allServers(نانوثانية, removePurchased=true) {
	لو (removePurchased) var pservs = ns.getPurchasedServers();
	const nodes = new Set;
	function dfs(node) {
		nodes.add(node);
		ل (const neighbor of ns.scan(node)) {
			لو (removePurchased) {
				لو (!pservs.includes(neighbor)) {
					لو (!nodes.has(neighbor)) {
						dfs(neighbor);
					}
				}
			} else {
				لو (!nodes.has(neighbor)) {
					dfs(neighbor);
				}
			}
		}
	}
	dfs("home");
	return [...nodes];
}

هذا كل ما نشاركه اليوم من أجل هذا بيتبورنر مرشد. تم إنشاء هذا الدليل وكتابته في الأصل بواسطة Crunchynut. في حالة فشلنا في تحديث هذا الدليل, يمكنك العثور على آخر تحديث باتباع هذا وصلة.

إذا كنت تعتقد أن أيًا من محتويات هذا الموقع ينتهك حقوقك, بما في ذلك حقوق الملكية الفكرية الخاصة بك, يرجى الاتصال بنا على الفور باستخدام نموذج الاتصال الخاص بنا.
خطوط إرشاد العلامات:بيتبورنر

آخر الملاحة

المنشور السابق: Railroad Corporation – How to Make Easy Money
المشاركة التالية: بيتبورنر – How to Scan Every Server

ترك الرد إلغاء الرد

لن يتم نشر عنوان بريدك الإلكتروني. تم وضع علامة على الحقول المطلوبة *

  • عنوان: بيتبورنر
  • تاريخ الافراج عنه:
  • المطور:
  • الناشر:
المعلومات حول Bitburner لا تزال غير كاملة. الرجاء مساعدتنا في ملء تفاصيل اللعبة باستخدام هذا نموذج الاتصال.

تنصل

ويستمد كل محتوى استشهد من مصادرها الخاصة. إذا كنت تعتقد أننا استخدمنا المحتوى الخاص بك دون إذن, تأكد من الوصول إلينا وسنأخذ الأمر على محمل الجد.
  • معلومات عنا
  • اتصل بنا
  • سياسة الخصوصية
  • شروط الخدمة

حقوق النشر © 2025 أعمال الشغب.

مشغل بواسطة PressBook News وورد موضوع