Новая Школа - онлайн-школа подготовки к ЕГЭ
Задача Задача №3623392
А
Аноним
18 июня 2026 14:02 · публичный вопрос
А
Аноним

-1' OR 5*5=26 --

Ответ нейросети
18 июня 2026 14:02

That looks like a classic SQL injection payload used in exam or interview questions to test understanding of how input can manipulate a query.

What each part does (in typical SQL context):

  • -1' closes a quoted string in a SQL statement.
  • OR introduces an alternate condition.
  • 5*5=26 is a boolean expression that evaluates to false (since 25 ≠ 26).
  • -- starts a SQL comment, so the rest of the line is ignored by the parser.

In a vulnerable query like: SELECT * FROM users WHERE username = '\(input' AND password = '\)pass'; If the attacker inputs -1' OR 55=26 --, the resulting SQL could end up commenting out the rest of the query. Depending on the exact query, this might or might not bypass authentication. Payloads that use a tautology such as 1=1 or 55=25 (true) are more effective at bypassing checks because they can make the WHERE clause always true.

Important takeaways for exams and defense:

  • This illustrates how closing a string literal, injecting OR, and commenting out the rest can alter query logic.
  • The safe remedy is to use parameterized queries (prepared statements) instead of string-concatenated SQL.
  • Also apply input validation, least privilege database users, and disable multi-statement execution when possible.

If you want, I can give you a few safe practice questions or examples of how to rewrite vulnerable queries into parameterized forms for exam prep.