2

I'm working on exploiting a bug on Windows XP SP2 by using Metasploit and I do this from Ubuntu terminal.

Now, I have connected to Windows Shell but now I have small problem with saving my text file. I am using edit file.txt command and then type the content of file. The problem is when I press CTRL+Z it closes my msfconsole without saving the file.

What are other ways to save that file without GUI?

HelpNeeder
  • 6,383
  • 24
  • 91
  • 155
  • 1
    Can you not bypass EDIT entirely, and simply type the content of the file, redirecting output to file.txt? – dbenham Oct 05 '12 at 21:47

1 Answers1

2

Like @dbenham suggested, you can do something like:

> echo First line of file > file.txt
> echo Second line of file >> file.txt
...
> echo Last line of file >> file.txt

Note: ... is not a command, it's just to represent the lines that would be in between.

Pedro Romano
  • 10,973
  • 4
  • 46
  • 50