Results 1 to 2 of 2
  1. #1
    C-Katalyst's Avatar
    Join Date
    Jan 2014
    Gender
    female
    Posts
    1
    Reputation
    10
    Thanks
    0
    My Mood
    Cynical

    Cmd.exe parsing through anonymous pipe.

    Here's an interesting issue I currently found. This is for C & winAPI.

    So, I created 2 IO pipes from which I allowed inheritance of the standard handles provided by CreateProcess() on cmd.exe.
    I'm reading/writing with the following functions -> ReadFile() & WriteFile() to the pipe & everything seems to work fine - however:

    After writing to the pipe "cd ..\\r\n", any other following command outputs "More?". This only happens in some cases, whereas others like "tasklist\r\n" provides no errors.

    Anyone happen to know what is causing it?
    Thank you.
    Last edited by C-Katalyst; 01-14-2014 at 07:42 AM.

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    After writing to the pipe "cd ..\\r\n",
    I think "\\r\n" will

    1) convert \\ to "\"
    2) leave 'r' alone
    3) convert \n to newline.

    You're trying to send \r\n, but aren't? Might not be the cause of the problem..might be? Idk, but post code and I'll experiment with it : )
    Last edited by abuckau907; 01-15-2014 at 01:41 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

Similar Threads

  1. [Solved] error PRJ0003 : Error spawning 'cmd.exe'.
    By iNoGame in forum Combat Arms Coding Help & Discussion
    Replies: 7
    Last Post: 06-17-2013, 11:20 PM
  2. [Help Request] error PRJ0003 : Error spawning 'cmd.exe'.
    By iNoGame in forum Combat Arms BR Coding Help
    Replies: 1
    Last Post: 06-16-2013, 03:32 PM
  3. [Help] Redirect packets through an exe
    By iamabot in forum Other MMORPG Hacks
    Replies: 0
    Last Post: 07-12-2011, 05:41 AM
  4. Connect to West server through Vindictus.exe?
    By Niomieshon in forum Vindictus Discussions
    Replies: 4
    Last Post: 05-08-2011, 02:12 AM
  5. [IDEA] Bypass hackshield/engine.exe?cmd?
    By icantlolanymore in forum Combat Arms Discussions
    Replies: 0
    Last Post: 09-05-2009, 07:56 PM

Tags for this Thread