Ronexs

Gestart doorJesper6 reacties51 weergaven

7 berichten · pagina 1 van 1

Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik ben bezig met ronexs systeem te beveiligen voor me site, bij het registreren heb ik al md5 staan hier ook, maar als ik inlog logt hij niet in naar de pagina, in phpmyadmin staat ook goed het wachtwoord in md5
Code:

[COLOR= #0000BB]<?[/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"global.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]ingelogd[COLOR= #007700]() ==[/COLOR] FALSE[COLOR= #007700]){[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actie[/COLOR][COLOR= #007700]])[/COLOR] AND [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actie[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"controleren"[/COLOR][COLOR= #007700]){[/COLOR]

        [COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/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]gebruikersnaam[/COLOR][COLOR= #007700]])){[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Geen gebruikersnaam ingevuld<br>"[/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]wachtwoord[/COLOR][COLOR= #007700]])){[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Geen wachtwoord ingevuld<br>"[/COLOR][COLOR= #007700];
        }[/COLOR]

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR][COLOR= #007700])[/COLOR] AND [COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]){[/COLOR]

            begintabel[COLOR= #007700]([/COLOR][COLOR= #DD0000]"Foutmelding"[/COLOR][COLOR= #007700]);[/COLOR]

            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"De volgende fout(en) is/zijn opgetreden tijdens het ingeloggen:<br>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]

            eindetabel[COLOR= #007700]();

        }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]

            [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE gebruikersnaam="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" AND wachtwoord="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]

            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]){[/COLOR]

                [COLOR= #0000BB]$hash[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mt_rand"]mt_rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]9999[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]99999[/COLOR][COLOR= #007700]);

                @[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET hash="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$hash[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"DELETE FROM online WHERE ip="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

                [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"hash"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$hash[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/time"]time[/URL][COLOR= #007700]()+[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijdingelogd[/COLOR][COLOR= #007700]]);[/COLOR]

                [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"location:index.php"[/COLOR][COLOR= #007700]);

            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]

                begintabel[COLOR= #007700]([/COLOR][COLOR= #DD0000]"Foutmelding"[/COLOR][COLOR= #007700]);[/COLOR]

                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gebruikersnaam en/of wachtwoord onjuist!"[/COLOR][COLOR= #007700];[/COLOR]

                eindetabel[COLOR= #007700]();

            }

        }

    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]

        begintabel[COLOR= #007700]([/COLOR][COLOR= #DD0000]"Inloggen"[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form action="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=controleren name=inloggen method=POST>

        Welkom op de inlog pagina van Ronexs<br>Hier kan je inloggen om toegang te krijgen tot de extra opties van Ronexs!<hr><br>
        
        <table width=100% border=0 cellpadding=0 cellspacing=0>
        <tr>
            <td width=50% height=24>Gebruikersnaam</td>
            <td width=50% height=24><input type=text name=gebruikersnaam></td>
        </tr>
        <tr>
            <td width=50% height=24>Wachtwoord</td>
            <td width=50% height=24><input type=password name=wachtwoord></td>
        </tr>
        <tr>
            <td width=50% height=24>Tijd ingelogd</td>
            <td width=50% height=24><select size=1 name=tijdingelogd>
            <option value=22118400>Een jaar</option>
            <option value=18144000>Een maand</option>
            <option value=604800>Een week</option>
            <option value=86400>Een dag</option>
            <option value=3600>Een uur</option>
            <option value=1800>Half uur</option>
            </select></td>
        </tr>

        <tr>

            <td width=50% height=24>Bevestigen</td>
            <td width=50% height=24><input type=submit name=submit value=Inloggen></td>
        </tr>
        </table>"[/COLOR][COLOR= #007700];[/COLOR]

        eindetabel[COLOR= #007700]();

    }

}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]

    begintabel[COLOR= #007700]([/COLOR][COLOR= #DD0000]"Foutmelding"[/COLOR][COLOR= #007700]);[/COLOR]

    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U bent al ingelogd op een andere account!"[/COLOR][COLOR= #007700];[/COLOR]

    eindetabel[COLOR= #007700]();

}[/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"footer.php"[/COLOR][COLOR= #007700]);[/COLOR]

?>


hij moet dus met md5 inloggen.

//Hij kan niet inloggen ook bij het inloggen zonder md5 lukt het niet. weet iemand met ervaring van ronexs systeem hoe je dit oplost?

Maffiaklik

modedit: 2 berichten samengevoegd
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij kan niet inloggen ook bij het inloggen zonder md5 lukt het niet. weet iemand met ervaring van ronexs systeem hoe je dit oplost?

Edit: sorry voor dubbelpost.!
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Ik heb het systeem gemaakt dus heb er ervaring mee ja, wat voor fout melding krijg je?!
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik kan niet inloggen, ik log in en dan word ik doorgelinkt naar de home zonder dat ik een fout krijg ofs.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Dan gaat er iets mis tijdens het plaatsen van de cookie hash.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Dat systeem is kaka
Maak beter een nieuw
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Inderdaad, het systeem zuigt als de pleures emo!
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