sqlmapproject / sqlmapproject/sqlmap

--sql-file Inquiry

Open
#4,708 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
38.5k
Forks
6.4k
Avg merge
3d 3h
Merged PRs (30d)
1

Description

Hello,

I'm trying to use the following argument --sql-file

    --sql-file=SQLFILE  Execute SQL statements from given file(s)

According to the documentation it's will run sql statement(s) from file.

  1. i noticed that the file should be saved with EXT .sql in order to detect it.
  2. the file should inserted with it's PATH --sql-file="PATH/sqlfile.sql" otherwise sqlmap will look for it into /sqlmap/data/procs/mysql/sqlfile.sql.
  3. Now my issue is: i already specified the PATH to the file but sqlmap unable to run the statement !
[19:53:01] [INFO] executing SQL statements from given file(s)
[19:53:01] [ERROR] unresolved variables 'm, m' in SQL file '/path_to_file/sqlfile'

is the sql statement need to be formatted ? as i inserted it as single line such as SELECT A, B FROM DB.TABLE

Thanks in advance as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the --sql-file command-line entry point and reproduce the reported invocation with the shown SQL statement and error. Check how the supplied path and SQL file contents are parsed; done means a valid file executes without the unresolved-variables error, or the expected format is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
cli, databases, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.