Home  >  Q&A  >  body text

[Newbie question] What does this python command line program mean?

python sqlmap.py -u "http://172.16.120.130/sqlmap/mysql/get_int.php?id=1" --batch

First of all, I would like to ask the seniors, what do -u and --batch here mean?
Secondly, I would like to ask, which piece of knowledge does this belong to? Does it belong to the linux command line, the cmd command line, or something else? Where can I go to learn the relevant commands, or there are relevant documents that can be consulted.
Waiting online for answers from the master~

仅有的幸福仅有的幸福2711 days ago631

reply all(4)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-18 11:03:07

    -u URL, --url=URL   Target URL (e.g. "http://www.site.com/vuln.php?id=1")
    --batch             Never ask for user input, use the default behaviour

    The sqlmap document is very clear
    https://github.com/sqlmapproj...

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-18 11:03:07

    sqlmap.py -u "http://172.16.120.130/sqlmap/mysql/get_int.php?id=1" --batch是python的参数。
    -u "http://172.16.120.130/sqlmap/mysql/get_int.php?id=1" --batchThese parameters are parameters of sqlmap.py.

    sqlmap.py should have -h or --help to view help information.

    As for "whether it belongs to the linux command line or the cmd command line", I can't tell. I have to ask you, did you execute it on the linux shell or did you execute it in windows cmd or powershell?

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-18 11:03:07

    -u--batch should belong to the command line parameters. Command line parameters are parameters provided to the execution of a script or executable program.

    Parameters are available in two ways: default and customized. Generally there are two modes:

    单短线+空格+参数值,例如 -u "http://172.16.120.130/sqlmap/mysql/get_int.php?id=1"
    另外一种就是 双短线+等号+参数值。例如 --batch=somevalue

    You can pass the sys.args读取这些参数,也可以使用更强大的argparsemodule in python code, and you can also use a useful third-party library click

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-18 11:03:07

    The key is to look at sqlmap.py. -u is the parameter passed when executing this script.
    There should be sys.argv[1:] in this script to obtain these parameters. Take a look

    reply
    0
  • Cancelreply