» Site Navigation | | | » Advertisement | | | » Recent Threads | | | | | | | | | | | |  | |  | [vb6] TEXT File Encryptor |  |
04-27-2007, 10:27 PM
|
#1 (permalink)
| Banned
Join Date: Feb 2007 Posts: 87
GPoints: 24 Rep Power: 0 | [vb6] TEXT File Encryptor Heh I was bored one day :P Learn From it. PHP Code: Function Encrypt(infile As String) As Boolean Dim Fileno1 As Integer Dim Fileno2 As Integer Dim outfile As String Dim xpos As Long Dim x As Byte MousePointer = vbHourglass xpos = 4 outfile = "c:\temp.enc" Fileno1 = FreeFile Open infile For Binary As Fileno1 Fileno2 = FreeFile Open outfile For Binary As Fileno2 Put #Fileno2, 1, 0 Put #Fileno2, 2, 128 Put #Fileno2, 3, 0 Put #Fileno2, 4, 128 Do While Not EOF(Fileno1) xpos = xpos + 1 Get #Fileno1, xpos, x Put #Fileno2, xpos, x + 128 Loop Close Fileno2 Close Fileno1 Kill infile FileCopy outfile, infile Kill outfile Encrypt = True MousePointer = vbNormal End Function Private Function Decrypt(infile As String) As Boolean Dim Fileno1 As Integer Dim Fileno2 As Integer Dim outfile As String Dim xpos As Long Dim x As Byte Dim t(3) As Byte MousePointer = vbHourglass xpos = 4 outfile = "c:\temp.enc" Fileno1 = FreeFile Open infile For Binary As Fileno1 Fileno2 = FreeFile Open outfile For Binary As Fileno2 Get #Fileno2, 1, t(0) Get #Fileno2, 2, t(1) Get #Fileno2, 3, t(2) Get #Fileno2, 4, t(3) If (t(o) = 0 And t(1) = 128 And t(2) = 0 And t(3) = 128) Then Open Oufile For Binary As Fileno2 Do While Not EOF(Fileno1) xpos = xpos + 1 Get #Fileno1, xpos, x Put #Fileno2, xpos, -128 Loop Close Fileno2 Decrypt = True Else Decrypt = False Close Fileno1 If Decrypt Then Kill infile FileCopy outfile, infile Kill outfile End If MousePointer = vbNormal End If End Function
Function GetFile() As String dlgFile.CancelError = True On Error GoTo Filerr dlgFile.DialogTitle = "Select a File..." dlgFile.DefaultExt = "*.txt" dlgFile.Filter = "Text FIles (*.txt)|*.txt|" & " All Files (*.*)|*.*" dlgFile.FilterIndex = 1 dlgFile.MaxFileSize = 32767 dlgFile.ShowOpen GetFile = dlgFile.filename Exit Function Filerr: GetFile = "" End Function
Private Sub mnuActDecrypt_Click() Dim filename As String filename = GetFile() If filename <> "" Then If Decrypt(filename) = False Then MsgBox "Error Decrypting File" End If End If End Sub
Private Sub mnuActEncrypt_Click() Dim filename As String filename = GetFile() If filename <> "" Then If Encrypt(filename) = False Then MsgBox "Error Encrypting File!" End If End If End Sub
| |
| |  |
04-29-2007, 10:11 AM
|
#2 (permalink)
| Banned
Join Date: Apr 2007 Posts: 95
GPoints: 5 Rep Power: 0 | Does the Decrypt work this time? | |
| |
05-01-2007, 02:36 PM
|
#3 (permalink)
| Banned
Join Date: Feb 2007 Posts: 87
GPoints: 24 Rep Power: 0 | yes. you know what. If all your going to do is comment my s**t and say bad things than f**k you man. Im a better programmer than you, stop trying to act cool. | |
| |
05-02-2007, 04:48 PM
|
#4 (permalink)
| Æthean
Join Date: Nov 2006 Location: Ontario Age: 18 Posts: 1,294
GPoints: 580 Rep Power: 9 | Quote:
Originally Posted by Rockage yes. you know what. If all your going to do is comment my s**t and say bad things than f**k you man. Im a better programmer than you, stop trying to act cool. | He just asked if it worked... | |
| |
05-02-2007, 06:17 PM
|
#5 (permalink)
| | | Quote:
Originally Posted by Rockage yes. you know what. If all your going to do is comment my s**t and say bad things than f**k you man. Im a better programmer than you, stop trying to act cool. | Programming Battle! | |
| |
05-04-2007, 09:22 PM
|
#6 (permalink)
| Banned
Join Date: Feb 2007 Posts: 87
GPoints: 24 Rep Power: 0 | Bring it. Zachafer cant program for s**t by himself. He'd probably rip w/e he did make from pscode or some program book. Quote: |
He just asked if it worked...
| read between the lines. Its an immature attempt to hurt me. | |
| |
05-04-2007, 09:25 PM
|
#7 (permalink)
| Æthean
Join Date: Nov 2006 Location: Ontario Age: 18 Posts: 1,294
GPoints: 580 Rep Power: 9 | Quote:
Originally Posted by Rockage Bring it. Zachafer cant program for s**t by himself. He'd probably rip w/e he did make from pscode or some program book.
read between the lines. Its an immature attempt to hurt me. | Quote: |
Does the Decrypt work this time?
| I dont quite see it.. can you explain how it was an attempt to hurt you  | |
| |
05-04-2007, 09:30 PM
|
#8 (permalink)
| Banned
Join Date: Feb 2007 Posts: 87
GPoints: 24 Rep Power: 0 | Quote: |
I dont quite see it.. can you explain how it was an attempt to hurt you
| Sure can. I have gotten zach banned at a number of other forums for ripping code from sites. He had just sent me a message on msn saying something like "text file encryptor, read my response  " and I said ok. Hes just trying to make me look as bad as him. If you dont get that sorry, I cant really explain it, but I find it quite obvious. | |
| |
05-05-2007, 09:57 AM
|
#9 (permalink)
| Junior Member
Join Date: May 2007 Location: Hiram, Georgia Posts: 42
GPoints: 1 Rep Power: 5 | Quote:
Originally Posted by Rockage Sure can. I have gotten zach banned at a number of other forums for ripping code from sites. He had just sent me a message on msn saying something like "text file encryptor, read my response  " and I said ok. Hes just trying to make me look as bad as him. If you dont get that sorry, I cant really explain it, but I find it quite obvious. | it's called a cyber bully, just laugh at the lifeless losers like that and move on
there's 2 cases here, either a. he's wondering if it works because he admires your programming skills and is interested in it, or b. he's pathetically making a sarcastic comment in attempts to boost his own confidence
__________________ | |
| |
05-05-2007, 11:33 AM
|
#10 (permalink)
| Banned
Join Date: Feb 2007 Posts: 100
GPoints: 20 Rep Power: 0 | LMAO at zachafer
learn more about vb before you talk shit | |
| |  | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |