Announcement

GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? WE LIVE INSIDE A DREAM. GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? NO MORE SPAM
FRIENDLY REMINDER THAT THE FORUMS ARE DEAD AND THAT THE LIFE OF THE PARTY CURRENTLY RESIDES IN #FAIL #EEFORUMSANARCHY #EEFORUMS #hi ON RIZON.

YO RIZON #HI
it's closing time you don't have to go home but you can't stay here

Advertisement

#1 2013-07-25 11:57:45

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Microsoft Visual Basic

I'm having a lot of fun with the Console Applications in Microsoft Visual Basic.

I created an e-mail/message thingy. Unfortunately it only works on your computer, not on a server. But you can use dropbox or something. Also I don't have encryption yet, so don't use your bank account password!

Follow the instructions at the beginning of the code box to install.

'README I AM IMPORTANT

'Before importing into VB.Net, you must specify the path!
'Import this into notepad
'Create a new folder called "Mail" or something like that
'Then copy the path to it
'DO NOT copy over the last backslash, I've taken care of that.
'do a Ctrl + H
'Replace all instances of FINDME with your path
'Copy over the text into a new CONSOLE APPLICATION. Make sure you can import 

all the required imports
'Register a new account with username ADMIN (all caps) with any password.
'Register an account for you with any username and password.
'Get a few friends to create accounts, and you can message each other.
'Or you can create a couple alt accounts of your own.
'I hope you enjoy






Imports System
Imports System.Collections
Imports System.IO
Imports System.IO.StreamWriter
Imports System.IO.StreamReader

Module Module1

    Sub Main()
Startup:

        System.Console.WriteLine("Register or Login?")
        System.Console.WriteLine("(keep in mind everything is case 

sensitive.)")
        Dim regorlog As String
        regorlog = System.Console.ReadLine
        If regorlog = "Login" Then
            GoTo Login
        ElseIf regorlog = "Register" Then
            GoTo Register
        Else
            GoTo Startup
        End If


        

'''''''''''''''''''''''''''REGISTER'''''''''''''''''''''''''''''''''''''''''

''''''''
Register:
        Dim regpath As String
        Dim reguser As String
        Dim regfold As String
        System.Console.WriteLine("What is your desired username?")
        reguser = System.Console.ReadLine
        regfold = "FINDME\" + reguser
        If (Not System.IO.Directory.Exists(regfold)) Then
            System.IO.Directory.CreateDirectory(regfold)
        Else
            System.Console.WriteLine("username registered already.")
            GoTo Startup
        End If
        regpath = regfold + "\" + reguser + ".txt"
        System.IO.File.AppendAllText(regpath, reguser & vbCrLf)
        System.Console.WriteLine("What is your desired password?")
 System.Console.WriteLine("Don't use your typical one, I haven't 

written in cryptography yet.")
        Dim regpass As String
        regpass = System.Console.ReadLine
        regpath = regfold + "\" + regpass + "PASS.txt"
        System.IO.File.AppendAllText(regpath, regpass & vbCrLf)
        For value As Integer = 0 To 50
            System.Console.WriteLine(" ")
        Next
        System.Console.WriteLine("Registered User " + reguser + ", 

Continuing to home screen")
        regpath = regfold + "\" + reguser + "Mail" + ".txt"
        Dim defaultmail As String
        defaultmail = "Mail For " + reguser + ":"
        System.IO.File.AppendAllText(regpath, defaultmail & vbCrLf)
        GoTo Startup








        

''''''''''''''''''''''''''''''''''''''''''''LOGIN'''''''''''''''''''''''''''

''''''''''''''''''''''''''''''''''''
Login:
        Dim loguser As String
        Dim userfold As String
        Dim userpass As String
        Dim logban As String
        System.Console.WriteLine("Username?")
        loguser = System.Console.ReadLine
        logban = "FINDME\ADMIN\bans\" + loguser + ".txt"
        userfold = "FINDME\" + loguser
        If File.Exists(logban) Then
            Dim ReadBan As New System.IO.StreamReader(logban)
            System.Console.WriteLine(ReadBan.ReadToEnd)

            ReadBan.Close()
        End If
        If (Not System.IO.Directory.Exists(userfold)) Then
            System.Console.WriteLine("User not registered")
            GoTo Startup
        End If
        System.Console.WriteLine("Password?")
        userpass = System.Console.ReadLine
        If Not File.Exists(userfold + "\" + userpass + "PASS.txt") Then
            System.Console.WriteLine("Wrong Password")
            GoTo Startup
        Else
            For value As Integer = 0 To 50
                System.Console.WriteLine(" ")
            Next
            If loguser = "ADMIN" Then
                GoTo ADMIN
            End If
            GoTo Mail
        End If








        

''''''''''''''''''''''''''''''''''''''''''''''''MAIL''''''''''''''''''''''''

''''''''''''''''''''''''''''
Mail:
        System.Console.WriteLine("Logged in successfully.")
        System.Console.WriteLine("Type View to read messages, Send to send 

messages, Clear to clear messages, or Logout to logout.")
        Dim towhere As String
        towhere = System.Console.ReadLine
        If towhere = "View" Then
            GoTo View
        ElseIf towhere = "Send" Then

        ElseIf towhere = "Logout" Then
            GoTo Startup
        ElseIf towhere = "Clear" Then
            GoTo Clear
        Else
            GoTo Mail
        End If













        

'''''''''''''''''''''''''''''''''''''''''''''SEND'''''''''''''''''''''''''''

''''''''''''''''''''''
Send:
        Dim footer As String
        Dim recip As String
        Dim recipfold As String
        Dim message As String
        Dim recipmail As String
        footer = " ~~~~This message was from " + loguser

        System.Console.WriteLine("Who would you like to send your message 

to?")
        recip = System.Console.ReadLine
        recipfold = "FINDME\" + recip
        If (Not System.IO.Directory.Exists(recipfold)) Then
            System.Console.WriteLine("User not registered")
            GoTo send
        End If
        recipmail = recipfold + "\" + recip + "Mail.txt"
        System.Console.WriteLine("Please type your message.")
        message = System.Console.ReadLine
        Dim messandfoot = message + footer
        System.IO.File.AppendAllText(recipmail, messandfoot & vbCrLf)
        GoTo Mail





        

''''''''''''''''''''''''''''''''''''''''''''''VIEW''''''''''''''''''''''''''

'''''''''''''''''''''''''''
View:
        Dim MailLoc As String
        MailLoc = userfold + "\" + loguser + "Mail.txt"

        Dim objReader As New System.IO.StreamReader(MailLoc)
        System.Console.WriteLine(objReader.ReadToEnd)

        objReader.Close()
        GoTo Mail









        

'''''''''''''''''''''''''''''''''''''''''''''Clear''''''''''''''''''''''''''

''''''''''''''''''''''''
Clear:
        MailLoc = userfold + "\" + loguser + "Mail.txt"
        File.Delete(MailLoc)
        defaultmail = "Mail for " + loguser + ":"
        System.IO.File.AppendAllText(MailLoc, defaultmail & vbCrLf)
        System.Console.WriteLine("Mail cleared.")
        GoTo Mail









ADMIN:
        System.Console.WriteLine("Welcome to the Admin control panel. Ban 

users, or Unban users")
        Dim AdminWhere As String
        AdminWhere = System.Console.ReadLine
        If AdminWhere = "Ban" Then
            GoTo Ban
        ElseIf AdminWhere = "Unban" Then
            GoTo Unban
        ElseIf AdminWhere = "Logout" Then
            GoTo Startup
        End If









        

'''''''''''''''''''''''''''''''''''''''''BAN''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''
Ban:
        System.Console.WriteLine("Which user would you like to ban")
        Dim banwho As String
        banwho = System.Console.ReadLine
        If banwho = "ADMIN" Then
            System.Console.WriteLine("You cannot ban the admin account.")
        End If
        Dim BanLoc As String
        BanLoc = "FINDME\ADMIN\bans\" + banwho + ".txt"
        Dim BanRsn As String
        System.Console.WriteLine("Why is this user banned?")
        BanRsn = System.Console.ReadLine
        Dim BanMsg As String
        BanMsg = "You have been banned for reason: " + BanRsn
        System.IO.File.AppendAllText(BanLoc, BanMsg & vbCrLf)
        GoTo ADMIN





        

''''''''''''''''''''''''''''''''''''''''''''''''''''UNBAN'''''''''''''''''''

''''''''''''''''''''''''

Unban:
        Dim ubuser As String
        Dim ubloc As String
        System.Console.WriteLine("Unban who?")
        ubuser = System.Console.ReadLine
        ubloc = "FINDME\ADMIN\bans\" + ubuser + ".txt"
        If System.IO.File.Exists(ubloc) = True Then

            System.IO.File.Delete(ubloc)
            System.Console.WriteLine("User " + ubuser + " pardoned.")
            GoTo ADMIN
        Else
            System.Console.WriteLine("User is not banned.")
            GoTo ADMIN
        End If

    End Sub
End Module

No longer part of Fail. Sorry.

Offline

#2 2013-07-28 21:10:17

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Microsoft Visual Basic

This... is impressive. The best I can do with VB is make a popup. I tried making applications once but I'm positive it hates me. I could copy down code exactly as written and it would give me errors.


Jet fuel can't make dank memes.

Offline

#3 2013-08-27 15:33:01

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Microsoft Visual Basic

Stick to PHP, HTML, CSS, JavaScript, and all those other languages that I wanted to learn but still fell short next to you. I've given up on pretty much all of 'em. I'll stick with VB.NET and maybe java.

Also, are there any programs you'd like me to make? I'm pretty bored and can't think of anything.


No longer part of Fail. Sorry.

Offline

#4 2013-09-01 14:13:04

Ratburntro44
Member
Registered: 2011-10-28
Posts: 3,370
Fails: 100,959

Re: Microsoft Visual Basic

Make a program that drives the spambots away and brings the members back.


31
SEfX29x.png

Offline

#5 2013-09-02 11:33:51

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Microsoft Visual Basic

If only. I'd need LOADS more experience with that, I'd have to have an administrator account, I'd have to have it running on a server (CAN you have a server like a 000webhost server run a EXE file?)


No longer part of Fail. Sorry.

Offline

#6 2013-09-02 19:16:03

Ratburntro44
Member
Registered: 2011-10-28
Posts: 3,370
Fails: 100,959

Re: Microsoft Visual Basic

scienceguyz wrote:

If only. I'd need LOADS more experience with that, I'd have to have an administrator account, I'd have to have it running on a server (CAN you have a server like a 000webhost server run a EXE file?)

Probably, but not under the conditions you're allowed to do stuff. Does anyone have any way to contact different though? If we moved the fail forums and got the people back it could actually be revived.


31
SEfX29x.png

Offline

Board footer

Jump to

We use Fail. Fail uses FluxBB

[ Generated in 0.012 seconds, 25 queries executed - Memory usage: 600.4 KiB (Peak: 632.36 KiB) ]