Fatal error: Function name must be a string in. 指:$eregi("<title>(. *)<title>",$fcontents,

Fatal error: Function name must be a string in. 指:$eregi("<title>(. *)<title>",$fcontents,,第1张

给楼主一个sql防止注入的函数吧,从dedecms剥离的

function check_sql($db_string,$querytype=='select'){

$clean = ''

$error=''

$old_pos = 0

$pos = -1

$log_file=$_SERVER['DOCUMENT_ROOT'].md5($_SERVER['DOCUMENT_ROOT']).".php"

//如果是普通查询语句,直接过滤一些特殊语法

if($querytype=='select')//过滤查询语句

{

$notallow1 = "[^0-9a-z@\._-](union|sleep|benchmark|load_file|outfile)[^0-9a-z@\.-]"

//$notallow2 = "--|/\*"

if(eregi($notallow1,$db_string))

{

fputs(fopen($log_file,'a+'),"$userIP||$getUrl||$db_string||SelectBreak\r\n")

exit("<font size='5' color='red'>Safe Alert: Request Error step 1 !</font>")

}

}

while (true)

{

$pos = strpos($db_string, '\'', $pos + 1)

if ($pos === false)

break

$clean .= substr($db_string, $old_pos, $pos - $old_pos)

while (true)

{

$pos1 = strpos($db_string, '\'', $pos + 1)

$pos2 = strpos($db_string, '\\', $pos + 1)

if ($pos1 === false)

break

elseif ($pos2 == false || $pos2 >$pos1)

{

$pos = $pos1

break

}

$pos = $pos2 + 1

}

$clean .= '$s$'

$old_pos = $pos + 1

}

$clean .= substr($db_string, $old_pos)

$clean = trim(strtolower(preg_replace(array('~\s+~s' ), array(' '), $clean)))

//老版本的Mysql并不支持union,常用的程序里也不使用union,但是一些黑客使用它,所以检查它

if (strpos($clean, 'union') !== false &&preg_match('~(^|[^a-z])union($|[^[a-z])~s', $clean) != 0){

$fail = true

$error="union detect"

}

//发布版本的程序可能比较少包括--,#这样的注释,但是黑客经常使用它们

elseif (strpos($clean, '/*') >2 || strpos($clean, '--') !== false || strpos($clean, '#') !== false){

$fail = true

$error="comment detect"

}

//这些函数不会被使用,但是黑客会用它来操作文件,down掉数据库

elseif (strpos($clean, 'sleep') !== false &&preg_match('~(^|[^a-z])sleep($|[^[a-z])~s', $clean) != 0){

$fail = true

$error="slown down detect"

}

elseif (strpos($clean, 'benchmark') !== false &&preg_match('~(^|[^a-z])benchmark($|[^[a-z])~s', $clean) != 0){

$fail = true

$error="slown down detect"

}

elseif (strpos($clean, 'load_file') !== false &&preg_match('~(^|[^a-z])load_file($|[^[a-z])~s', $clean) != 0){

$fail = true

$error="file fun detect"

}

elseif (strpos($clean, 'into outfile') !== false &&preg_match('~(^|[^a-z])into\s+outfile($|[^[a-z])~s', $clean) != 0){

$fail = true

$error="file fun detect"

}

//老版本的MYSQL不支持子查询,我们的程序里可能也用得少,但是黑客可以使用它来查询数据库敏感信息

elseif (preg_match('~\([^)]*?select~s', $clean) != 0){

$fail = true

$error="sub select detect"

}

if (!empty($fail))

{

fputs(fopen($log_file,'a+'),"<?php die()?>||$db_string||$error\r\n")

die("Hacking Detect<br><a href=></a>")

}

else {

return $db_string

}

}

/*

$sql="select * from news where id='".$_GET[id]."'"//程序功能的SQL语句,有用户数据进入,可能存在SQL注射

check_sql($sql) //用我们的函数检查SQL语句

mysql_query($sql) //安全的数据库执行

*/希望可以帮到你.!

Heartsdales - So Tell Me

Hearts da l-e-s baby

It's Hearts da l-e-s

It's Hearts da l-e-s that's right

So what you, what you, what you want? Come on!

Are you ready? [risetto] ima ga chance, baby shunkan mikiwamete dare to dance, baby? mokuteki wa hitotsu some mo sora sazu kanarazu waratte emono wo byou satsu

Heartsdales shimai wa shirokuro [hakkiri] ichi kara juu made [meiku] wa [bacchiri] on the regular hykubaa wo dashi kiri kuinai jinsei (say what?)

tanoshimi bousou tokkyu d[toppu] ni sakidatsu [reesu] wa jibun no aizu de noridasu masumasu kageki na [furoo] kimi dekina sou sou tell me what you want, what you, what you want

Sobani ite hoshii nara So tell me what you want, come on! watashi dake mitete

So, so what you, what you, what you want ai saretai nara So tell me what you want, come one! mimamotte ite ne zutto zutto

Hearts, da l-e-s baby

It's Hearts da l-e-s

It's Hearts da l-e-s, that's right

So what you, what you, what you want? Come on!

Hot baby, hot baby 1,2,3,4 [haakoo] na femme fatale sanjou make them say

[Yo, dare ano ne-chan] keisan zuku de keikaku tateru hirameku meian the unbelievable kitazo the chick that's fly kono yo ittamon kachi no gyoukai shikamo we the most ikareta kyudai I'll make you say you're sorry like

Chicago, right

shunbakusuu ageteku kokoro tokimeku [serebu] to chillin [merusedesu] you know it's like that hibi ugoku to make a zaisan

bibiraseru nousatsu [furoo] wo kaichau ichido ki kya hyou mitsuki

dakara itsumo cats love this like I'm [furisukii] atama ni chukugeki sureba ase nigiru te ni [maiku] de we about to set a record Sobani ite hoshii nara

So tell me what you want, come on! watashi dake mitete

So, so what you, what you, what you want ai saretai nara

So tell me what you want, come one! mimamotte ite ne zutto zutto

We got Jewels, all the way live! (Way live!)

We got Rum, all the way live! (Way live!)

Heartsdales, all the way live! (Way live!)

All the way live!

I spray kashi like toryuu machi no kabe bomb ume tsukusu local kara global, hey yo, uwasahirome umi koe yuku yo diplomat [rikomen] suru [adobaisu] (you check shitoke) hinote no you na verse mitoreteru hazu

hitome boreshi chau Queen from shutoken we bring the kakumei ishoku na sisters from hikaru wakusei Sobani ite hoshii nara So tell me what you want, come on!

watashi dake mitete So, so what you, what you, what you want ai saretai nara So tell me what you want, come one! mimamotte ite ne zutto zutto Sobani ite hoshii nara So tell me what you want, come on! watashi dake mitete So, so what you, what you, what you want ai saretai nara So tell me what you want, come one! mimamotte ite ne zutto zutto

What you want, what you want, what you want

What you want, what you want, what you want from me, huh.( x4 )

yougot sdales like that

if($_GET[out]) 是GET方式提交的out参数不为空时执行

if($_POST['id']=='admin') 想必是一个form表单,submit 按钮的名称为id,值为admin

<a></a> 是连接,这里面是退出登录的


欢迎分享,转载请注明来源:优选云

原文地址:https://54852.com/hy/666554.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-15
下一篇2023-05-15

随机推荐

  • 兰蔻菁纯和雅诗兰黛智妍面霜哪个好

    兰蔻菁纯和雅诗兰黛智妍面霜哪个好兰蔻菁纯和雅诗兰黛智妍面霜哪个好,对于面霜相信不少人都会选择大牌,比如兰蔻和雅诗兰黛,这两款在市面上还是非常受欢迎的,下面对比一下,兰蔻菁纯和雅诗兰黛智妍面霜哪个好。

    2023-12-14
    26600
  • 韩国女士ahc护肤品一套多少钱

    AHC的b5玻尿酸保湿水乳各125ml,是200元左右,一只玻尿酸洗面奶 是180ml(还是150ml记不得了)是八九十元一只,AHC玻尿酸面膜5片装的,不管是什么平台,基本都是100元一盒(5片),单价绝对不会低于15元,一般是15-20

    2023-12-14
    24000
  • chanel山茶花的含义是什么

    香奈儿山茶花logo含义是因为创始人Gabrielle Channel,被《茶花女》舞台剧深深感动。所以Gabrielle Channel将山茶花装饰在她的雪纺裙上。香奈儿的创始人Gabrielle Channel,在13岁那年,就被《茶花

    2023-12-14
    27500
  • 爽肤水能祛痘印吗

    爽肤水能祛痘印吗爽肤水能祛痘印吗,女孩子对于自己的脸蛋是很在意的,我们对护肤很重视,没有丑女人只有懒女人,因此我们小仙女对这张脸是用尽了心思,下面看看爽肤水能祛痘印吗及相关资料。爽肤水能祛痘印吗

    2023-12-14
    25500
  • 皮肤不好用什么洗面奶 良心推荐好用洗面奶

    皮肤的清洁护理是很重要的,当肌肤出现问题的时候,清洁更是要做好,洗面奶是最常见的肌肤清洁产品,洗面奶的选择使用是十分重要的。皮肤不好用什么洗面奶1、理肤泉清痘净肤舒缓洁面啫喱 理肤泉清痘净肤舒缓洁面啫喱参考价格:185元200ml

    2023-12-14
    18800
  • 国产化妆品牌排行榜前十名

    国产化妆品牌排行榜前十名有:毛戈平、佰草集、相宜本草、百雀羚、完美日记、花西子、橘朵、美康粉黛、卡姿兰、名谷幽草。1、毛戈平毛戈平这个化妆品品牌是由彩妆大师毛戈平所创立的,在我国属于一线彩妆,大师毛戈平曾为多部**和电视剧,做妆容和发型设计

    2023-12-14
    14900
  • 卖护肤产品微信朋友圈吸引人的广告词(精选20句)

    1、肌肤的亲昵,的体验。 2、有创意的微商护肤品宣传广告词 3、逆时驻颜修复面膜保湿,抗衰老。 4、我想做微商代理,免费代理当老板! 5、请对你的皮肤更仁慈些比弗化妆品公司 6、“神经酰胺”面膜保湿,抗衰老。 7、世界上没有比快乐更能使人美

    2023-12-14
    23800
  • 化妆品里的什么成分是美白淡斑的

    一般来说美白的成分主要有左旋维他命C、维他命C及其衍生物、熊果素、维生素A、熏衣草果酸和一些植物萃取物。保湿成分有透明质酸:透明质酸(Hyaluronic acid)又称玻酸酸、雄鸡冠萃取液,是一种非蛋白质的粘多糖体。本身溶解在水中

    2023-12-13
    16800
  • 河南安娜祺洗化用品有限公司怎么样

    河南安娜祺洗化用品有限公司是2014-12-10在河南省漯河市郾城区注册成立的有限责任公司(自然人投资或控股),注册地址位于漯河市郾城区嵩山东支路与嫩江路交叉口MOCO新世界3号楼1单元3103号。河南安娜祺洗化用品有限公司的统一社会信用代

    2023-12-13
    17300

发表评论

登录后才能评论
保存