MCPcopy Create free account
hub / github.com/Geeoon/asploit / __remove

Method __remove

src/BotnetCommandProcessor.py:123–141  ·  view source on GitHub ↗
(self, options: str)

Source from the content-addressed store, hash-verified

121 @throw CommandException if there are no arguments.
122 """
123 def __remove(self, options: str):
124 if len(options) == 0:
125 raise CommandException("Nothing to be removed.")
126 names = options.split(" ")
127
128 if "*" in names:
129 choice = input("Remove all targets? [y/N] ")
130 if not choice.lower().startswith('y'):
131 return
132 self.targets = []
133 return
134
135 for name in names:
136 target = next((t for t in self.targets if t["name"] == name), None)
137 if target:
138 print(f"Removing '{name}'.")
139 self.targets.remove(target)
140 else:
141 print(f"'{name}' not found in targets.")
142
143 """
144 @brief Load targets from a file.

Callers

nothing calls this directly

Calls 1

CommandExceptionClass · 0.85

Tested by

no test coverage detected