| | |
zRanP - Randomly generate passwords (.NET)
I've also posted this on programmingforums: http://www.programmingforums.org/thread20557-4.html
Screenshot:
http://i59.photobucket.com/albums/g2...03X/zranp2.png
As it says in the title, zRanP is a program to randomly generate secure passwords of varying lengths (of which are defined by you, the user). zRanP can either generate from ascii characters 33 to 126 (excluding ascii char 34, which is the space character), or generate only alphanumerals or symbols seperately on their own; with each new generated password, a strength meter will inform you of how strong that password is. In addition to randomly generating passwords, you can also type in any other password, and as you type, the strength meter will change according to what you've typed so far.
I am releasing both the full source code (project and all), and a compiled executable. zRanP is written by myself in VB.NET 2008, so you will need the latest version of the .NET framework installed in order to make use of it.
In using zRanP, you agree to the license quoted below (don't worry, it basically lets you do anything you like with this software. I've only put a copyright on it so that I can include a legal disclaimer in order to protect my ass. But do read the license so that you know and understand your rights).
To-do in the future:
- Make it possible to save these passwords to a plain text file or some kind of database, for later reference (obviously some of the passwords generated will be a little too difficult to remember)
- With the aid of a dictionary list, check in each password string generated for any words that appear in a dictionary.
- Check against each string generated to see if all four sets are present (uppercase, lowercase, numbers, and symbols), and at the user's control, decide upon whether to display these passwords. I.e. if the user wants all four sets, that user will get it.
For those who want to quickly take a peek at the source code before downloading, here it is:
Files to download are attached below:
Screenshot:
http://i59.photobucket.com/albums/g2...03X/zranp2.png
As it says in the title, zRanP is a program to randomly generate secure passwords of varying lengths (of which are defined by you, the user). zRanP can either generate from ascii characters 33 to 126 (excluding ascii char 34, which is the space character), or generate only alphanumerals or symbols seperately on their own; with each new generated password, a strength meter will inform you of how strong that password is. In addition to randomly generating passwords, you can also type in any other password, and as you type, the strength meter will change according to what you've typed so far.
I am releasing both the full source code (project and all), and a compiled executable. zRanP is written by myself in VB.NET 2008, so you will need the latest version of the .NET framework installed in order to make use of it.
In using zRanP, you agree to the license quoted below (don't worry, it basically lets you do anything you like with this software. I've only put a copyright on it so that I can include a legal disclaimer in order to protect my ass. But do read the license so that you know and understand your rights).
•
•
•
•
' zRanP, written by NightCrawler03X
' Copyright (C) 2009 NightCrawler03X, All Rights Reserved
' In regards to this software, permission to use, copy, modify, reproduce, redistribute (under the definitions of international copyright law),
' is hereby granted, but the above copyright notice must remain, and the following disclaimer applies:
'' ''THIS SOFTWARE IS PROVIDED ''AS IS'', AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
'' ''THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
'' ''THE COPYRIGHT HOLDER OF THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
'' ''BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERUPTION)
'' ''HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
'' ''(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
'' ''OF SUCH DAMAGE.
'' Should you have any questions, direct them to nightcrawler03x@gmail.com
'' You may also find me under the following aliases at the following forums (just sign up and send me a private message):
'' zerohero (http://forums.xkcd.com),
'' NightCrawler03X (http://www.ubuntuforums.org, http://www.programmingforums.org, http://www.daniweb.com)
- Make it possible to save these passwords to a plain text file or some kind of database, for later reference (obviously some of the passwords generated will be a little too difficult to remember)
- With the aid of a dictionary list, check in each password string generated for any words that appear in a dictionary.
- Check against each string generated to see if all four sets are present (uppercase, lowercase, numbers, and symbols), and at the user's control, decide upon whether to display these passwords. I.e. if the user wants all four sets, that user will get it.
For those who want to quickly take a peek at the source code before downloading, here it is:
VB.NET Syntax (Toggle Plain Text)
' zRanP, written by NightCrawler03X ' Copyright (C) 2009 NightCrawler03X, All Rights Reserved ' In regards to this software, permission to use, copy, modify, reproduce, redistribute (under the definitions of international copyright law), ' is hereby granted, but the above copyright notice must remain, and the following disclaimer applies: '' ''THIS SOFTWARE IS PROVIDED ''AS IS'', AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, '' ''THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL '' ''THE COPYRIGHT HOLDER OF THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, '' ''BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERUPTION) '' ''HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT '' ''(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY '' ''OF SUCH DAMAGE. '' Should you have any questions, direct them to nightcrawler03x@gmail.com '' You may also find me under the following aliases at the following forums (just sign up and send me a private message): '' zerohero (http://forums.xkcd.com), '' NightCrawler03X (http://www.ubuntuforums.org, http://www.programmingforums.org, http://www.daniweb.com) Public Class zGenP Private omitSymbols As Boolean = False Private omitAlpha As Boolean = False Private Function generatePassword(ByRef minLength As Integer, ByRef maxLength As Integer, _ ByRef disableSymbols As Boolean, ByRef disableAlpha As Boolean) As String Dim s As String = "" : Dim passwordLength As Integer = 0 : generatePassword = "" Do : Randomize() : passwordLength = Convert.ToInt32(minLength + Int(Rnd() * (maxLength - minLength))) Loop Until passwordLength >= minLength For i As Integer = 1 To passwordLength Step 1 : Randomize() Do : Do : Do : s = Chr(Convert.ToInt32(33 + Int(Rnd() * 94))) Loop Until Not s = Chr(34) If disableSymbols And (s Like "#" Or Not qChr(s) = 0) Then Exit Do _ Else If Not disableSymbols Then Exit Do Loop If disableAlpha And Not (s Like "#" Or Not qChr(s) = 0) Then Exit Do _ Else If Not disableAlpha Then Exit Do Loop : generatePassword += s : Next End Function Private Function strengthPassword(ByRef s As String) As String Dim aPos As Integer = 0 If boolAZ(s) Then aPos += 1 If chrSort(s) Then aPos += 1 If qwertySort(s) Then aPos += 1 If s.Length >= 12 Then aPos += 1 Select Case aPos : Case 0 : Return "pathetic" : Case 1 : Return "weak" Case 2 : Return "medium" : Case 3 : Return "strong" Case 4 : Return "very strong" : End Select : Return "?strength?" End Function Private Function boolAZ(ByRef s As String) As Boolean Dim iCaps As Integer = 0 : Dim iLowers As Integer = 0 : Dim iDigits As Integer = 0 For j As Integer = 1 To s.Length Step 1 Dim iTemp As Integer = System.Convert.ToInt32(System.Convert.ToChar(Mid(s, j, 1))) If iTemp >= 65 And iTemp <= 90 Then iCaps += 1 _ Else If iTemp >= 97 And iTemp <= 122 Then iLowers += 1 _ Else If iTemp >= 48 And iTemp <= 57 Then iDigits += 1 Next If iCaps >= 2 And iLowers >= 2 And iDigits >= 2 Then Return True Return False End Function Private Function qChr(ByRef s As String) As Integer Select Case s.ToLower Case "q" : Return 1 : Case "w" : Return 2 : Case "e" : Return 3 : Case "r" : Return 4 Case "t" : Return 5 : Case "y" : Return 6 : Case "u" : Return 7 : Case "i" : Return 8 Case "o" : Return 9 : Case "p" : Return 10 : Case "a" : Return 11 : Case "s" : Return 12 Case "d" : Return 13 : Case "f" : Return 14 : Case "g" : Return 15 : Case "h" : Return 16 Case "j" : Return 17 : Case "k" : Return 18 : Case "l" : Return 19 : Case "z" : Return 20 Case "x" : Return 21 : Case "c" : Return 22 : Case "v" : Return 23 : Case "b" : Return 24 Case "n" : Return 25 : Case "m" : Return 26 : Case Else : Return 0 : End Select End Function Private Function qwertySort(ByRef s As String) As Boolean Dim iTemp As Integer = 0 : Dim sRel As String = extractAZ(s) For i As Integer = 1 To sRel.Length - 1 Step 1 For j As Integer = 1 To sRel.Length - 1 Step 1 If qChr(Mid(sRel, j, 1)) > qChr(Mid(sRel, j + 1, 1)) Then iTemp += 1 : Dim sTemp As String = Mid(extractAZ(s), j, 1) Mid(sRel, j, 1) = Mid(extractAZ(s), j + 1, 1) : Mid(sRel, j + 1, 1) = sTemp End If : Next : Next If iTemp >= sRel.Length Then Return True Else Return False End Function Private Function chrSort(ByRef s As String) As Boolean Dim iTemp As Integer = 0 For i As Integer = 1 To s.Length - 1 Step 1 For j As Integer = 1 To s.Length - 1 Step 1 If System.Convert.ToInt32(System.Convert.ToChar(Mid(s, j, 1))) _ > System.Convert.ToInt32(Convert.ToChar(Mid(s, j + 1, 1))) Then iTemp += 1 : Dim sTemp As String = Mid(s, j, 1) Mid(s, j, 1) = Mid(s, j + 1, 1) : Mid(s, j + 1, 1) = sTemp End If : Next : Next If iTemp >= s.Length Then Return True Else Return False End Function Private Function extractAZ(ByRef s As String) As String extractAZ = "" : For i As Integer = 1 To s.Length Step 1 If Mid(s, i, 1).ToLower Like "[a-f]" Then extractAZ += Mid(s, i, 1) Next End Function Private Sub btnGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGenerate.Click Try : If cboOmitSym.Checked Then omitSymbols = True Else omitSymbols = False If cboOmitAlpha.Checked Then omitAlpha = True Else omitAlpha = False If Convert.ToInt32(cboMin.Text) > Convert.ToInt32(cboOut.Text) Then txtOutput.Text = "ERROR: Minimum length is amove maximum" txtStrength.Text = "" ElseIf cboOmitAlpha.Checked And cboOmitSym.Checked Then txtOutput.Text = "ERROR: Both checkboxes are checked" txtStrength.Text = "" Else txtOutput.Text = generatePassword(Convert.ToInt32(cboMin.Text), Convert.ToInt32(cboOut.Text), omitSymbols, omitAlpha) End If Catch ex As Exception : txtOutput.Text = "ERROR: Minimum or maximum cannot be null" txtStrength.Text = "" : End Try End Sub Private Sub zGenP_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For i As Integer = 4 To 48 Step 4 cboMin.Items.Add(i.ToString) : cboOut.Items.Add(i.ToString) : Next cboMin.SelectedIndex = 0 : cboOut.SelectedIndex = 0 End Sub Private Sub txtOutput_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOutput.TextChanged Dim sTemp As String = txtOutput.Text txtStrength.Text = strengthPassword(sTemp) End Sub Private Sub cboMin_KeyPress(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cboMin.KeyPress If e.KeyChar.ToString Like "#" Or e.KeyChar.ToString = Chr(8) Then Else : e.KeyChar = Nothing : End If End Sub Private Sub cboOut_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cboOut.KeyPress If e.KeyChar.ToString Like "#" Or e.KeyChar.ToString = Chr(8) Then Else : e.KeyChar = Nothing : End If End Sub Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click End End Sub End Class
Files to download are attached below:
Last edited by NightCrawler03X; Feb 13th, 2009 at 2:36 pm.
•
•
•
•
0
New version:
Screenshots:
http://i59.photobucket.com/albums/g2...p_007_save.png
http://i59.photobucket.com/albums/g2...p_007_load.png
New features:
- Save/Load: The size of the window increases when "Load" is checked, making room for the textbox where the loaded file content is written to, and upon clicking the load button, the contents of the file are displayed in the textbox. The size of the window returns to it's default when "save" is checked. *
- In addition to the above, I have also somewhat cleaned up some code
* keep note that the passwords are written to plain text files. This means that absolutely anyone can read them. I would try to encrypt these files, but unfortunately I do not yet know how to do that. However, there is an excellent (open-source, and available free of charge) utility called "TrueCrypt" --> http://www.truecrypt.org. I recommend using truecrypt to make a virtual volume, encrypt it, and set a password on it ( heh, try one of the "very strong" passwords that zRanP generates
). Upon creating this virtual volume, you can then mount it like a real hard disc, and access it as a regular drive letter via windows explorer; if you want to keep these stored passwords secure, store it in that virtual, encrypted volume.
As for actual encryption/hashing, I recommend AES-256 encryption, and RIPEMD-160 hashing; but of course, I leave the choice up to you. Twofish encryption and SHA-512 hashing is also a good choice.
Here is the source code, in case you want to take a look before downloading:
Compiled executable and full source code included, linked below:
Screenshots:
http://i59.photobucket.com/albums/g2...p_007_save.png
http://i59.photobucket.com/albums/g2...p_007_load.png
New features:
- Save/Load: The size of the window increases when "Load" is checked, making room for the textbox where the loaded file content is written to, and upon clicking the load button, the contents of the file are displayed in the textbox. The size of the window returns to it's default when "save" is checked. *
- In addition to the above, I have also somewhat cleaned up some code
* keep note that the passwords are written to plain text files. This means that absolutely anyone can read them. I would try to encrypt these files, but unfortunately I do not yet know how to do that. However, there is an excellent (open-source, and available free of charge) utility called "TrueCrypt" --> http://www.truecrypt.org. I recommend using truecrypt to make a virtual volume, encrypt it, and set a password on it ( heh, try one of the "very strong" passwords that zRanP generates
). Upon creating this virtual volume, you can then mount it like a real hard disc, and access it as a regular drive letter via windows explorer; if you want to keep these stored passwords secure, store it in that virtual, encrypted volume. As for actual encryption/hashing, I recommend AES-256 encryption, and RIPEMD-160 hashing; but of course, I leave the choice up to you. Twofish encryption and SHA-512 hashing is also a good choice.
Here is the source code, in case you want to take a look before downloading:
VB.NET Syntax (Toggle Plain Text)
' zRanP, written by NightCrawler03X ' Copyright (C) 2009 NightCrawler03X, All Rights Reserved ' In regards to this software, permission to use, copy, modify, reproduce, redistribute (under the definitions of international copyright law), ' is hereby granted, but the above copyright notice must remain, and the following disclaimer applies: '' ''THIS SOFTWARE IS PROVIDED ''AS IS'', AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, '' ''THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL '' ''THE COPYRIGHT HOLDER OF THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, '' ''BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERUPTION) '' ''HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT '' ''(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY '' ''OF SUCH DAMAGE. '' Should you have any questions, direct them to nightcrawler03x@gmail.com '' You may also find me under the following aliases at the following forums (just sign up and send me a private message): '' zerohero (http://forums.xkcd.com), '' NightCrawler03X (http://www.ubuntuforums.org, http://www.programmingforums.org, http://www.daniweb.com) Public Class zGenP Private omitSymbols As Boolean = False Private omitAlpha As Boolean = False Private Function generatePassword(ByRef minLength As Integer, ByRef maxLength As Integer, _ ByRef disableSymbols As Boolean, ByRef disableAlpha As Boolean) As String Dim s As String = "" : Dim passwordLength As Integer = 0 : generatePassword = "" Do : Randomize() : passwordLength = Convert.ToInt32(minLength + Int(Rnd() * (maxLength - minLength))) Loop Until passwordLength >= minLength : For i As Integer = 1 To passwordLength Step 1 : Randomize() Do : Do : Do : s = Chr(Convert.ToInt32(33 + Int(Rnd() * 94))) Loop Until Not s = Chr(34) Loop Until (disableSymbols And (s Like "#" Or Not qChr(s) = 0)) Or Not disableSymbols Loop Until (disableAlpha And Not (s Like "#" Or Not qChr(s) = 0)) Or Not disableAlpha : generatePassword += s : Next End Function Private Function strengthPassword(ByRef s As String) As String Dim i As Integer = 0 If boolAZ(s) Then i += 1 : If chrSort(s) Then i += 1 If qwertySort(s) Then i += 1 : If s.Length >= 12 Then i += 1 Select Case i Case 0 : Return "pathetic" : Case 1 : Return "weak" Case 2 : Return "medium" : Case 3 : Return "strong" Case 4 : Return "very strong" : End Select End Function Private Function qChr(ByRef s As String) As Integer Select Case s.ToLower Case "q" : Return 1 : Case "w" : Return 2 : Case "e" : Return 3 Case "r" : Return 4 : Case "t" : Return 5 : Case "y" : Return 6 Case "u" : Return 7 : Case "i" : Return 8 : Case "o" : Return 9 Case "p" : Return 10 : Case "a" : Return 11 : Case "s" : Return 12 Case "d" : Return 13 : Case "f" : Return 14 : Case "g" : Return 15 Case "h" : Return 16 : Case "j" : Return 17 : Case "k" : Return 18 Case "l" : Return 19 : Case "z" : Return 20 : Case "x" : Return 21 Case "c" : Return 22 : Case "v" : Return 23 : Case "b" : Return 24 Case "n" : Return 25 : Case "m" : Return 26 : Case Else : Return 0 End Select End Function Private Function extractAZ(ByRef s As String) As String extractAZ = "" : For i As Integer = 1 To s.Length Step 1 If Mid(s, i, 1).ToLower Like "[a-f]" Then extractAZ += Mid(s, i, 1) Next End Function Private Function qwertySort(ByRef s As String) As Boolean Dim iTemp As Integer = 0 : Dim sRel As String = extractAZ(s) For i As Integer = 1 To sRel.Length - 1 Step 1 For j As Integer = 1 To sRel.Length - 1 Step 1 If qChr(Mid(sRel, j, 1)) > qChr(Mid(sRel, j + 1, 1)) Then iTemp += 1 : Dim sTemp As String = Mid(extractAZ(s), j, 1) Mid(sRel, j, 1) = Mid(extractAZ(s), j + 1, 1) : Mid(sRel, j + 1, 1) = sTemp End If : Next : Next If iTemp >= sRel.Length Then Return True Else Return False End Function Private Function chrSort(ByRef s As String) As Boolean Dim iTemp As Integer = 0 : For i As Integer = 1 To s.Length - 1 Step 1 For j As Integer = 1 To s.Length - 1 Step 1 If System.Convert.ToInt32(System.Convert.ToChar(Mid(s, j, 1))) _ > System.Convert.ToInt32(Convert.ToChar(Mid(s, j + 1, 1))) Then iTemp += 1 : Dim sTemp As String = Mid(s, j, 1) Mid(s, j, 1) = Mid(s, j + 1, 1) : Mid(s, j + 1, 1) = sTemp End If : Next : Next If iTemp >= s.Length Then Return True Else Return False End Function Private Function boolAZ(ByRef s As String) As Boolean Dim iCaps As Integer = 0 : Dim iLowers As Integer = 0 : Dim iDigits As Integer = 0 For j As Integer = 1 To s.Length Step 1 Dim iTemp As Integer = System.Convert.ToInt32(System.Convert.ToChar(Mid(s, j, 1))) If iTemp >= 65 And iTemp <= 90 Then iCaps += 1 _ Else If iTemp >= 97 And iTemp <= 122 Then iLowers += 1 _ Else If iTemp >= 48 And iTemp <= 57 Then iDigits += 1 Next If iCaps >= 2 And iLowers >= 2 And iDigits >= 2 Then Return True Else Return False End Function Private Sub btnGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGenerate.Click Try:If cboOmitSym.Checked Then omitSymbols = True Else omitSymbols = False If cboOmitAlpha.Checked Then omitAlpha = True Else omitAlpha = False If Convert.ToInt32(cboMin.Text) > Convert.ToInt32(cboOut.Text) Then txtOutput.Text = "ERROR: Minimum length is amove maximum" : txtStrength.Text = "" ElseIf cboOmitAlpha.Checked And cboOmitSym.Checked Then txtOutput.Text = "ERROR: Both checkboxes are checked" : txtStrength.Text = "" Else : txtOutput.Text = generatePassword(Convert.ToInt32(cboMin.Text), Convert.ToInt32(cboOut.Text), omitSymbols, omitAlpha) : End If Catch ex As Exception : txtOutput.Text = "ERROR: Minimum or maximum cannot be null" : txtStrength.Text = "" : End Try End Sub Private Sub zGenP_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For i As Integer = 4 To 48 Step 4 : cboMin.Items.Add(i.ToString) : cboOut.Items.Add(i.ToString) : Next cboMin.SelectedIndex = 0 : cboOut.SelectedIndex = 0 txtFilePath.Text = "C:\" : rdbSave.Checked = True End Sub Private Sub txtOutput_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOutput.TextChanged Dim sTemp As String = txtOutput.Text : txtStrength.Text = strengthPassword(sTemp) End Sub Private Sub cboMin_KeyPress(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cboMin.KeyPress, cboOut.KeyPress If Not (e.KeyChar.ToString Like "#" Or e.KeyChar.ToString = Chr(8)) Then e.KeyChar = Nothing End Sub Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click End End Sub Private Sub btnReadWrite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReadWrite.Click If (rdbSave.Checked And txtOutput.Text.Length > 0) And Not Mid(txtStrength.Text, 1, 1) = "E" Then Try : FileOpen(1, txtFilePath.Text, OpenMode.Append) WriteLine(1, txtOutput.Text + " " + txtStrength.Text) : FileClose(1) txtFileError.Text = "Written" Catch ex As Exception : txtFileError.Text = "Invalid Path" : End Try ElseIf rdbLoad.Checked Then : rtxtFileContent.Text = "" Try : FileOpen(1, txtFilePath.Text, OpenMode.Input) txtFileError.Text = "Loaded" Do Until EOF(1) Dim sTemp As String = "" : Input(1, sTemp) rtxtFileContent.Text &= sTemp + Chr(13) + Chr(13) : Loop FileClose(1) Catch ex As Exception : txtFileError.Text = "Invalid Path" : End Try End If End Sub Private Sub rdbSave_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdbSave.CheckedChanged txtFileError.Text = "" If rdbSave.Checked Then : rtxtFileContent.Text = Nothing Me.Size = New Size(515, 132) : btnReadWrite.Text = "Save" Else : Me.Size = New Size(515, 305) btnReadWrite.Text = "Load" : End If End Sub End Class
•
•
•
•
' zRanP, written by NightCrawler03X
' Copyright (C) 2009 NightCrawler03X, All Rights Reserved
' In regards to this software, permission to use, copy, modify, reproduce, redistribute (under the definitions of international copyright law),
' is hereby granted, but the above copyright notice must remain, and the following disclaimer applies:
'' ''THIS SOFTWARE IS PROVIDED ''AS IS'', AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
'' ''THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
'' ''THE COPYRIGHT HOLDER OF THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
'' ''BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERUPTION)
'' ''HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
'' ''(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
'' ''OF SUCH DAMAGE.
'' Should you have any questions, direct them to nightcrawler03x@gmail.com
'' You may also find me under the following aliases at the following forums (just sign up and send me a private message):
'' zerohero (http://forums.xkcd.com),
'' NightCrawler03X (http://www.ubuntuforums.org, http://www.programmingforums.org, http://www.daniweb.com)
Last edited by NightCrawler03X; Feb 14th, 2009 at 3:41 pm.
| Thread Tools | Search this Thread |
.net advertisment applicationreengineering avoiddatacharges bbc blog botnet browser c# c++ captcha check coder coderisland crime cross development downloader email emeraldsoftwaregroup erp erpsystems evaluation examples feeds free freewebapp gre hack header http humanresources infosec intercage itconsulting java kittens law legal linux mailinglist mdd messagelabs.research mobile news onboarding opensource operatingsystem opinion outsourcing paperless pdf phishing photos php platform programming programmingforum project projects pumpanddump python rabihtawil realestatedirectory rolex samples screenshot selection software softwaredevelopment softwaresolutions spam spammer spammers spamming suggestion systemintegration testers tests timer toolbar trends twitter txt verbal viagra visual web website windows windows7 windows7review worldofwarcraft



