Asp ?İd Leme Yardım (Acil)
-
şimdi amacımı yanlış analamayın hep takıldıgım yerler farklı konular oldugu için yenikonu acıyorum amacım flood deildir neyse zaten bu 2.konum
ben şimdi sole bişi istiyorum
/haber.asp?id=12 yazınca işte 12 aydili konunun bilgilerini listeler bunu nasıl yapabilirim bide
şimdi be şöle istiyorum sallıyorum yorum tablosundaki haber_id stunundaki sadece 1 yazanları sıralamasını nasıl yapıcam bide yavas yavas ogreniyoz işte aspyi
-
set rs=baglanti.Execute("select * from tablon where id="&request("id")&"")
haberbaslik=rs("haberbaslik")
ws.. bu linkten gelen id ye göre tablondan veriyi çeker ancak unutmaman gereken kural requestleri filtrelemelisin güvenlik açığı oluşur aksi halde.
<%
set rs=baglanti.Execute("select * from tablon where haber_id=1 order by id desc")
Do while not rs.eof
response.write "&rs("haberbasligi")&"<br/>"
rs.movenext
Loop
rs.close
Set rs=Nothing
%>
sadece haber_id si 1 olanları listeletirsin istersen gene bunu linkten alırsın
<%
set rs=baglanti.Execute("select * from tablon where haber_id="&request("haber_id")&" order by id desc")
Do while not rs.eof
response.write "&rs("haberbasligi")&"<br/>"
rs.movenext
Loop
rs.close
Set rs=Nothing
%>linkten gelen haberler.asp?haber_id=1 idsini çekersin sıralatırsın
-
<%
Function Temmuzlbr_org(strInput)
strInput = Replace(strInput,"&", "&")
strInput = Replace(strInput, "'", "''")
strInput = Replace(strInput, "<", "<")
strInput = Replace(strInput, ">", ">")
strInput = Replace(strInput,"""" ,""")
strInput = Replace(strInput,"!","!")
strInput = Replace(strInput,"#","#")
strInput = Replace(strInput,"$","$")
strInput = Replace(strInput,"%","%")
strInput = Replace(strInput,"(","(")
strInput = Replace(strInput,")",")")
strInput = Replace(strInput,"*","*")
strInput = Replace(strInput,"+","+")
strInput = Replace(strInput,",",",")
strInput = Replace(strInput,"=","=")
strInput = Replace(strInput,"?","?")
strInput = Replace(strInput,"[","[")
strInput = Replace(strInput,"\","\")
strInput = Replace(strInput,"]","]")
strInput = Replace(strInput,"^","^")
strInput = Replace(strInput,"`","`")
strInput = Replace(strInput,"{","{")
strInput = Replace(strInput,"|","|")
strInput = Replace(strInput,"}","}")
strInput = Replace(strInput,"~","~")
strInput = Replace(strInput,"£","£")
strInput = Replace(strInput,"©","©")
strInput = Replace(strInput,"«","«")
strInput = Replace(strInput,"®","®")
strInput = Replace(strInput,"¹","¹")
strInput = Replace(strInput,"º","º")
strInput = Replace(strInput,"»","»")
strInput = Replace(strInput,"¼","¼")
strInput = Replace(strInput,"½","½")
strInput = Replace(strInput,"¾","¾")
strInput = Replace(strInput,"ø","ø")
strInput = Replace(strInput,"¿","¿")
strInput = Replace(strInput,"ß","ß")
strInput = Replace(strInput,"÷","÷")
strInput = Replace(strInput,"×","×")
Temmuzlbr_org = strInput
End Function
%>
kullansam sql enjeksiyon açığı kalkar de3me -
o liste daha da uzatılabilir select union - vs eklenip filtreletilebilir bununla beraber
isnumeric de kullanabilirsin
if not isnumeric(id) then
response.redirect "default.asp"
end if
gibi.. -
arkinfes bunu yazdı:
-----------------------------
<%
Function Temmuzlbr_org(strInput)
strInput = Replace(strInput,"&", "&")
strInput = Replace(strInput, "'", "''")
strInput = Replace(strInput, "<", "<")
strInput = Replace(strInput, ">", ">")
strInput = Replace(strInput,"""" ,""")
strInput = Replace(strInput,"!","!")
strInput = Replace(strInput,"#","#")
strInput = Replace(strInput,"$","$")
strInput = Replace(strInput,"%","%")
strInput = Replace(strInput,"(","(")
strInput = Replace(strInput,")",")")
strInput = Replace(strInput,"*","*")
strInput = Replace(strInput,"+","+")
strInput = Replace(strInput,",",",")
strInput = Replace(strInput,"=","=")
strInput = Replace(strInput,"?","?")
strInput = Replace(strInput,"[","[")
strInput = Replace(strInput,"\","\")
strInput = Replace(strInput,"]","]")
strInput = Replace(strInput,"^","^")
strInput = Replace(strInput,"`","`")
strInput = Replace(strInput,"{","{")
strInput = Replace(strInput,"|","|")
strInput = Replace(strInput,"}","}")
strInput = Replace(strInput,"~","~")
strInput = Replace(strInput,"£","£")
strInput = Replace(strInput,"©","©")
strInput = Replace(strInput,"«","«")
strInput = Replace(strInput,"®","®")
strInput = Replace(strInput,"¹","¹")
strInput = Replace(strInput,"º","º")
strInput = Replace(strInput,"»","»")
strInput = Replace(strInput,"¼","¼")
strInput = Replace(strInput,"½","½")
strInput = Replace(strInput,"¾","¾")
strInput = Replace(strInput,"ø","ø")
strInput = Replace(strInput,"¿","¿")
strInput = Replace(strInput,"ß","ß")
strInput = Replace(strInput,"÷","÷")
strInput = Replace(strInput,"×","×")
Temmuzlbr_org = strInput
End Function
%>
kullansam sql enjeksiyon açığı kalkar de3me
-----------------------------cıx, alakası yok bunun sql le, xss için işe yarayabilir belki, php de olsan direk mysql_real_escape_string dersin geçersin
