Click here to Skip to main content
15,900,378 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Copy data from one excel file to another excel file Pin
Sonhospa12-Jul-10 11:58
Sonhospa12-Jul-10 11:58 
GeneralRe: Copy data from one excel file to another excel file Pin
priyaahh12-Jul-10 18:32
priyaahh12-Jul-10 18:32 
GeneralRe: Copy data from one excel file to another excel file Pin
Syed Wayez Ahmed12-Jul-10 21:18
Syed Wayez Ahmed12-Jul-10 21:18 
AnswerRe: Copy data from one excel file to another excel file Pin
Sonhospa12-Jul-10 22:36
Sonhospa12-Jul-10 22:36 
AnswerRe: Copy data from one excel file to another excel file Pin
Sonhospa13-Jul-10 7:08
Sonhospa13-Jul-10 7:08 
GeneralRe: Copy data from one excel file to another excel file Pin
priyaahh13-Jul-10 7:17
priyaahh13-Jul-10 7:17 
GeneralRe: Copy data from one excel file to another excel file Pin
Sonhospa13-Jul-10 9:20
Sonhospa13-Jul-10 9:20 
Questionretrieve the salt from a mysql database for a password. [modified] Pin
malcomhfc11-Jul-10 9:09
malcomhfc11-Jul-10 9:09 
Hi there. I have a login on my vb.net application. It is using the Joomla database for user management and integration to my website.

However i have hit a problem. The joomla passwords are hashed as MD5 and salted with 32 characters. It looks like this hashpassword:salt

The colon splits the password with the salt. Im just struggling to find out how to retrieve the salt and append it to the password.

So far i have this:


Private Sub BtnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnlogin.Click
        Dim myCommand As New MySqlCommand
        Dim myAdapter As New MySqlDataAdapter
        Dim myData As MySqlDataReader
        'txtEmail.Text.Replace("'", "\'") BoxPassword.Text.Replace("'", "\'")
        Dim SQL As String
        'Our MySQL Query
        Dim Email As String = TxtEmail.Text.Replace("'", "\'")
        Dim password = (getMD5Hash(BoxPassword.Password + ":"))
        SQL = "SELECT * FROM `jos_users` WHERE `username` = '" + Email + "' AND `password` = '" + Password + "'"

        Label1.Content = BoxPassword.Password

        myCommand.Connection = conn
        myCommand.CommandText = SQL
        myAdapter.SelectCommand = myCommand
        Try
            'Try to execute the query
            myData = myCommand.ExecuteReader()
            myData.Read()
            If myData.HasRows = 0 Then 'Checkes if a row with the email and password exist.
                'If no outputs this:
                notifyicon.ShowBalloonTip(3000, "Warning User", "The Email Address and Password that you entered dont match!", Avalon.Windows.Controls.NotifyBalloonIcon.Warning)
                Txtwrongpass.Content = "The Email Address and Password that you entered dont match!"
                myData.Close()
            Else
                'if yes outputs this:
                'notifyicon.ShowBalloonTip(3000, "Welcome " + myData.GetString("fname") + " " + myData.GetString("lname"), "You have sucessfully logged into RemindMe", Avalon.Windows.Controls.NotifyBalloonIcon.Warning)

                Dim loPage1 As New user
                loPage1.Background = Brushes.Gray
                Me.Content = loPage1
                myData.Close()

            End If
        Catch ex As MySqlException
            'If fail outputs MySQL Error
            MsgBox(ex.Message)
        End Try
    End Sub



As you may see if have hashed the password with md5 and attached the ":" colon but i dont know how to retrieve the password.

Any help would be great thanks Smile | :)

modified on Sunday, July 11, 2010 3:34 PM

AnswerRe: retrieve the salt from a mysql database for a password. Pin
DaveAuld11-Jul-10 9:41
professionalDaveAuld11-Jul-10 9:41 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
malcomhfc11-Jul-10 9:55
malcomhfc11-Jul-10 9:55 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
malcomhfc11-Jul-10 10:10
malcomhfc11-Jul-10 10:10 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
DaveAuld11-Jul-10 10:37
professionalDaveAuld11-Jul-10 10:37 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
malcomhfc11-Jul-10 11:39
malcomhfc11-Jul-10 11:39 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
DaveAuld11-Jul-10 12:28
professionalDaveAuld11-Jul-10 12:28 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
malcomhfc11-Jul-10 12:50
malcomhfc11-Jul-10 12:50 
GeneralRe: retrieve the salt from a mysql database for a password. [modified] Pin
DaveAuld11-Jul-10 13:00
professionalDaveAuld11-Jul-10 13:00 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
Luc Pattyn11-Jul-10 13:42
sitebuilderLuc Pattyn11-Jul-10 13:42 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
DaveAuld13-Jul-10 7:57
professionalDaveAuld13-Jul-10 7:57 
QuestionFile copy performance... one more time Pin
Sonhospa11-Jul-10 2:02
Sonhospa11-Jul-10 2:02 
AnswerRe: File copy performance... one more time Pin
Luc Pattyn11-Jul-10 11:01
sitebuilderLuc Pattyn11-Jul-10 11:01 
GeneralRe: File copy performance... one more time Pin
Sonhospa11-Jul-10 12:35
Sonhospa11-Jul-10 12:35 
GeneralRe: File copy performance... one more time Pin
Luc Pattyn11-Jul-10 12:51
sitebuilderLuc Pattyn11-Jul-10 12:51 
QuestionAny way to access Parent Form From a class? Pin
Аslam Iqbal9-Jul-10 21:47
professionalАslam Iqbal9-Jul-10 21:47 
AnswerRe: Any way to access Parent Form From a class? Pin
Luc Pattyn9-Jul-10 22:36
sitebuilderLuc Pattyn9-Jul-10 22:36 
GeneralRe: Any way to access Parent Form From a class? Pin
Аslam Iqbal10-Jul-10 5:03
professionalАslam Iqbal10-Jul-10 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.