Skip to content

Commit

Permalink
Merge pull request #58 from alexxsstar/dev
Browse files Browse the repository at this point in the history
add utf-8 and remove readline
  • Loading branch information
OscarAkaElvis authored Apr 29, 2024
2 parents df3e65e + ef2e81b commit b2a0d2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions evil-winrm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
$url = 'wsman'
$default_service = 'HTTP'
$full_logging_path = "#{Dir.home}/evil-winrm-logs"
# Encoding
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8

# Redefine download method from winrm-fs
module WinRM
Expand Down Expand Up @@ -592,9 +595,11 @@ def main
until command == 'exit' do
pwd = shell.run('(get-location).path').output.strip
if $colors_enabled
command = Readline.readline( "#{colorize('*Evil-WinRM*', 'red')}#{colorize(' PS ', 'yellow')}#{pwd}> ", true)
print("#{colorize('*Evil-WinRM*', 'red')}#{colorize(' PS ', 'yellow')}#{pwd}> ")
command = STDIN.gets.chomp
else
command = Readline.readline("*Evil-WinRM* PS #{pwd}> ", true)
print("*Evil-WinRM* PS #{pwd}> ", true)
command = STDIN.gets.chomp
end
$logger&.info("*Evil-WinRM* PS #{pwd} > #{command}")

Expand Down

0 comments on commit b2a0d2d

Please sign in to comment.