Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2014
    Posts
    5

    Unanswered: asp mssql register with md5 no effect

    hi all i hope some one can help me about this..

    here my register page.
    not my problem is .. my database working fine,
    after register all will be insert .. but md5 not work fine

    i need to configure for md5 30text
    i hope some one can correct me.. thank you. because have this forum


    <!--#include file="inc/conn.asp"-->
    <!--#include file="inc/lib.asp"-->
    <!--#include file="inc/md5.asp"-->
    <!--#include file="inc/config.asp"-->

    <%
    if(request("action")="save") then
    UserName = GetPostField("UserName")
    oldpass = GetPostField("oldpass")
    moldpass = GetPostField("moldpass")
    ans = GetPostField("ans")
    quest = GetPostField("quest")
    email = GetPostField("email")
    num = GetPostField("num")
    qq = GetPostField("qq")
    CheckCode = GetPostField("Checkcode")

    checkzw(UserName)

    If CheckCode=Empty Or Trim(Session("MuGetCode"))<>CheckCode Then
    msg("д֤ϵͳIJһ£" )
    end if

    if num="0" then msg("Բ,֤Ϊ")

    if(ChkInvaildWord(UserName) or ChkInvaildWord(email) or ChkInvaildWord(oldpass) or ChkInvaildWord(moldpass) or ChkInvaildWord(quest) or ChkInvaildWord(ans) or ChkInvaildWord(num) or ChkInvaildWord(qq) or ChkInvaildWord(ServerCode)) then
    msg("벻ҪǷַ")
    end if

    if oldpass <> moldpass then
    msg("벻ͬ")
    end if

    md5pass=md5(oldpass,32)
    md5User=md5(UserName,32)

    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open "Select * from usertbl where Account='"&UserName&"'",conn
    query = "select account from usertbl where passwd = '" & oldpass & "'"
    if Not rs.Eof then
    rs.close
    msg("ûѾ*עᣬʹû")
    else


    conn.execute("insert into usertbl (Account,passwd) values ('"& UserName &"','"& oldpass &"') ")

    rs.close


    'עͽǮ

    set rs = nothing
    set rs1 = nothing
    msg "ϲ,עɹ"
    End If

    else

    msg3("IpϢѾ*¼벻ҪǷύ")

    end if
    %>

  2. #2
    Join Date
    Jun 2014
    Posts
    5

    Fix Password

    now i change
    conn.execute("insert into usertbl (Account,passwd) values ('"& UserName &"','"& md5(oldpass,30) &"') ")

    all is work now with md5

    but
    i dont get for 30 password
    i get only for 16 password where i missing part?

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    First off, and most importantly: your code is ripe for SQL-injection. Plenty of information available on the topic from your favourite search engine.

    Obligatory: https://xkcd.com/327/

    Why not display the raw values on screen = this will help you debug:
    Code:
    Response.Write oldpass
    Response.Write md5(oldpass, 30)
    Response.Write md5(oldpass)
    Response.End
    What md5 library are you using?
    George
    Home | Blog

  4. #4
    Join Date
    Jun 2014
    Posts
    5

    2 password md5

    after register i get this :7a57a5a743894a0e
    i want make it to : fedab211a451c9bf6c7188e50ed878

    that md5 code is same [ admin ]

    where can i change it to 30text?

  5. #5
    Join Date
    Jun 2014
    Posts
    5

    here my register page with md5 private route

    here my the script Link : https://www.sendspace.com/file/zdzfre
    just run SmartServer All Website ASP working On Port 80

  6. #6
    Join Date
    Jun 2014
    Posts
    5

    md5 30

    i want make md5 30 text like this.. this is not normal md5 this private code

    fedab211a451c9bf6c7188e50ed878

    i want use this for offline registration server..

    so i stuck now because only get 16 text password

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •