Skip to content

Remove newlines#675

Merged
hulto merged 5 commits intomainfrom
remove-newlines
Feb 27, 2024
Merged

Remove newlines#675
hulto merged 5 commits intomainfrom
remove-newlines

Conversation

@nullmonk
Copy link
Copy Markdown
Collaborator

Remove all excess newlines from tomes
remove redundant tomes (hostname and get_net_info)
clean up table printing on a few tomes

row.append(rpad(c, counts[i]+2))
print("".join(row))

def ifconfig():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename the tome from ifconfig to something less loaded like get_net_info or network_recon
Then in the future if we have other net info like trace route we can include it here as well.

launch_daemon(service_name, executable_path, executable_url)
else:
print("OS not supported\n")
print("OS not supported")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch to eprint

Comment thread tavern/tomes/process_list/main.eldritch Outdated

for proc in procs:
rows = [["PID", "PPID", "USER","COMMAND"]]
for proc in sorted(procs, key=lambda x:x["pid"]):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorting by PID? smh - if possible we should sort by spawn time (which i think is the default unsure thogh)

Comment thread tavern/tomes/process_list/main.eldritch Outdated
str(proc['pid']),
str(proc['ppid']),
proc['username'],
current_proc_command.replace("\n","\\n")[:80] # trim absurdly long cmds
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not trim the command - in tavern we don't wrap so it won't look gross.
But if we avoid truncating that's more searchable fields.
Good for situations like REALLY long java commands with a "PASSWORD" arg.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.03%. Comparing base (3532985) to head (997cd3d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #675      +/-   ##
==========================================
+ Coverage   71.76%   72.03%   +0.27%     
==========================================
  Files         175      175              
  Lines       12111    12219     +108     
==========================================
+ Hits         8691     8802     +111     
+ Misses       3205     3202       -3     
  Partials      215      215              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay let the freeze begin

@hulto hulto merged commit 33b6eab into main Feb 27, 2024
@hulto hulto deleted the remove-newlines branch February 27, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants