INNER CODE UNIT · Ruby
progress_bar
Hackplayers/evil-winrm · evil-winrm.rb:665
progress_bar = (progress / 10).round
progress_string = '▓' * (progress_bar - 1).clamp(0, 9)
progress_string = "#{progress_string}▒#{'░' * (10 - progress_bar)}"
message = "Progress: #{progress}% : |#{progress_string}| \r"
$stdout.print message
end
# Get filesize
def filesize(shell, path)
shell.run("(get-item '#{path}').length").output.strip.to_i
end
# Clear screen
def clear_screen
system('clear') || system('cls') || puts("\033[2J\033[H")
end
# Get history file path based on host and user