Skip to content

Character Limit on Console.ReadLine(); #2

@xenoantic

Description

@xenoantic

I was trying to run an encoded PShell command and ran into an issue with the character limit of Console.Readline();

I added this and replaced the 2 instances of Console.Readline(); with ReadLine();

    public static string ReadLine()
    {
        byte[] inputBuffer = new byte[1024];
        Stream inputStream = Console.OpenStandardInput(inputBuffer.Length);
        Console.SetIn(new StreamReader(inputStream, Console.InputEncoding, false, inputBuffer.Length));
        string strInput = Console.ReadLine();
        return strInput;
    }

Tested and it works.

Thanks for the work on this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions