用MySQL 生成随机密码
晚上有朋友问起,简单的写了一个。
DELIMITER $$
CREATE
FUNCTION `t_girl`
.
`func_rand_string`
(
f_num tinyint
unsigned
,
f_type tinyint
unsigned
)
RETURNS varchar
(
32)
BEGIN
-- Translate the number to letter.
-- No 1 stands for string only.
-- No 2 stands for number only.
-- No 3 stands for combination of the above.
declare i int
unsigned
default
0;
declare v_result varchar
(
255)
default
''
;
while i <
f_num do
if f_type =
1 then
set
v_result =
concat
(
v_result,
char
(
97+
ceil(
rand
(
)
*
25)
)
)
;
elseif f_type=
2 then
set
v_result =
concat
(
v_result,
char
(
48+
ceil(
rand
(
)
*
9)
)
)
;
elseif f_type=
3 then
set
v_result =
concat
(
v_result,
substring
(
replace
(
uuid
(
)
,
'-'
,
''
)
,
i+
1,
1)
)
;
end
if;
set
i =
i +
1;
end
while;
return v_result;
END
$
$
DELIMITER ;
调用方法示例:
select func_rand_string(12,3);
相关文档:
原作:杨涛(上帝他爸)
一直想等到BETA版出来再试验的,可还是经不住诱惑阿,下午终于有时间测试一下了。
(本文参考地址:http://blog.chinaunix.net/u/8111/showart.php?id=451420)
一、必备软件:
1、LUA
可以去LUA的官方下载:www.lua.org
2、MySQL Proxy
这里有好多二进制版本。
& ......
CREATE TABLE `taa` (
`year` varchar(4) DEFAULT NULL,
`month` varchar(2) DEFAULT NULL,
`amount` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf
"year","m ......
by ZaraByte
How to do a SQL Injection for MYSQL Server 5.0+
1. Find a vulnerable add a ‘ at the end of the site example: news.php?id=1 add a ‘ at the end of the 1 and see if you get a syntax error
2. order by #–
Keep upping the # until you get an error.
3. union all select 1 ......
)MySql 中文网:http://imysql.cn/onlinedoc
)MySQL 中文社区 :http://www.mysql.net.cn/
)MySql 百度百科:http://baike.baidu.com/view/24816.htm
参考资料:
MySql版本构架及索引文件介绍
Linux服务器配置方案MySQL
Winodws下IIS/Apache PHP MySQL的安装配置
初学MySQL哪些需要你知道& ......
【51CTO.com独家特稿】面对惊慌的客户和广泛质疑的媒体,Oracle官方最近终于出榜安民,那便是一个以“SUN CUSTOMERS ,Oracle Plans To:”为大标题的广告。直译过来便过来可知道,Oracle将要加大SPARC和Solaris的投入了,而大老板埃里森也向IBM硬件下了战书,声称Oracle将最终赢得这场竞争……
&n ......