metasploit-framework icon indicating copy to clipboard operation
metasploit-framework copied to clipboard

Keyboard Input Issues in `msfconsole` on PowerShell After Update to v6.4.16 Windows11

Open lanzeweie opened this issue 7 months ago • 1 comments

Steps to reproduce

  1. Update to Metasploit version v6.4.16-dev-e691f7217092cc55a8955fdd847ffa77c6f09f25.
  2. Open PowerShell.
  3. Start msfconsole.
  4. Attempt to use the delete key and arrow keys.

Expected behavior

The delete key and arrow keys should work as expected for navigating and editing commands in msfconsole.

Current behavior

The delete key and arrow keys do not function correctly in msfconsole when using PowerShell.

Metasploit version

Framework Version: v6.4.16-dev-e691f7217092cc55a8955fdd847ffa77c6f09f25

System Information

  • OS Name: Microsoft Windows 11 Pro
  • OS Version: 2009
  • OS Build: 22621.1.amd64fre.ni_release.220506-1250
  • PowerShell Version: 7.4.3
  • Terminal Information:
    • ForegroundColor: Gray
    • BackgroundColor: Black
    • CursorPosition: 0,13
    • WindowPosition: 0,0
    • CursorSize: 25
    • BufferSize: 120,30
    • WindowSize: 120,30
    • MaxWindowSize: 120,30
    • MaxPhysicalWindowSize: 1904,62
    • WindowTitle: Administrator: PowerShell

Attempted solutions

  1. Ensured Metasploit is up-to-date (ran msfupdate).
  2. Tried different terminals (e.g., cmd, Windows Terminal, Git Bash).
  3. Adjusted PowerShell settings:
    • Changed console buffer size and window size.
    • Disabled Quick Edit Mode.
  4. Modified Readline configuration file:
    "\e[3~": delete-char
    "\e[1~": beginning-of-line
    "\e[4~": end-of-line
    "\e[5~": beginning-of-history
    "\e[6~": end-of-history
    

lanzeweie avatar Jun 29 '24 17:06 lanzeweie