Skip to content

Instantly share code, notes, and snippets.

@viniciussanchez
Created June 6, 2021 14:47
Show Gist options
  • Save viniciussanchez/5240f5aa5fad0ca122a5af1a0d34b1ac to your computer and use it in GitHub Desktop.
Save viniciussanchez/5240f5aa5fad0ca122a5af1a0d34b1ac to your computer and use it in GitHub Desktop.
With SQL Injection
begin
qryUsuarios.SQL.Clear;
qryUsuarios.SQL.Add('select *');
qryUsuarios.SQL.Add(' from user');
qryUsuarios.SQL.Add(' where login = ' + QuotedStr(edtUsuario.Text));
qryUsuarios.SQL.Add(' and password = ' + edtSenha.Text);
qryUsuarios.Open();
if qryUsuarios.IsEmpty then
ShowMessage('ERRO!!!')
else
ShowMessage('Ok');
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment