I am trying to make sqlmap to avoid fetch data from stored session. How do I achieve that? I have performed sqlmap check once on a target and now that target is offline, I want sqlmap to just stop the checks if target is offline and even if target is online it should recheck it not just show the data from stored session.

python3 sqlmap.py --threads=5 -m /tmp/sql --batch --answers "already=N"
[12:39:54] [CRITICAL] unable to connect to the target URL ('Connection refused')
sqlmap resumed the following injection point(s) from stored session:
Parameter: id2 (GET)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause
    Payload: id2=1 AND 9749=9749

    Type: UNION query
    Title: Generic UNION query (NULL) - 2 columns
    Payload: id2=1 UNION ALL SELECT NULL,'qzvpq'||'GUyWfclrkLkxNLVAdYrBXilkXpGmcpZLkJplITTj'||'qqbbq'-- qdhG

2 Answers 2


use --flush-session

sample: sqlmap --flush-session -u ....

  • Did it for me, don't know why it had been downvoted...
    – borizzzzz
    Dec 8, 2021 at 12:35

You will want to use the fresh queries switch:

    --fresh-queries     Ignore query results stored in session file
  • No, it doesn't work. I am getting the same behaviour even if use it. Sep 22, 2020 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.