RE: Source Code Tutorial - Simple Reverse Shell in C 10-10-2015, 10:49 PM
#6
(10-10-2015, 04:05 AM)m0dem Wrote: I want to take note of two issues:
My solutions are:
- errors are not sent over the connection
- you can't change your directory
For example, if the user previously changed the directory to `mydir` and the current command was something like `mkdir test`, then the command executed would be:
- append `2>&1` to the end of the command
- prepend a command to change the directory for the second command
explanation: `2>&1` should pass the stderr output into stdoutCode:cd mydir & mkdir test 2>&1
I will try to implement my solutions soon.
2. Is a really hacky fix, you should properly allocate the file descriptors, unsure if it works the same way as it does on *nix but if so piping stderr to stdout just out of practice is in my oppinion a bad idea.
i dont know anything


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)