Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8439221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:57:02+00:00 2026-06-10T07:57:02+00:00

I am trying to run the following query: query = SELECT id, password_hash, salt

  • 0

I am trying to run the following query:

 query = """SELECT id, password_hash, salt FROM users
           WHERE username = '{0}' LIMIT 1""".format(username)

with this ‘username’

 ' OR username IN ((SELECT 
(UPDATE users SET password_hash="hash") FROM users)) -- 

but i am getting this error:

OperationalError: near "UPDATE": syntax error

What am I doing wrong?

its not because of prepared statements or anything, because that query works:

 ' OR username IN ((SELECT username FROM users)) -- 

I am doing this legally on a website called stripe-ctf.com and for learning purposes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:57:03+00:00Added an answer on June 10, 2026 at 7:57 am

    To run multiple statements, you would normally separate them using ‘;’, e.g.

    SELECT id, password_hash, salt FROM users WHERE username = 'bob'; UPDATE users SET password_hash='hash' WHERE username='bob';

    However, you won’t be able to inject this; the call cursor.execute(query) on line 88 of secretvault.py won’t allow you to execute multiple statements (see the documentation: execute() will only execute a single SQL statement.)

    You’re on right path though… I won’t give out the answer, but I encourage you to look into the SQLite SELECT documentation. Try to look into ways of “forcing” the SELECT statement to return additional values.

    Best of luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run the following query: SELECT COUNT(*) FROM ( SELECT *
I'm trying to run a select query, which is the following: SELECT * FROM
I was trying to run the following query UPDATE blog_post SET `thumbnail_present`=0, `thumbnail_size`=0, `thumbnail_data`=''
I'm trying to run the following MySQL query: SELECT * FROM user u JOIN
I am trying to run the following script (unsuccessfully): $variables = $db->query(SELECT * FROM
i was trying to run this query: ( (SELECT * FROM (SELECT * FROM
I'm trying to run the following query: SELECT formatted_journeys.*, MAX(speed) FROM formatted_journeys JOIN tracker.g_log
I'm trying to run the following query, but am not sure how to limit
I'm trying to run the following query from phpMyAdmin (on a local WAMP server):
I have been trying to run the following query in SPARQL explorer SELECT DISTINCT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.