-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove newlines * Add eprint * Small tome fixes --------- Co-authored-by: Hulto <[email protected]>
- Loading branch information
Showing
21 changed files
with
118 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
def cat(path): | ||
|
||
if file.is_file(path): | ||
res = file.read(path) | ||
print(res) | ||
print("\n") | ||
else: | ||
print("Error: Invalid Path ("+path+")\n") | ||
eprint(f"Error: Invalid Path '{path}'") | ||
|
||
return | ||
|
||
cat(input_params['path']) | ||
print("\n") | ||
print("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,5 @@ def main(): | |
input_params['dst'], | ||
input_params['insecure'].lower() == "true" | ||
) | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
def get_env(): | ||
envs = sys.get_env() | ||
for key, value in envs.items(): | ||
print("{}={}\n".format(key, value)) | ||
print(f"{key}={value}") | ||
|
||
return | ||
|
||
get_env() | ||
print("\n") | ||
print("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
def get_net_info(): | ||
print("Interfaces:\n\n") | ||
for interface in sys.get_ip(): | ||
for key, value in interface.items(): | ||
if key == "ips": | ||
for ip in value: | ||
print("ip: {}\n".format(ip)) | ||
else: | ||
print("{}: {}\n".format(key, value)) | ||
print("\n") | ||
print("Hostname: " + sys.hostname()) | ||
def print_table(rows: list[list]): | ||
"""Pretty print a table, auto adjusting width based on the row data""" | ||
def rpad(s: str, n: int, c=" "): | ||
return s + (n-len(s))*c | ||
# count columns | ||
counts = [0]*len(rows[0]) | ||
for r in rows: | ||
for i, f in enumerate(r): | ||
counts[i] = max(len(f), counts[i]) | ||
# Print the columns | ||
for r in rows: | ||
row = [] | ||
for i, c in enumerate(r): | ||
row.append(rpad(c, counts[i]+2)) | ||
print("".join(row)) | ||
|
||
get_net_info() | ||
print("\n") | ||
print("\n") | ||
def ifconfig(): | ||
print("HOSTNAME "+ sys.hostname()) | ||
rows = [["IFACE", "IP", "MAC"]] | ||
ip_res = sys.get_ip() | ||
for interface in ip_res: | ||
for ip in interface['ips']: | ||
rows.append([interface['name'], ip, interface['mac']]) | ||
print_table(rows) | ||
|
||
ifconfig() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: Get net info | ||
description: Get the network information for the system | ||
author: Alextibtab | ||
name: Get Network Info | ||
description: Get the ip and network information for the system | ||
author: hulto | ||
support_model: FIRST_PARTY | ||
tactic: RECON |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
process.kill(int(input_params['pid'])) | ||
print("\n") | ||
print("\n") | ||
print("") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.