So, I've got a challenge and it's as follows.
You can access a normal shell(sh) on clean RHEL 6 installation. Write arbitrary content to
file.txt
, but without the following characters.
# & \ + - % @ = : ; , . ' " ^ ` ~ _ | ! / ? * $ # < > [ ] { } ( )
I can use like touch file
or rm file
but touch file.txt
or echo content > file.txt
is not allowed due to .
and >
.
Is this even possible?
tty
orpts
, so, not possible.tee
to both create and write to a new file without need for any special characters?tee
works fine for writing to a file if you can supply the input at the terminal yourself (some editors might work too, though you;ll have a hard time invi
without a:
key), but you're going to have a hard time specifying the file name.