Προς το περιεχόμενο

Αστεία για Προγραμματιστές


ipduh

Προτεινόμενες αναρτήσεις

  • Απαντ. 362
  • Δημ.
  • Τελ. απάντηση

Συχνή συμμετοχή στο θέμα

 


1EHtAqv.jpg


 
Explanation:




It's a simple SQL injection. I'll explain.
Let's say that an automated license plate scanner on a police car reads his plate and tries to get the car information from the database with the following SQL query which would get the car owner and model associated with a specific license plate from the database:

SELECT owner,model FROM cars WHERE license='$LICENSE' LIMIT 1


The $LICENSE is replaced with the scanned plate which would normally result in the following query if it was a legit plate with the license ABC123:

SELECT owner,model FROM cars WHERE license='ABC123' LIMIT 1


But in this case his license would in this case create the following query:

SELECT owner,model FROM cars WHERE license='' OR 0='0' LIMIT 1


The WHERE clause of the query would now always evaluate to true (because 0='0') which would make it return the car information from the first row of the database and not the information about his car.
Note that all of this is extremely theoretical and would probably never work in real life. I would take a wild guess and say that OP did this as a joke.


 

  • Like 1
Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

  • 1 μήνα μετά...

- Ξέρεις Python; 

- Ναι

- Ξέρεις PHP;

- Ναι

- Τι ξέρεις από CSS/JS/HTML;

- και τα 3

 

- Οκ! προσλαμβάνεσαι! η δουλειά σου είναι να φτιάξεις ένα Site με Joomla.

 

Η ελληνική πραγματικότητα.

 

 

 

2592708-2613052362-1024p.png

 

 

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

η εντολή που μοιάζει με το γυναικίο στρινγκ.

εσύ ποιο λες; :-D

Το στριγκάκι δεν αναφέρεται στους προγραμματιστές αν εννοείς αυτό, με παρεξήγησες :blink: :huh: :confused:

Έτοιμοι είστε ορισμένοι να αρπαχτείτε χωρίς να υπάρχει πραγματικά λόγος.

chill out ^_^ :D ;) B)

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

  • 1 μήνα μετά...

Δημιουργήστε ένα λογαριασμό ή συνδεθείτε για να σχολιάσετε

Πρέπει να είστε μέλος για να αφήσετε σχόλιο

Δημιουργία λογαριασμού

Εγγραφείτε με νέο λογαριασμό στην κοινότητα μας. Είναι πανεύκολο!

Δημιουργία νέου λογαριασμού

Σύνδεση

Έχετε ήδη λογαριασμό; Συνδεθείτε εδώ.

Συνδεθείτε τώρα

  • Δημιουργία νέου...