Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Selling Tons of Legit...
07-17-2008 06:47 PM
by Crim
Last post by ebilbish
Today 08:51 PM
432 Replies, 4,744 Views
Go to first new post What's your weather?
11-08-2008 04:43 PM
by reirei
Last post by azn fingers
Today 08:51 PM
58 Replies, 355 Views
Go to first new post Instruments, anyone?
10-23-2008 11:50 AM
Last post by azn fingers
Today 08:49 PM
131 Replies, 728 Views
Go to first new post Heather wants to kill a...
Today 06:49 PM
Last post by Unregenerate Passion
Today 08:48 PM
19 Replies, 72 Views
Go to first new post a game you wish they...
11-04-2008 12:37 AM
Last post by azn fingers
Today 08:48 PM
25 Replies, 150 Views
Reply
 
LinkBack Thread Tools Display Modes

 [vb6] TEXT File Encryptor
Old 04-27-2007, 10:27 PM   #1 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
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) = And t(1) = 128 And t(2) = And t(3) = 128Then
                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 
  Reply With Quote

 
Old 04-29-2007, 10:11 AM   #2 (permalink)
Banned

Zachafer is offline
 
Join Date: Apr 2007
Posts: 95
GPoints: 5
iTrader: 0 / 0%
Zachafer Is gaining popularity
Rep Power: 0
Does the Decrypt work this time?
  Reply With Quote

 
Old 05-01-2007, 02:36 PM   #3 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
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.
  Reply With Quote

 
Old 05-02-2007, 04:48 PM   #4 (permalink)
Æthean

Male Aethean is offline
 
Aethean's Avatar
 
Join Date: Nov 2006
Location: Ontario
Age: 18
Posts: 1,294
GPoints: 580
iTrader: 0 / 0%
Aethean Is Popular
Rep Power: 9
Quote:
Originally Posted by Rockage View Post
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...
__________________

  Reply With Quote

 
Old 05-02-2007, 06:17 PM   #5 (permalink)
sockopen
Guest

 
Posts: n/a
GPoints: 0 [Check]
iTrader: / %
Rep Power:
Quote:
Originally Posted by Rockage View Post
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!
  Reply With Quote

 
Old 05-04-2007, 09:22 PM   #6 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
Rep Power: 0
Quote:
Programming Battle!
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.
  Reply With Quote

 
Old 05-04-2007, 09:25 PM   #7 (permalink)
Æthean

Male Aethean is offline
 
Aethean's Avatar
 
Join Date: Nov 2006
Location: Ontario
Age: 18
Posts: 1,294
GPoints: 580
iTrader: 0 / 0%
Aethean Is Popular
Rep Power: 9
Quote:
Originally Posted by Rockage View Post
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
__________________

  Reply With Quote

 
Old 05-04-2007, 09:30 PM   #8 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
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.
  Reply With Quote

 
Old 05-05-2007, 09:57 AM   #9 (permalink)
Junior Member

Male Underdog is offline
 
Underdog's Avatar
 
Join Date: May 2007
Location: Hiram, Georgia
Posts: 42
GPoints: 1
iTrader: 0 / 0%
Underdog Is gaining popularity
Rep Power: 5
Quote:
Originally Posted by Rockage View Post
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
__________________
  Reply With Quote

 
Old 05-05-2007, 11:33 AM   #10 (permalink)
Banned

Bump J is offline
 
Join Date: Feb 2007
Posts: 100
GPoints: 20
iTrader: 0 / 0%
Bump J Is gaining popularity
Rep Power: 0
LMAO at zachafer

learn more about vb before you talk shit
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 08:53 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.13846707 seconds (100.00% PHP - 0% MySQL) with 19 queries