自制服务器| “连接"问题 [英] Self made server | "Connecting" Problem

查看:111
本文介绍了自制服务器| “连接"问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
这是我的第一篇文章,因此如有任何错误,请原谅我.
好的,我正在使用vb.net制作在线Yu-Gi-Oh纸牌游戏
因此,首先我制作了服务器(免费的网络主机),然后使用MD5哈希加密(不可解密)制作了注册表单,该表单在主机中创建了一个文件,用户名作为其名称,加密的密码作为其文本.

这可以正常工作,但问题是我的登录代码.
它似乎不起作用.

Hello guys.
This is my first post so please forgive me for any error.
Ok I am making a Online Yu-Gi-Oh card game with vb.net
So first I made the server (a free webhost) then I made a signup form with MD5 hash encryption (Not decryptable)that creates a file in the host with the Username as its name, and encrypted password as its text.

This works fine but the problem is my Log In code.
It does not seem to work.

Dim username As String
    Dim passwordclient As String
    Dim passwordserver As String
    Dim encrypted As String

'Login Button (Click)
    Private Sub loginbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loginbutton.Click
        loginbutton.Image = My.Resources.largeButton_orange_down

        'Check if blank
        If TextBox1.Text.Length = 0 Or TextBox2.Text.Length = 0 Then
            MsgBox("One of the fields is blank.")
            Exit Sub
        Else
            username = TextBox1.Text
            passwordclient = TextBox2.Text
        End If
        encrypted = StringToMD5(passwordclient)

        'Server connection
        WebBrowser1.Navigate("http://yugioh.hes78.com/" & username)
        'Goes to WebBrowser1_DocumentCompleted

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        
passwordserver = WebBrowser1.DocumentText

        If encrypted = passwordserver Then
            Form2.Show()
            Me.Hide()

        Else
            MsgBox("Error")
        End If

    End Sub



单击登录按钮时,它总是在最后显示错误msgbox.



It always shows the error msgbox at the end, when I click the login button.
Thanks.

推荐答案

^ ]属性不仅包含密码,还包含更多内容.您需要分析文档以找到要进行比较的正确字段.您还应该知道,MD5是可以很容易破解的哈希,它不是加密.
The DocumentText[^] property contains much more that just the password. You need to parse the document to find the correct field to compare against. You should also know that MD5 is a hash that can be cracked fairly easily, it is not an encryption.


没关系,我让它起作用了.
还是谢谢你.
Nevermind i got it working.
Thanks anyway.


这篇关于自制服务器| “连接"问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆