Skip to content

Commit 7f9978b

Browse files
committed
Updated Commands.cs
1 parent b8f1401 commit 7f9978b

File tree

3 files changed

+164
-13
lines changed

3 files changed

+164
-13
lines changed

TemplateMod/Commands.cs

Lines changed: 161 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Text;
77
using XNA = Microsoft.Xna.Framework;
88

9-
namespace TemplateMod
9+
namespace OpenAllPortsMod
1010
{
1111
static class Commands
1212
{
@@ -274,15 +274,17 @@ public static bool ChangeUserDetails(Hacknet.OS os, string[] args)
274274
string oldUser = args[1];
275275
string newUser = args[2];
276276
string newPass = args[3];
277-
if (args.Length < 0)
277+
if (args.Length < 3)
278278
{
279-
os.write("Usage: changeAdminPassword (NewPassword)");
279+
os.write("Usage: changeUserDetails (NewPassword)");
280280
return false;
281281
}
282282
for (int index = 0; index < computer.users.Count; ++index)
283283
{
284284
if (computer.users[index].name.ToLower().Equals(oldUser))
285285
computer.users[index] = new UserDetail(newUser, newPass, (byte)0);
286+
UserDetail user = computer.users[index];
287+
user.known = true;
286288
}
287289
return false;
288290
}
@@ -315,8 +317,8 @@ public static bool ExecuteHack(Hacknet.OS os, string[] args)
315317
}
316318
public static bool DeleteWhitelistDLL(Hacknet.OS os, string[] args)
317319
{
318-
string ip = args[1];
319-
320+
Computer computer = Programs.getComputer(os, args[1]);
321+
computer.deleteFile(os.thisComputer.ip, "authenticator.dll", );
320322
return false;
321323
}
322324
public static bool ChangeMusic(Hacknet.OS os, string[] args)
@@ -461,21 +463,168 @@ public static bool RemoveProxy(Hacknet.OS os, string[] args)
461463
Computer computer = os.connectedComp;
462464
computer.
463465
return false;
464-
}
466+
} */
465467
public static bool AddComputer(Hacknet.OS os, string[] args)
466468
{
467-
468-
469-
470-
471-
Computer computer = new Computer()
469+
if (args.Length < 5)
470+
{
471+
os.write("Usage: addComputer (Name) (IP) (SecurityLevel) (CompType) (ID)");
472+
return false;
473+
}
474+
try
475+
{
476+
int IsNumber = Convert.ToInt32(args[3]);
477+
byte IsByte = Convert.ToByte(args[4]);
478+
}
479+
catch
480+
{
481+
os.write("Usage: addComputer (Name) (IP) (SecurityLevel) (CompType) (ID)");
482+
return false;
483+
}
484+
string Name = args[1];
485+
string IP = args[2];
486+
int SecurityLevel = Convert.ToInt32(args[3]);
487+
byte CompType = Convert.ToByte(args[4]);
488+
string ID = args[5];
489+
Computer computer = new Computer(Name, IP, os.netMap.getRandomPosition(), SecurityLevel, CompType, os);
490+
computer.idName = ID;
472491
return false;
473-
} */
492+
}
474493
public static bool PlaySFX(Hacknet.OS os, string[] args)
475494
{
476495
SoundEffect sound = os.content.Load<SoundEffect>(args[1]);
477496
sound.Play();
478497
return false;
479498
}
499+
public static bool GetMoreRAM(Hacknet.OS os, string[] args)
500+
{
501+
os.totalRam = 2048;
502+
return false;
503+
}
504+
public static bool SetFaction(Hacknet.OS os, string[] args)
505+
{
506+
string factionInput = args[1];
507+
if (factionInput == "entropy")
508+
{
509+
os.allFactions.setCurrentFaction("entropy", os);
510+
}
511+
else if (factionInput == "csec")
512+
{
513+
os.allFactions.setCurrentFaction("hub", os);
514+
}
515+
else if (factionInput == "bibliotheque")
516+
{
517+
os.allFactions.setCurrentFaction("Bibliotheque", os);
518+
}
519+
else
520+
{
521+
os.write("Usage: setFaction entropy/csec");
522+
}
523+
return false;
524+
}
525+
public static bool TracedBehind250Proxies(Hacknet.OS os, string[] args)
526+
{
527+
os.traceTracker.start(500f);
528+
return false;
529+
}
530+
public static bool OxygencraftStorageFaciltyCache(Hacknet.OS os, string[] args) // Don't tell anyone about this command, keep it a secret
531+
{
532+
Computer computer = new Computer("oxygencraft Storage Facility", "4825.18.385.2956", os.netMap.getRandomPosition(), 2000, 2, os);
533+
computer.idName = "oxyStorageCache";
534+
computer.adminPass = "edhufguHUFHJGHLRWEHU32867837@!^&*$^&#@^&74";
535+
computer.admin.IsSuper = true;
536+
computer.admin.ResetsPassword = true;
537+
computer.addFirewall(25, "ijijUFERHUHUGR2184327567uGgyregyhwuiEHUT43UHI887328", 15);
538+
computer.portsNeededForCrack = 13;
539+
computer.addProxy(3600);
540+
computer.HasTracker = true;
541+
computer.traceTime = 45f;
542+
computer.ports.Add(25);
543+
computer.ports.Add(22);
544+
computer.ports.Add(21);
545+
computer.ports.Add(80);
546+
computer.ports.Add(1433);
547+
computer.ports.Add(104);
548+
computer.ports.Add(3724);
549+
computer.ports.Add(443);
550+
computer.ports.Add(6881);
551+
computer.ports.Add(192);
552+
computer.ports.Add(3659);
553+
computer.ports.Add(9418);
554+
for (int index = 0; index < computer.users.Count; ++index)
555+
{
556+
if (computer.users[index].name.ToLower().Equals("admin")) {
557+
UserDetail user = computer.users[index];
558+
if (os.username == "oxygencraft")
559+
{
560+
user.known = true;
561+
}
562+
}
563+
}
564+
Folder bin = computer.files.root.searchForFolder("bin");
565+
bin.files.Add(new FileEntry(PortExploits.crackExeData[25], Utils.GetNonRepeatingFilename("SMTPoverflow", ".exe", bin)));
566+
bin.files.Add(new FileEntry(PortExploits.crackExeData[22], Utils.GetNonRepeatingFilename("SSHCrack", ".exe", bin)));
567+
bin.files.Add(new FileEntry(PortExploits.crackExeData[21], Utils.GetNonRepeatingFilename("FTPBounce", ".exe", bin)));
568+
bin.files.Add(new FileEntry(PortExploits.crackExeData[211], Utils.GetNonRepeatingFilename("FTPSprint", ".exe", bin)));
569+
bin.files.Add(new FileEntry(PortExploits.crackExeData[80], Utils.GetNonRepeatingFilename("WebServerWorm", ".exe", bin)));
570+
bin.files.Add(new FileEntry(PortExploits.crackExeData[1433], Utils.GetNonRepeatingFilename("SQL_MemCorrupt", ".exe", bin)));
571+
bin.files.Add(new FileEntry(PortExploits.crackExeData[104], Utils.GetNonRepeatingFilename("KBT_PortTest", ".exe", bin)));
572+
bin.files.Add(new FileEntry(PortExploits.crackExeData[3724], Utils.GetNonRepeatingFilename("WoWHack", ".exe", bin)));
573+
bin.files.Add(new FileEntry(PortExploits.crackExeData[443], Utils.GetNonRepeatingFilename("SSLTrojan", ".exe", bin)));
574+
bin.files.Add(new FileEntry(PortExploits.crackExeData[6881], Utils.GetNonRepeatingFilename("TorrentStreamInjector", ".exe", bin)));
575+
bin.files.Add(new FileEntry(PortExploits.crackExeData[192], Utils.GetNonRepeatingFilename("PacificPortcrusher", ".exe", bin)));
576+
bin.files.Add(new FileEntry(PortExploits.crackExeData[3659], Utils.GetNonRepeatingFilename("confloodEOS", ".exe", bin)));
577+
bin.files.Add(new FileEntry(PortExploits.crackExeData[9418], Utils.GetNonRepeatingFilename("GitTunnel", ".exe", bin)));
578+
bin.files.Add(new FileEntry(PortExploits.crackExeData[4], Utils.GetNonRepeatingFilename("SecurityTracer", ".exe", bin)));
579+
bin.files.Add(new FileEntry(PortExploits.crackExeData[9], Utils.GetNonRepeatingFilename("Decypher", ".exe", bin)));
580+
bin.files.Add(new FileEntry(PortExploits.crackExeData[10], Utils.GetNonRepeatingFilename("DECHead", ".exe", bin)));
581+
bin.files.Add(new FileEntry(PortExploits.crackExeData[11], Utils.GetNonRepeatingFilename("Clock", ".exe", bin)));
582+
bin.files.Add(new FileEntry(PortExploits.crackExeData[12], Utils.GetNonRepeatingFilename("TraceKill", ".exe", bin)));
583+
bin.files.Add(new FileEntry(PortExploits.crackExeData[13], Utils.GetNonRepeatingFilename("eosDeviceScan", ".exe", bin)));
584+
bin.files.Add(new FileEntry(PortExploits.crackExeData[14], Utils.GetNonRepeatingFilename("themechanger", ".exe", bin)));
585+
bin.files.Add(new FileEntry(PortExploits.crackExeData[15], Utils.GetNonRepeatingFilename("hacknet", ".exe", bin)));
586+
bin.files.Add(new FileEntry(PortExploits.crackExeData[16], Utils.GetNonRepeatingFilename("HexClock", ".exe", bin)));
587+
bin.files.Add(new FileEntry(PortExploits.crackExeData[17], Utils.GetNonRepeatingFilename("Sequencer", ".exe", bin)));
588+
bin.files.Add(new FileEntry(PortExploits.crackExeData[31], Utils.GetNonRepeatingFilename("KaguyaTrials", ".exe", bin)));
589+
bin.files.Add(new FileEntry(PortExploits.crackExeData[32], Utils.GetNonRepeatingFilename("SignalScramble", ".exe", bin)));
590+
bin.files.Add(new FileEntry(PortExploits.crackExeData[33], Utils.GetNonRepeatingFilename("MemForensics", ".exe", bin)));
591+
bin.files.Add(new FileEntry(PortExploits.crackExeData[34], Utils.GetNonRepeatingFilename("MemDumpGenerator", ".exe", bin)));
592+
bin.files.Add(new FileEntry(PortExploits.crackExeData[35], Utils.GetNonRepeatingFilename("NetMapOrganizer", ".exe", bin)));
593+
bin.files.Add(new FileEntry(PortExploits.crackExeData[36], Utils.GetNonRepeatingFilename("ComShell", ".exe", bin)));
594+
bin.files.Add(new FileEntry(PortExploits.crackExeData[37], Utils.GetNonRepeatingFilename("DNotes", ".exe", bin)));
595+
bin.files.Add(new FileEntry(PortExploits.crackExeData[38], Utils.GetNonRepeatingFilename("ClockV2", ".exe", bin)));
596+
bin.files.Add(new FileEntry(PortExploits.crackExeData[39], Utils.GetNonRepeatingFilename("TuneSwap", ".exe", bin)));
597+
bin.files.Add(new FileEntry(PortExploits.DangerousPacemakerFirmware, Utils.GetNonRepeatingFilename("PacemakerDangerous", ".dll", bin)));
598+
bin.files.Add(new FileEntry(PortExploits.ValidPacemakerFirmware, Utils.GetNonRepeatingFilename("PacemakerWorking", ".exe", bin)));
599+
bin.files.Add(new FileEntry(PortExploits.ValidAircraftOperatingDLL, Utils.GetNonRepeatingFilename("747FlightSystem", ".dll", bin)));
600+
return false;
601+
}
602+
public static bool DisableEmailIcon(Hacknet.OS os, string[] args)
603+
{
604+
os.DisableEmailIcon = true;
605+
return false;
606+
}
607+
public static bool EnableEmailIcon(Hacknet.OS os, string[] args)
608+
{
609+
os.DisableEmailIcon = false;
610+
return false;
611+
}
612+
public static bool NodeRestore(Hacknet.OS os, string[] args)
613+
{
614+
DLC1SessionUpgrader.ReDsicoverAllVisibleNodesInOSCache(os);
615+
return false;
616+
}
617+
public static bool AddRestoreCircle(Hacknet.OS os, string[] args)
618+
{
619+
Computer computer = Programs.getComputer(os, args[1]);
620+
SFX.addCircle(computer.getScreenSpacePosition(), Utils.AddativeWhite * 0.4f, 70f);
621+
return false;
622+
}
623+
/*public static bool WhitelistBypass(Hacknet.OS os, string[] args)
624+
{
625+
Computer computer = Programs.getComputer(os, args[1]);
626+
627+
return false;
628+
} */
480629
}
481630
}

TemplateMod/OpenAllPortsMod.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
using System;
22
using Command = Pathfinder.Command;
33

4-
namespace TemplateMod
4+
5+
namespace OpenAllPortsMod
56
{
67
public class OpenAllPortsMod : Pathfinder.PathfinderMod
78
{
@@ -61,6 +62,7 @@ public override void LoadContent()
6162
Command.Handler.AddCommand("closeAllPorts", Commands.CloseAllPorts, false);
6263
Command.Handler.AddCommand("closePort", Commands.ClosePort, false);
6364
Command.Handler.AddCommand("removeProxy", Commands.RemoveProxy, false);
65+
Command.Handler.AddCommand("playSFX", Commands.PlaySFX, false);
6466
}
6567

6668
}

lib/Pathfinder.dll

1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)