script beveiliging [help]

Gestart doorPaull6 reacties28 weergaven

7 berichten · pagina 1 van 1

Paull

Lid · Topicstarter

Berichten
1.641
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik ben een beginnend php scripter. En heb een shoutbox gemaakt. Deze is nog niet beveiligd tegen html, bijv plaintext enzo..

ik heb de tutorial van rick gelezen maar daar snapte ik ook nog niet veel van.
Is het mogelijk dat hij de html niet uitvoerd, dat het gewoon tot tekst wordt
verwerkt, en niet als html.

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posternaam[/COLOR][COLOR= #007700]] ||[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posterbericht[/COLOR][COLOR= #007700]]){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posternaam[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posterbericht[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 1; url=http://habbles.nl/formulier.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt niet alles ingevuld![/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 1; url=http://habbles.nl[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je bericht wordt toegevoegd![/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$safe[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]<B>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posternaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</B><BR>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posterbericht[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]<BR><BR>[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$fp[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/fopen"]fopen[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]data.txt[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]a+[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/fwrite"]fwrite[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fp[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$safe[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/fclose"]fclose[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fp[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$ip[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$admintotal[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000] <B>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posternaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] - [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posterbericht[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</B> gepost door het ip: [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$ip[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]<BR>[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$fop[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/fopen"]fopen[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]admin.txt[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]a+[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/fwrite"]fwrite[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fop[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$admintotal[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/fclose"]fclose[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fop[/COLOR][COLOR= #007700]);
}
}[/COLOR]
?>
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja? PHP replace dacht ik
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
htmlentities
0
Paull

Lid · Topicstarter

Berichten
1.641
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik snap dat niet "S
0
Berichten
3.283
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja je hebt hier alleen het post gedeelte gegeven.
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Je moet inderdaad het weergave gedeelte geven. Buiten dat kan dit script veel netter...
0
Paull

Lid · Topicstarter

Berichten
1.641
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Quote:
Je moet inderdaad het weergave gedeelte geven. Buiten dat kan dit script veel netter...

hij kan idd netter, maar de weergave van de post is een marquee met een include erin bloos
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren