-3

Here's the thing , i have a python interpreter and i want to run sqlmap using cmd with C# . Now the thing is i know how to run a normal cmd command from c# , if i run the following command on cmd

python sqlmap.py -u http://www.eastodissa.ac.in/news-and-events.php?id=22 --dbs

it asks for some user inputin the form of

[y/n]

and then it continues processing.

My question is that if i want to automate this process using C# that is bypassing these [y/n]'s with the default value i set and how to check whether the command has been executed or not , how will this be done. I'm kind of new to c#.

Thanks in advance

5
  • Possible duplicate stackoverflow.com/q/16029939/1036187 Commented May 10, 2013 at 20:59
  • Now the thing is how will i know that the process in my case sqlmap is waiting for an input [y/n] ? Commented May 10, 2013 at 21:06
  • 1
    @Harry47 How about to try something and ask a specific question other than "how can I do it" Commented May 10, 2013 at 21:08
  • Giving an answer would have been appreciated @14V Commented May 10, 2013 at 21:28
  • @Harry47: If you write arguments to your process with StreamWriter, you can read outputs with StreamReader Commented May 11, 2013 at 6:44

2 Answers 2

1

You might be able to do "the pipe trick" to auto insert your answer.

|y
Sign up to request clarification or add additional context in comments.

1 Comment

Can you like give me an example ?
0

I think you're looking for

System.Diagnostics.Process.Start("yourcommandhere");

Comments

Your Answer

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.