This commit is contained in:
Mizzajl committed 2024-10-05 22:02:23 +02:00
commit 7a5338daf5
40 files changed
-1830

No files matched your search

File renamed without changes.
File renamed without changes.
File renamed without changes.
-929
View File
@@ -1,929 +0,0 @@
39474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539475.7339705693439474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.13899141901539474.1389Line truncated
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
36856.42175232096
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37338.67713462529
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
36820.81372704521
39474.138991419015
39474.138991419015
38941.46976158333
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37371.28523438169
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
38408.25982314148
39474.138991419015
39474.138991419015
38400.9983274575
38941.46976158333
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37338.67713462529
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37371.28523438169
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
36820.80846992848
39474.138991419015
39475.73397056934
37374.790437726195
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38407.20555259731
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39471.746522693524
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
37338.67713462529
39474.138991419015
38937.53627978923
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
38937.53627978923
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
36869.083861930114
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
38408.25982314148
39474.138991419015
39475.73397056934
39474.138991419015
37338.67713462529
39474.138991419015
39475.73397056934
38937.53627978923
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
37371.28523438169
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
36857.81038796931
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38400.9983274575
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
37328.116700688224
39474.138991419015
38407.20555259731
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
36820.80846992848
39474.138991419015
39474.138991419015
37374.790437726195
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
36857.80868272481
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37381.85788105512
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
37338.67713462529
39474.138991419015
38941.46976158333
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
38937.53627978923
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
38396.93835470901
39474.138991419015
39475.73397056934
39474.138991419015
37338.67713462529
39474.138991419015
39474.138991419015
38941.46976158333
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
38407.162377987515
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
37371.28523438169
39475.73397056934
38937.53627978923
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
38400.9983274575
39475.73397056934
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39471.746522693524
39475.73397056934
39474.138991419015
37328.116700688224
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37381.85788105512
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
36833.45834451145
39474.138991419015
39474.138991419015
37374.790437726195
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37374.79216692549
39475.73397056934
39475.73397056934
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
37338.67713462529
39474.138991419015
38937.53627978923
38937.53627978923
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
37374.79130235312
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
36820.81372704521
38408.25982314148
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38941.46976158333
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
38937.53627978923
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37338.67713462529
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39464.56911651706
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
38407.162377987515
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37371.28523438169
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
38400.9983274575
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
35392.824515811844
39472.544012268685
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37364.22151863585
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38414.46822204606
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
37338.67713462529
39474.138991419015
39474.138991419015
38937.53627978923
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
37338.67713462529
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
37371.28523438169
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39475.73397056934
39475.73397056934
39474.138991419015
36820.80846992848
39474.138991419015
36833.46360343427
36355.55335347026
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39471.746522693524
38937.53627978923
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39471.746522693524
39474.138991419015
38941.46976158333
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39472.64369846559
39474.138991419015
39474.138991419015
38400.9983274575
39475.73397056934
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
38407.20555259731
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38941.71801558968
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
37338.67713462529
39474.138991419015
39474.138991419015
36355.55335347026
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38937.53627978923
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
36820.80846992848
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39475.73397056934
39474.138991419015
38937.53627978923
38937.53627978923
39474.138991419015
38941.46976158333
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37328.116700688224
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
35861.52213272931
39472.544012268685
39474.138991419015
37371.28523438169
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
36820.81372704521
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39471.746522693524
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
38941.44817427843
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
36370.248403330195
39474.138991419015
39474.138991419015
39474.138991419015
38400.9983274575
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
39475.73397056934
38937.53627978923
38407.20555259731
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
39475.73397056934
39474.138991419015
39474.138991419015
39474.138991419015
39474.138991419015
37360.65483616802
39475.73397056934
39475.73397056934
39474.138991419015
39474.138991419015
@@ -1,29 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
//8,5,1,1,2,6,7,2,5,4
//const sContractData = ns.codingcontract.getData(sContract, sTarget);
const sContractData = "8,5,1,1,2,6,7,2,5,4";
/*
8
5,1
1,2,6
7,2,5,4
*/
//nArray[0[2]]
const sArray = sContractData.split(',');
ns.tprint(sArray);
let nArray = [];
//Number
for (let i = 0; i < sArray.length; i++) {
nArray[i] = Number(sArray[i]);
}
ns.tprint(nArray);
let nLayers = [];
for (let l = 0; l < nArray.length; l++) {
}
}
-108
View File
@@ -1,108 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
//args
const sTarget = ns.args[0]; // target server
// declare objects
const oHome = ns.getServer("home");
//const oTarget = ns.getServer(sTarget);
//declare variables
const sWeakenScript = "RMweaken.js";
const sGrowScript = "RMgrow.js";
const sBatch = "RMcontroller.js";
const nCores = oHome.cpuCores;
let nSecurity = ns.getServerSecurityLevel(sTarget);
const nMinSecurity = ns.getServerMinSecurityLevel(sTarget);
let nMoney = ns.getServerMoneyAvailable(sTarget);
const nMaxMoney = ns.getServerMaxMoney(sTarget);
const nWeakenSTR = ns.weakenAnalyze(1, nCores);
let nWeakenThreads = Math.ceil((nSecurity - nMinSecurity) / nWeakenSTR);
let nFreeRam = ns.getServerMaxRam("home") - ns.getServerUsedRam("home");
ns.tail(ns.pid, oHome.hostname, sTarget);
//ns.resizeTail(815, 395);
//ns.moveTail(1925, 0);
// crack target
//ns.run(sCrack, 1, sTarget);
const nDelay = ns.getWeakenTime(sTarget);
if (nWeakenThreads > 0 && nSecurity > nMinSecurity) {
ns.tprint("current security is: " + nSecurity);
ns.tprint("minimum security is: " + nMinSecurity);
ns.tprint("threads needed for weaken: " + nWeakenThreads);
ns.tprint(nWeakenThreads + " will reduce Security by " + ns.weakenAnalyze(nWeakenThreads, nCores));
let nScriptRAM = ns.getScriptRam(sWeakenScript, "home");
let nRequiredRAM = nScriptRAM * nWeakenThreads;
ns.tprint(nWeakenThreads + " of " + sWeakenScript + " requires " + nRequiredRAM + " GB of RAM");
ns.tprint("weakening will take " + (nDelay / 1000 / 60) + " minutes");
if (nFreeRam > nRequiredRAM) {
ns.run(sWeakenScript, nWeakenThreads, sTarget);
//await ns.sleep(Math.ceil(nDelay));
nSecurity = ns.getServerSecurityLevel(sTarget);
ns.tprint("Breach complete, security level is now at: " + nSecurity);
}
else {
ns.print("not enough RAM to run all threads at once, splitting into smaller chunks...");
while (nSecurity > nMinSecurity) {
//nWeakenThreads /= (1+(nRequiredRAM / nFreeRam));
nMaxThreads = Math.min( );
ns.print(Math.ceil(nRequiredRAM / nFreeRam));
ns.print(nWeakenThreads);
ns.print(nWeakenThreads * nScriptRAM);
ns.run(sWeakenScript, Math.ceil(nWeakenThreads), sTarget);
await ns.sleep(Math.ceil(nDelay));
nSecurity = ns.getServerSecurityLevel(sTarget);
}
}
}
/*
let nGrowMulti = 1;
ns.print("nGrowMulti = " + nGrowMulti);
let nGrowth = ns.growthAnalyze(sTarget, nGrowMulti, nCores);
ns.print("nGrowth = " + nGrowth);
*/
//ns.growthAnalyzeSecurity();
const startValue = nMoney; // First argument: starting value
const target = nMaxMoney; // Second argument: target value
let result = startValue; // Initialize result with the starting value
let n = 1;
// For loop that continues until the result exceeds or matches the target
for (; result < target; n++) {
result += 1; // Add 1 before multiplication
result *= n; // Multiply by the current step value
}
let nGrowThreadsNeeded = n * ns.growthAnalyze(sTarget, n, 1);
ns.print("nGrowThreadsNeeded = " + nGrowThreadsNeeded);
while (nMoney < nMaxMoney) {
let nFreeRam = ns.getServerMaxRam("home") - ns.getServerUsedRam("home");
let nGrowPID = ns.run(sGrowScript, Math.min([Math.ceil(nGrowThreadsNeeded)], [Math.ceil(nFreeRam / ns.getScriptRam(sGrowScript, "home"))]), sTarget);
await ns.nextPortWrite(nGrowPID);
await ns.sleep(1000);
nMoney = ns.getServerMoneyAvailable(sTarget);
}
await ns.sleep(Math.ceil(nDelay));
//run batch
const nBatchPID = ns.run(sBatch, 1, sTarget);
ns.tail(nBatchPID, "home", sBatch, 1, sTarget);
ns.resizeTail(815, 395, nBatchPID);
ns.moveTail(1925, 0, nBatchPID);
}
-166
View File
@@ -1,166 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
//Arguments
const sTarget = ns.args[0]; // target server
ns.tail("RMcontroller.js", "home", sTarget);
//Settings
const oHome = ns.getServer("home");
const nCores = oHome.cpuCores;
const sScript = ns.getScriptName();
const sWeaken = "RMweaken.js";
const sGrow = "RMgrow.js";
const sHack = "RMhack.js";
const nScriptRAM = ns.getScriptRam(sScript, "home");
const nWeakenRAM = ns.getScriptRam(sWeaken, "home");
const nGrowRAM = ns.getScriptRam(sGrow, "home");
const nHackRAM = ns.getScriptRam(sHack, "home");
const nHomeUsedRAM = ns.getServerUsedRam("home");
const nHomeMaxRAM = ns.getServerMaxRam("home");
let nHomeFreeRAM = nHomeMaxRAM - nHomeUsedRAM;
const nDelays = [0, 100, 200, 300];
//abort script if sTarget is undefined
if (sTarget === undefined) {
ns.tprint("1st arg sTarget is undefined");
return false;
}
//target server info
const nMinSecurity = ns.getServerMinSecurityLevel(sTarget);
const nMaxMoney = ns.getServerMaxMoney(sTarget);
let nWeakenTime1 = ns.getWeakenTime(sTarget);
let nWeakenTime2 = nWeakenTime1 + nDelays[3];
let nGrowTime = nWeakenTime1 * 0.8;
let nHackTime = nWeakenTime1 / 4;
//let nHackSecurityGain = ns.hackAnalyzeSecurity(1, sTarget);
//let nHackSecurityGain = 0.002;
//let nHackThreadsEstimate = Math.max(Math.floor(1 / nHackSecurityGain),1);
//let nHackThreadsEstimate = 10;
//ns.tprint("nHackSecurityGain = " + nHackSecurityGain);
//ns.tprint("nHackThreadsEstimate = " + nHackThreadsEstimate);
const nHackTotalRAM = nHackRAM * 25;
//let nGrowSecurityGain = ns.growthAnalyzeSecurity(1, sTarget, nCores);
//let nGrowSecurityGain = 0.004;
//let nGrowThreadsEstimate = Math.max(Math.floor(1 / nGrowSecurityGain),1);
//ns.tprint("nGrowSecurityGain = " + nGrowSecurityGain);
//ns.tprint("nGrowThreadsEstimate = " + nGrowThreadsEstimate);
const nGrowTotalRAM = nGrowRAM * 12.5;
//let nWeakenSecurity = ns.weakenAnalyze(1, nCores);
//let nWeakenSecurity = 0.05;
//let nWeakenThreadsEstimate = Math.max(Math.ceil(1 / nWeakenSecurity),1);
//ns.tprint("nWeakenSecurity = " + nWeakenSecurity);
//ns.tprint("nWeakenThreadsEstimate = " + nWeakenThreadsEstimate);
const nWeakenTotalRAM = nWeakenRAM * 1;
const nTotalRAM = nHackTotalRAM + nGrowTotalRAM + (nWeakenTotalRAM * 2)
const nTotalBatches = Math.floor((nHomeFreeRAM - nScriptRAM) / nTotalRAM);
let nHackThreadsEstimate = nTotalBatches * 25;
let nWeakenThreadsEstimate1 = nTotalBatches * 1;
let nGrowThreadsEstimate = nTotalBatches * 12.5;
let nWeakenThreadsEstimate2 = nTotalBatches * 1;
ns.tprint("RAM per Cycle = " + nTotalRAM);
ns.tprint("how many batches can i run at the same time? = " + nTotalBatches);
//await ns.grow(server, { additionalMsec: nMsecDelay });
let nGrowDelay = nWeakenTime1 - nGrowTime;
let nHackDelay = nWeakenTime1 - nHackTime;
const nCycleDuration = nWeakenTime2 + nDelays[3];
ns.tprint("nCycleDuration = " + nCycleDuration);
const nBatchFrequency = Math.ceil(nCycleDuration / nTotalBatches);
ns.tprint("nBatchFrequency = " + nBatchFrequency);
while (true) {
//server stats
let nCurrentSecurity = ns.getServerSecurityLevel(sTarget);
let nCurrentMoney = ns.getServerMoneyAvailable(sTarget);
//timestamp
let currentDate = new Date();
let nOffset;
ns.print("Cash: " + (Math.floor(nCurrentMoney * 1000) / 1000) + " / " + nMaxMoney);
ns.print("Security: " + (Math.floor(nCurrentSecurity * 1000) / 1000) + " / " + nMinSecurity);
//Calculate estimate time of completion
nOffset = ns.getWeakenTime(sTarget);
let nSafeTime = nOffset + nDelays[3] + 1000;
let nWeakTime = new Date(currentDate.getTime() + nSafeTime);
let sWeakTime = nWeakTime.toLocaleTimeString('sw-SV'); //swedish time
//Print estimated time of completion
ns.print("Weakening " + sTarget + " Estimated complete at " + sWeakTime);
//hack
const nHackPID = ns.exec(sHack, "home", nHackThreadsEstimate, sTarget, false, nHackDelay + nDelays[0]);
//ns.tail(nHackPID, "home", "home", nHackThreadsEstimate, sTarget, 0, nHackDelay + nDelays[0]);
//weaken 1
const nWeakenPID1 = ns.exec(sWeaken, "home", nWeakenThreadsEstimate1, sTarget, false, nDelays[1]);
//ns.tail(nWeakenPID, "home", "home", nWeakenThreadsEstimate, sTarget, 0, nDelays[1]);
//grow
const nGrowPID = ns.exec(sGrow, "home", nGrowThreadsEstimate, sTarget, false, nGrowDelay + nDelays[2]);
//ns.tail(nGrowPID, "home", "home", nGrowThreadsEstimate, sTarget, 0, nGrowDelay + nDelays[2]);
//weaken 2
const nWeakenPID2 = ns.exec(sWeaken, "home", nWeakenThreadsEstimate2, sTarget, false, nDelays[3]);
//ns.tail(nWeakenPID2, "home", "home", nWeakenThreadsEstimate, sTarget, 0, nDelays[3]);
//await ns.sleep(nSafeTime);
/*
await ns.nextPortWrite(nHackPID);
await ns.nextPortWrite(nWeakenPID1);
await ns.nextPortWrite(nGrowPID);
await ns.nextPortWrite(nWeakenPID2);
ns.print("nHackPeek = " + nHackPeek);
ns.print("nWeaken1Peek = " + nWeaken1Peek);
ns.print("nGrowPeek = " + nGrowPeek);
ns.print("nWeaken2Peek = " + nWeaken2Peek);
*/
let nHackPeek = ns.peek(nHackPID);
let nWeaken1Peek = ns.peek(nWeakenPID1);
let nGrowPeek = ns.peek(nGrowPID);
let nWeaken2Peek = ns.peek(nWeakenPID2);
if (nHackPeek === true || nWeaken1Peek === true || nGrowPeek === true || nWeaken2Peek === true) {
ns.print("some of the ports are already written to...");
ns.print("nHackPeek = " + nHackPeek);
ns.print("nWeaken1Peek = " + nWeaken1Peek);
ns.print("nGrowPeek = " + nGrowPeek);
ns.print("nWeaken2Peek = " + nWeaken2Peek);
}
await Promise.all([
ns.nextPortWrite(nHackPID),
ns.nextPortWrite(nWeakenPID1),
ns.nextPortWrite(nGrowPID),
ns.nextPortWrite(nWeakenPID2)
])
ns.print("hack: " + nHackPID + " completed at " + ns.readPort(nHackPID));
ns.print("weaken1: " + nWeakenPID1 + " completed at " + ns.readPort(nWeakenPID1));
ns.print("grow: " + nGrowPID + " completed at " + ns.readPort(nGrowPID));
ns.print("weaken2: " + nWeakenPID2 + " completed at " + ns.readPort(nWeakenPID2));
await ns.sleep(100);
}
}
-161
View File
@@ -1,161 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
ns.tprint(ns.codingcontract.getContractTypes())
let testcontract = ns.codingcontract.createDummyContract("Total Ways to Sum")
let contractType = ns.codingcontract.getContractType(testcontract);
ns.tprint(ns.codingcontract.getDescription(testcontract))
let n = ns.codingcontract.getData(testcontract);
ns.tprint("Data: " + n);
let answer = "";
if (contractType === "Find Largest Prime Factor") {
answer = largestPrimeFactor(n);
}
if (contractType === "Subarray with Maximum Sum") {
answer = SubarrayWithMaximumSum(ns, n)
}
if (contractType === "Total Ways to Sum") {
answer = TotalWaysToSum(ns, n)
}
ns.tprint(answer);
ns.tprint(ns.codingcontract.attempt(answer, testcontract));
}
/*
5:
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
6:
5 1
4 2
4 1 1
3 3
3 2 1
3 1 1 1
2 2 2
2 2 1 1
2 1 1 1 1
1 1 1 1 1 1
# Start with one position m filling it with the integers between 1 and target
# For each m, fill the next position n with integers between 1 and m
# Repeat as long as the sum is smaller than target.
# append all iterations to the Array and count
*/
function TotalWaysToSum(ns, target) {
let sumArray = [];
let inputArray = [];
let unfinishedArray = [];
let rollingSum = 0;
for (let i = 1; i < target; i++) {
inputArray.push([i]);
}
let z = 1
while (inputArray.length > 0) {
z++
inputArray.forEach((element) => {
rollingSum = element.reduce((a, b) => a + b, 0);
if (rollingSum === target) {
sumArray.push(element)
} else {
for (let k = 1; k <= element[element.length-1] && k <= target - rollingSum; k++) {
unfinishedArray.push(element.concat([k]))
}
}
}
)
inputArray = unfinishedArray;
}
ns.tprint("Target: " +target)
ns.tprint("Length: " + sumArray.length)
return sumArray.length
}
function SubarrayWithMaximumSum(ns, givenArray) {
let arrayLength = givenArray.length;
let maxSum = -10000;
let runningSum = 0;
for (let i = 1; i <= arrayLength; i++) {
for (let j = 0; j <= arrayLength - i; j++) {
runningSum = eval(givenArray.slice(j, i + j).join('+'));
//ns.tprint("i: "+i+ " j: "+ j + " Array: "+givenArray.slice(j,i+j)+ " eval: "+ givenArray.slice(j,i+j).join('+')+"runningSum: "+runningSum);
if (maxSum < runningSum) { maxSum = runningSum };
}
}
return maxSum
}
function FindLargestPrimeFactor(number) {
let factor = 2;
while (factor * factor <= number) {
if (number % factor === 0) {
number /= factor;
} else {
factor++
}
}
return number;
}
/*
function FindLargestPrimeFactor(n) {
let x = Math.ceil(Math.random()*10);
let y = x;
let d = 1;
while (d === 1) {
x = g(x, n);
y = g(g(y, n), n)
d = gcd(n, Math.abs(x - y))
//ns.tprint("x:" + x + " y: " + y + " d: " + d)
}
if (d === n) {
return ("failure")
}
else {
return (d)
}
}
function g(x, n) {
return (x * x) % n
}
function gcd(a,b) {
a = Math.abs(a);
b = Math.abs(b);
if (b > a) {var temp = a; a = b; b = temp;}
while (true) {
if (b == 0) return a;
a %= b;
if (a == 0) return b;
b %= a;
}
}
function gcd(a, b) {
if (!b) {
return a;
}
return gcd(b, a % b);
}
*/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-1
View File
@@ -1 +0,0 @@
{"home":{"n00dles":{"nectar-net":{"neo-net":{"computek":{"summit-uni":{}}}}},"foodnstuff":{"zer0":{"silver-helix":{"the-hub":{"rothman-uni":{"millenium-fitness":{}}},"netlink":{"zb-institute":{"alpha-ent":{"galactic-cyber":{}}}},"johnson-ortho":{},"crush-fitness":{}}},"max-hardware":{"phantasy":{},"omega-net":{"avmnite-02h":{"syscore":{"rho-construction":{},"aevum-police":{"global-pharm":{"omnia":{"defcomm":{},"solaris":{}}}}},"catalyst":{},"I.I.I.I":{"lexo-corp":{"aerocorp":{"deltaone":{"icarus":{"infocomm":{"run4theh111z":{"helios":{}}},"taiyang-digital":{"titan-labs":{"vitalife":{"omnitek":{"nwo":{},"powerhouse-fitness":{"fulcrumassets":{},"The-Cave":{}}}}}},"zb-def":{"microdyne":{}}},"zeus-med":{}},"unitalife":{"univ-energy":{"nova-med":{"applied-energetics":{"fulcrumtech":{"4sigma":{},".":{"b-and-a":{"ecorp":{}}}},"stormtech":{"kuai-gong":{"blade":{},"clarkinc":{"megacorp":{}}}}}}}}},"snap-fitness":{}}}}}}},"sigma-cosmetics":{"CSEC":{}},"joesguns":{},"hong-fang-tea":{},"harakiri-sushi":{},"iron-gym":{},"darkweb":{},"pserv-01":{},"pserv-02":{},"pserv-03":{},"pserv-04":{},"pserv-05":{},"pserv-06":{},"pserv-07":{},"pserv-08":{},"pserv-09":{},"pserv-10":{},"pserv-11":{},"pserv-12":{},"pserv-13":{},"pserv-14":{},"pserv-15":{},"pserv-16":{},"pserv-17":{},"pserv-18":{},"pserv-19":{},"pserv-20":{},"pserv-21":{},"pserv-22":{},"pserv-23":{},"pserv-24":{},"pserv-25":{}}}
File renamed without changes.
File renamed without changes.
-1
View File
@@ -1 +0,0 @@
{"serverName":"the-hub","maxRam":32,"maxMoney":483168296.25,"minSec":13,"minPorts":2,"minHackLvl":318,"rootAccess":true,"factorMoneyPerTime":0.1841702873569451,"openPorts":0,"serverFiles":["factionboost.js"],"hackingChance":0.40919188586028893}
-21
View File
@@ -1,21 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
const sTarget = ns.args[0]; // target server which has the contract
const sContract = ns.args[1]; // target contract file
//ns.tprint(ns.codingcontract.getContractTypes());
//ns.codingcontract.createDummyContract();
const sContractType = ns.codingcontract.getContractType(sContract, sTarget);
const sContractData = ns.codingcontract.getData(sContract, sTarget);
const sContractDescription = ns.codingcontract.getDescription(sContract, sTarget);
const sContractTries = ns.codingcontract.getNumTriesRemaining(sContract, sTarget);
ns.tprint("sContractType = " + sContractType);
ns.tprint("sContractData = " + sContractData);
ns.tprint("sContractDescription = " + sContractDescription);
ns.tprint("sContractTries = " + sContractTries);
JSON.stringify(sContractType,sContractType, true);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-46
View File
@@ -1,46 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
/*
ns.renamePurchasedServer("pserv-23", "pserv-24");
ns.renamePurchasedServer("pserv-22", "pserv-23");
ns.renamePurchasedServer("pserv-21", "pserv-22");
ns.renamePurchasedServer("pserv-20", "pserv-21");
ns.renamePurchasedServer("pserv-19", "pserv-20");
ns.renamePurchasedServer("pserv-18", "pserv-19");
ns.renamePurchasedServer("pserv-17", "pserv-18");
ns.renamePurchasedServer("pserv-16", "pserv-17");
ns.renamePurchasedServer("pserv-15", "pserv-16");
ns.renamePurchasedServer("pserv-14", "pserv-15");
ns.renamePurchasedServer("pserv-13", "pserv-14");
ns.renamePurchasedServer("pserv-12", "pserv-13");
ns.renamePurchasedServer("pserv-11", "pserv-12");
ns.renamePurchasedServer("pserv-10", "pserv-11");
ns.renamePurchasedServer("pserv-9", "pserv-10");
ns.renamePurchasedServer("pserv-8", "pserv-9");
ns.renamePurchasedServer("pserv-7", "pserv-8");
ns.renamePurchasedServer("pserv-6", "pserv-7");
ns.renamePurchasedServer("pserv-5", "pserv-6");
ns.renamePurchasedServer("pserv-4", "pserv-5");
ns.renamePurchasedServer("pserv-3", "pserv-4");
ns.renamePurchasedServer("pserv-2", "pserv-3");
ns.renamePurchasedServer("pserv-1-0", "pserv-2");
*/
ns.renamePurchasedServer("pserv-1", "pserv-01");
ns.renamePurchasedServer("pserv-2", "pserv-02");
ns.renamePurchasedServer("pserv-3", "pserv-03");
ns.renamePurchasedServer("pserv-4", "pserv-04");
ns.renamePurchasedServer("pserv-5", "pserv-05");
ns.renamePurchasedServer("pserv-6", "pserv-06");
ns.renamePurchasedServer("pserv-7", "pserv-07");
ns.renamePurchasedServer("pserv-8", "pserv-08");
ns.renamePurchasedServer("pserv-9", "pserv-09");
//const nServers = ns.getPurchasedServers();
//for (let i = 0; i < nServers; i++)
//let hostname = ns.purchaseServer("pserv-" + i, ram);
// ns.renamePurchasedServer(([i]), "pserv-" + i);
}
-41
View File
@@ -1,41 +0,0 @@
/** @param {NS} ns **/
export async function main(ns) {
function myMoney() {
return ns.getServerMoneyAvailable("home");
}
//this script is designed to manage the hacknet nodes
//to prevent excess spending i've limited it from spending
//more than half the players money
var nodes = 0;
var ref = 0;
ns.disableLog("ALL");
while (true) {
//sleep for second to prevent the loop from crashing the game
await ns.sleep(50);
//buy a node if we have more than twice the money needed
if (ns.hacknet.getPurchaseNodeCost() < myMoney() / 10) {
ref = ns.hacknet.purchaseNode();
ns.print("bought node hn-" + ref);
}
nodes = ns.hacknet.numNodes()
for (var i = 0; i < nodes; i++) {
//check if nodes level is a multiple of 10
var mod = ns.hacknet.getNodeStats(i).level % 10;
//buy level node to the nearest multiple of 10 if we have double the money needed
if (ns.hacknet.getLevelUpgradeCost(i, 10 - mod) < myMoney() / 10) {
ns.hacknet.upgradeLevel(i, 10 - mod);
ns.print("node hn-" + i + " leveled up");
}
//same for ram
if (ns.hacknet.getRamUpgradeCost(i) < myMoney() / 10) {
ns.hacknet.upgradeRam(i);
ns.print("node hn-" + i + " ram upgraded");
}
//and cores
if (ns.hacknet.getCoreUpgradeCost(i) < myMoney() / 10) {
ns.hacknet.upgradeCore(i);
ns.print("node hn-" + i + " core upgraded");
}
}
}
}
File renamed without changes.
-8
View File
@@ -1,8 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let serverList = JSON.parse(ns.read("serverList.txt"));
for (const [name, entry] of Object.entries(serverList)) {
ns.killall(name, true)
}
}
-23
View File
@@ -1,23 +0,0 @@
Karma loss per second by crime:
0.0500 Shoplifting
0.0083 Robbery
0.0625 Mugging
0.0167 Larceny
0.0500 Drug dealing
0.0003 Bond forgery
0.0250 Trafficking arms
1.0000 Homicide
0.0625 Grand theft auto
0.0500 Kidnapping
0.0333 Assassination
0.0250 The ultimate heist
cool functions
ns.singularity.getOwnedSourceFiles();
ns.asleep();
ns.atExit();
ns.spawn();
ns.toast();
-39
View File
@@ -1,39 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
const sMessage = ns.args[0]; //
const nCurrentProgress = ns.args[1]; //
const stest = ns.args[2];
const nPID = ns.pid;
const sFileName = "progress_" + nPID;
//ns.print("nPID = "+nPID);
const sProgress = [
"░░░░░░░░░░",
"█░░░░░░░░░",
"██░░░░░░░░",
"███░░░░░░░",
"████░░░░░░",
"█████░░░░░",
"██████░░░░",
"███████░░░",
"████████░░",
"█████████░",
"██████████"
];
ns.tail(nPID);
while (nCurrentProgress < 100) {
ns.read(""filename"");
ns.print(sProgress[Math.floor(nCurrentProgress / (sProgress.length - 1))]);
ns.write("filename", "text", "w");
}
if (nCurrentProgress >= 100)
ns.rm(sFileName);
return nPID;
}
-52
View File
@@ -1,52 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let aPservers = ns.getPurchasedServers();
ns.tprint("aPservers = " + aPservers);
let nPservers = aPservers.length;
ns.tprint("nPservers = " + nPservers);
let nCurrentRAM;
let nLowestRAM = 2 ** 21;
let nHighestRAM = 0;
let sLowestPserv;
let sHighestPserv;
let nTotalPServRAM = 0;
const oPservers = new Object();
/*
const oPservers = {
pserv-01 : { name: "pserv-01" , ram: nRAM}
};
*/
for (let i = 0; i < nPservers; i++) {
nCurrentRAM = ns.getServerMaxRam(aPservers[i]);
//ns.tprint("nTotalPServRAM = " + nTotalPServRAM + " + " + "nCurrentRAM = " + nCurrentRAM);
nTotalPServRAM += nCurrentRAM;
if (nCurrentRAM < nLowestRAM) {
nLowestRAM = nCurrentRAM
sLowestPserv = aPservers[i];
}
if (nCurrentRAM > nHighestRAM) {
nHighestRAM = nCurrentRAM
sHighestPserv = aPservers[i];
}
}
ns.tprint("sLowestPserv = " + sLowestPserv);
ns.tprint("nLowestRAM = " + nLowestRAM);
ns.tprint("sHighestPserv = " + sHighestPserv);
ns.tprint("nHighestRAM = " + nHighestRAM);
ns.tprint("nTotalPServRAM = " + nTotalPServRAM);
}
File renamed without changes.
-24
View File
@@ -1,24 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let aFactions = ns.getPlayer().factions;
ns.tprint("aFactions = " + aFactions);
let aAugmentations;
let sStats;
for (let f = 0; f < aFactions.length; f++) {
//ns.tprint("f = " + f);
//sFaction = ns.singularity.faction
aAugmentations = ns.singularity.getAugmentationsFromFaction(aFactions[f]);
ns.tprint("aAugmentations = " + aAugmentations);
ns.tprint("----------------------------------------------------------------------------------------------------------------------------------------------------------");
for (let a = 0; a < aFactions.length; a++) {
sStats = JSON.stringify(ns.singularity.getAugmentationStats(aAugmentations[a]));
ns.tprint(aAugmentations[f] + "sStats = " + sStats);
ns.tprint("----------------------------------------------------------------------------------------------------------------------------------------------------------");
}
}
}
-1
View File
@@ -1 +0,0 @@
{"home":{"serverName":"home","maxRam":32768,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["AutoLink.exe","BruteSSH.exe","ContractSolverRamses.js","DeepscanV1.exe","DeepscanV2.exe","EveryServerRun.js","FTPCrack.exe","HTTPWorm.exe","HackingLog.txt","Minimum_Path_Sum_in_a_Triangle.js","NUKE.exe","RMbreach.js","RMcontroller.js","RMgrow.js","RMhack.js","RMweaken.js","SQLInject.exe","ServerRouteList.txt","algorithm.js","ascii/detective.txt","ascii/detective2.txt","ascii/detective3.txt","ascii/hacker.txt","ascii/judge.txt","ascii/noir.txt","ascii/sonic.js","autoexec.js","b1t_flum3.exe","backdoor.js","backup/batch2.js","backup/bitnodeStart.js","backup/growrepeater.js","backup/maxGrow.js","batch.js","bestTarget.txt","breach.js","contract.js","csec-test.msg","factionboost.js","fixpserv.js","fl1ght.exe","gang/argFunctions.js","gang/auto-gang.js","gang/auto-gang2.js","gang/gangManager.js","hackers-starting-handbook.lit","hacknetmanager.js","j0.msg","j1.msg","j2.msg","j3.msg","killallall.js","myLibrary.js","nitesec-test.msg","notes.txt","progress.js","pserv.js","relaySMTP.exe","scanFactionAugments.js","serverList.txt","serverlister.js","settings.txt","sharePserv.js","singularity/RMroutelist.js","singularity/manualalgo.js","test.js","testhackgrow.js","upgrade.js"],"hackingChance":1},"pserv-25":{"serverName":"pserv-25","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-24":{"serverName":"pserv-24","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-23":{"serverName":"pserv-23","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-22":{"serverName":"pserv-22","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-21":{"serverName":"pserv-21","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-20":{"serverName":"pserv-20","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-19":{"serverName":"pserv-19","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-18":{"serverName":"pserv-18","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-17":{"serverName":"pserv-17","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-16":{"serverName":"pserv-16","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-15":{"serverName":"pserv-15","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-14":{"serverName":"pserv-14","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-13":{"serverName":"pserv-13","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-12":{"serverName":"pserv-12","maxRam":1024,"maxMoney":0,"minSec":1,"minPorts":5,"minHackLvl":1,"rootAccess":true,"factorMoneyPerTime":0,"openPorts":4,"serverFiles":["RMgrow.js","RMhack.js","RMweaken.js","batch.js","myLibrary.js"],"hackingChance":1},"pserv-11":{"serverName":"pserv-11","maxRam":1024Line truncated
-52
View File
@@ -1,52 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
ns.tail();
let serverRoutes = await scanRecursiveWrapper(ns);
let currentHackingLevel = ns.getHackingLevel();
let currentArray = [];
let currentHop = "";
for (const [name, entry] of Object.entries(serverRoutes)) {
if (ns.getServerRequiredHackingLevel(name) < currentHackingLevel && ns.hasRootAccess(name) === true) {
currentArray = entry;
if (entry.length > 0) {
while (currentArray.length > 0) {
currentHop = currentArray.shift();
if (ns.singularity.connect(currentHop) === false) ns.tprint("Error when trying to connect to: " + currentHop);
}
ns.tprint("Trying to backdoor " + currentHop)
await ns.singularity.installBackdoor(currentHop);
ns.tprint("Success on " + currentHop)
ns.singularity.connect("home");
}
}
}
}
/** @param {NS} ns */
async function scanRecursiveWrapper(ns) {
let startTime = Date.now();
ns.rm("ServerRouteList.txt");
await scanRecursive(ns, [], "home", startTime);
let result = JSON.parse("[" + ns.read("ServerRouteList.txt") + "{}]").reduce((acc, obj) => ({ ...acc, ...obj }), {});
ns.write("ServerRouteList.txt", JSON.stringify(result, "w"));
return result;
}
/** @param {NS} ns */
async function scanRecursive(ns, parents, currentServer, startTime) {
let currentTime = Date.now();
if (currentTime > startTime + 5) {
return
} else {
let currentChildren = ns.scan(currentServer);
let parentsSet = new Set(parents);
let cleanedChildren = currentChildren.filter(element => !parentsSet.has(element));
let tempServername = String(currentServer);
ns.write("ServerRouteList.txt", JSON.stringify({ [tempServername]: parents }) + ",", "a");
parents.push(currentServer);
for (let child in cleanedChildren) {
await scanRecursive(ns, parents, cleanedChildren[child], startTime)
}
}
}
-71
View File
@@ -1,71 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
const sNode = ns.args[0]; // target server
//logs
ns.disableLog("getServerSecurityLevel");
ns.disableLog("getServerMoneyAvailable");
//server info
const nMinSec = ns.getServerMinSecurityLevel(sNode);
const nMaxCash = ns.getServerMaxMoney(sNode);
while (true) {
//timestamp
let currentDate = new Date();
let ntimeStamp = currentDate.toLocaleTimeString('sw-SV') + " -";
const nCurrSec = ns.getServerSecurityLevel(sNode);
const nCurrCash = ns.getServerMoneyAvailable(sNode);
ns.print(ntimeStamp + "---------------------------------------------------------------");
ns.print("Cash: " + (Math.floor(nCurrCash * 1000) / 1000) + " / " + nMaxCash);
ns.print("Security: " + (Math.floor(nCurrSec * 1000) / 1000) + " / " + nMinSec);
if (nCurrSec > (nMinSec + 1)) {
//Calculate estimate time of completion
let nOffset = ns.getWeakenTime(sNode);
let nWeakTime = new Date(currentDate.getTime() + nOffset);
let sWeakTime = nWeakTime.toLocaleTimeString('sw-SV');
//Print estimated time of completion
ns.print("Weakening " + sNode + " Estimated complete at " + sWeakTime);
//run weaken
await ns.weaken(sNode);
ns.print("-------------------------------------------------------------------------");
}
else if (nCurrCash < (nMaxCash * 0.9)) {
//Calculate estimate time of completion
let nOffset = ns.getGrowTime(sNode);
let nGrowTime = new Date(currentDate.getTime() + nOffset);
let sGrowTime = nGrowTime.toLocaleTimeString('sw-SV');
//Print estimated time of completion
ns.print("Growing " + sNode + " Estimated complete at " + sGrowTime);
//run grow
await ns.grow(sNode);
ns.print("-------------------------------------------------------------------------");
}
else {
//Calculate estimate time of completion
let nOffset = ns.getHackTime(sNode);
let nHackTime = new Date(currentDate.getTime() + nOffset);
let sHackTime = nHackTime.toLocaleTimeString('sw-SV');
//Print estimated time of completion
ns.print("Hacking " + sNode + " Estimated complete at " + sHackTime);
//run hack
//await ns.hack(sNode);
await ns.singularity.manualHack();
ns.print("-------------------------------------------------------------------------");
}
}
}
-16
View File
@@ -1,16 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let oSettings = JSON.parse(ns.read("settings.txt"));
// let variable = someJSON.missingKey || ""
//let tempVar = oSettings.settings.missingKey || "";
//ns.tprint(tempVar)
ns.tprint(oSettings);
ns.tprint(JSON.stringify(oSettings));
ns.tprint(oSettings.setting.autoUpgrades);
//let tempVar = oSettings.settings.missingKey || "";
//ns.tprint(tempVar)
}
-41
View File
@@ -1,41 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
ns.tail();
const sTarget = ns.args[0]; // run on this target instead of best
const nHackThreads = ns.args[1] ? ns.args[1] : 1;
ns.disableLog("sleep");
ns.print("nHackThreads = " + nHackThreads);
//ns.tprint(ns.getHackingMultipliers());
let nHackAmountPercent = ns.hackAnalyze(sTarget) * nHackThreads;
let nTargetMoney = ns.getServerMoneyAvailable(sTarget);
let nHackAmount = nTargetMoney * nHackAmountPercent;
ns.print("nHackAmountPercent = " + nHackAmountPercent);
ns.print("nTargetMoney = " + nTargetMoney);
ns.print("nHackAmount = " + nHackAmount);
let nGrowthThreads = ns.growthAnalyze(sTarget, 1 + nHackAmountPercent, 1);
ns.print("nGrowthThreads = " + nGrowthThreads);
let nGrowThreadsINT = Math.ceil(nGrowthThreads);
ns.print("Hack() : Grow() Ratio = " + nHackThreads + ":" + nGrowThreadsINT);
//test hack() and grow()
/*
let nHackPID = ns.exec("RMhack.js", "home", nHackThreads, sTarget);
ns.tail(nHackPID);
let nGrowPID = ns.exec("RMgrow.js", "home", nGrowThreadsINT, sTarget);
ns.tail(nGrowPID);
ns.print("Wait for Hack and Grow...");
while (ns.isRunning(nHackPID) || ns.isRunning(nGrowPID)) {
await ns.sleep(1000);
}
ns.print("Wait complete");
nTargetMoney = ns.getServerMoneyAvailable(sTarget);
ns.print("nTargetMoney = " + nTargetMoney);
*/
}