Results 1 to 7 of 7
  1. #1
    Deto's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    2
    My Mood
    Aggressive

    [vb.net]Simple Offline Databasing

    Credits: DeToX(Me)

    Okay so anyone that knows me in the past, kno i like to use offline databasing for programs... e.g. in my antivirus program, i offline databased the Virus Sigs so to update you only need to download a new text file, also you may have seen my offline database for the virus vault


    Today im going to show you a simple way to make a online database, using only a few lines of code and a text document....

    so to start create a new .txt file and name is Accounts.txt, put it in the folder of you project called Debug

    Now Add This Text To The File
    Code:
    NEW|FakeEmail69@fagswag.Com|ILIKEPUSS|
    NEW|DETOXROCKSYOU@mymom.Com|DETOXROXS|
    NEW|TEST@test.COM|TEST123|
    you will need to:
    Code:
    Imports System.IO 'Give us acces to File.ReadAllText("")
    okay anyways now onto the coding part.... first we are going to load it.... soo.....
    Code:
    Sub LoadArrayOfInfo()
    Dim InfoFile as string = File.ReadAllText(Application.StartupPath & "\Accounts.txt") 'All the txt in our account.txt can now be called by InfoFile
    End Sub
    Now We have to split our accounts...
    Code:
    Sub LoadArrayOfInfo()
    Dim InfoFile as string = File.ReadAllText(Application.StartupPath & "\Accounts.txt") 'All the txt in our account.txt can now be called by InfoFile
    '------------------------------------------------------------------------
    Dim InfoArray() as String = InfoFile.Split("NEW|") 'Splits The Strings By NEW|
    End Sub
    Now that the accounts are split they show up as seperated strings like this

    Account@Email.com|Password|



    Now we gota organise the data we split up
    Code:
    Sub LoadArrayOfInfo()
    Dim InfoFile as string = File.ReadAllText(Application.StartupPath & "\Accounts.txt") 'All the txt in our account.txt can now be called by InfoFile
    '------------------------------------------------------------------------
    Dim InfoArray() as String = InfoFile.Split("NEW|") 'Splits The Strings By NEW|
    '------------------------------------------------------------------------
    For Each Inf as String in InfoArray
    Dim Account as String = Inf.Split("|")
    
    Next
    End Sub
    Now we added a loop to go through and split the strings we splitted before into usernames and passwords
    so now we have

    Account <-- One String
    Password <-- One String

    So now to access the Account and Password Do This...
    Code:
    Sub LoadArrayOfInfo()
    Dim InfoFile as string = File.ReadAllText(Application.StartupPath & "\Accounts.txt") 'All the txt in our account.txt can now be called by InfoFile
    '------------------------------------------------------------------------
    Dim InfoArray() as String = InfoFile.Split("NEW|") 'Splits The Strings By NEW|
    '------------------------------------------------------------------------
    For Each Inf as String in InfoArray
    Dim Account as String = Inf.Split("|")
    '------------------------------------------------------------------------
    Dim AccountName as String = Account(0)
    Dim AccountPassword As String = Account(1)
    Next
    End Sub


    Any Questions Just comment

  2. #2
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic
    Realy simple just string spliting

    You could even add a decryption method to your program and then encrypt the accounts thats what you and me are doing for the virusDataBase right?

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  3. #3
    Deto's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    2
    My Mood
    Aggressive

    Exclamation

    its in my VirusScanDLL

    and yes we are using a method similar to this for our VirusSignature Database and out virus vault...

  4. #4
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic
    Why cant we,

    Make a mysql database with the Virus info and then

    have the Program use that sqltable,

    and if they click the option OfflineMode it will download the VirusDataBase and read from that until it gets updated.

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  5. #5
    Deto's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    2
    My Mood
    Aggressive
    cause then they need internet connection to run the program...

  6. #6
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic
    Well what happens if we update the vault they need internet to get newones Plus how are they going to get the antivirus with out *********

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  7. #7
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    How is this offline databasing rofl. String splitting <> Databasing. Offline databasing would involve MSSQL, MSAccess...or an offline database program of some sort. How are you going to query your textfile?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)