0

I've been trying to simulate various attacks in networks, using mininet-wifi emulator. For some tasks, I need to get the output of mininet-CLI commands into a file, (preferably in text format, but other would work as well). Can anyone guide me on how to achieve the same?

I tried various python commands but I don't know how to implement them in mininet-wifi, CLI.

marc_s
760k186 gold badges1.4k silver badges1.5k bronze badges
asked Nov 24, 2023 at 9:19
3
  • You can redirect any CLI output with > to a file: ls > file-list.txt. Have you tried that? Please post what you have tried so far. Commented Nov 24, 2023 at 9:50
  • 1
    ls > file-list.txt This method is not working in "Mininet-wifi" CLI. I have tried searching the mininet-wifi source file, to look for the command whose output is i am trying to get. I have also tried to create another python file to redirect or copy the output from the console to a desired .txt file, but still i am having troubles to implement this solution in mininet-wifi. Commented Nov 24, 2023 at 10:17
  • It always helps to put your attempts in the question, also what Mininet-wifi is outputting and which lines you are trying to get from that. Commented Nov 24, 2023 at 13:23

1 Answer 1

0

sudo mn --wifi > op.txt it has sent only mininet-wifi> cli prompt into op.txt i.e how many times i have given commands and pressed enter those many times mininet-wifi> is repeated no output of the cli command is copied.

mininet-wifi>sta1 ping sta2 > op.txt this command stored the output of the sta1 ping sta2 till i interrupt the command by pressing ctrl+c

note: prompt never been shown will be shown, just give command

answered Dec 4, 2023 at 10:10
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.