from what I see and looked up. . .this should work! I have the txt file on there, which right now the it should be:
Username: TestAccount
Password: Test123
But doesn't work. . .I just want to be able to add people as I want. . .with-out them having to redownload it.
Code:Public Class Login Dim Accepted = 2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) On Error GoTo ERRORCODE1 Dim WebCache As String Dim Usernameconfig Dim Result Usernameconfig = TextBox1.Text.Replace(" ", "%20") WebCache = "https://fishy-designs.******.com/Users" + Usernameconfig + ".txt" Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(WebCache) Dim response As System.Net.HttpWebResponse = request.GetResponse() Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252")) Result = sr.ReadToEnd() If TextBox2.Text = Result Then Call AcceptedSub() Accepted = 1 End If ERRORCODE1: If Accepted = 1 Then : Else : MsgBox("Invalid Username or Password") : End If Accepted = 2 End Sub Private Sub AcceptedSub() Form1.Show() End Sub End Class
Last edited by Web-Designer; 09-15-2010 at 02:17 AM.
Cant u just use
If Textbox1.Text = "Username" and TextBox2.Text = "Password" then
Else
End if
Or do you want that you can change the Datas for the Programm every time...Like a ViP Programm ?
Thanks Cosmos
Xscapism, READ THE POST! OMG sorry just like wtf why post if it doesn't even go with what I ask?
I'm using the program for a few people, but I also want to be able to add people as I want. With-out them having to re-download it. . .So the code you put won't work how I want. So yeah. . .
Last edited by Web-Designer; 09-15-2010 at 11:41 PM.
Code:Looking for some project(s) to dedicate my time to! I know HTML, PHP, MySQL and JavaScript. - Message me if I can help you with something, all I want is some credit!
Hmm why not just when a new person registers their usename and password you add it to a txt file on the internet, in a format like this
[php]
<username>j-Deezy</username><password>NiceTry</password>
[/php]
And on login just use a web request to download the "user list" text file and do a simple text compare and see if the username/password matches or not. You don't even have to save the txtfile to the computer as you can directly read the response stream with StreamReader.
If you need more help than that just ask
Hmm why not just when a new person registers their usename and password you add it to a txt file on the internet, in a format like this
[php]
<username>j-Deezy</username><password>NiceTry</password>
[/php]
And on login just use a web request to download the "user list" text file and do a simple text compare and see if the username/password matches or not. You don't even have to save the txtfile to the computer as you can directly read the response stream with StreamReader.
If you need more help than that just ask
Last edited by Imported; 09-16-2010 at 01:06 AM.
TROLOLOLOLO
First I actually don't want people to be able to sign up. I want to be able to add people as I wish not people sign up as they wish. But like people able to sign up on the web would work, where I give out the link to only people I want to sign up
How hard is it to make a MySQL user data base for me to use with my programs? I'm using 000Webhos*****m right now which is 100GB Bandwidth and 1.5GB storage and you can use MySQL on there, so it says. . .would I be able to do that? I have no [EDIT] Idea where to start with MySQL, I have no experience with it at all. . .I'm scare I'll f*ck something up and it'll like eat me or something xD lol
I know bubbles is like the best one around here with databases. . .Maybe he could do a tut or some thing about how to make one, and hook it up with your program(s) ^.^? Or jsut tell/teach me as long as I learn it one way or another
(Well till then I'm now obsessive refreashing this page and Google-ing "How-To -", why? because its 3:21 AM witching hour and I think everything I'm told is real. . .lol)
thanks peoplez () for the help, on more then just this post
Bubbles, LOL. I'm going to give him shit for that one.
While MySQL would be the most suitable way of doing this, it CAN just be achieved with a simple text file that only you can edit. You can use 000webhost to store a txt file with all the users YOU want and their respective passwords on there. When someone attempts to log in it quickly downloads the stream, checks whether the entered username/pass matches any in the file and if so, log in.
TROLOLOLOLO
yeah bubbles, thats just what came to mind lol I know its not really his name just yeah how I remember it lol so correction so Blubb1337 doesn't like hack me and cyber-ly kick my as* for calling him that lol Blubb1337 or Blubb NOT Bubbles (lol)
And okay that sounds good, but how would I code that? Don't forget I'm only like 3weeks of experience into any programing besides HTML so yeah lol
Last edited by Web-Designer; 09-16-2010 at 04:43 AM.
Code:Looking for some project(s) to dedicate my time to! I know HTML, PHP, MySQL and JavaScript. - Message me if I can help you with something, all I want is some credit!
EDIT: One second, I fucked up
Last edited by Imported; 09-16-2010 at 05:04 AM.
TROLOLOLOLO
Okay lol and I just refreshed cause it logged me out so now I gotta wait. . .as long as its worth waiting for. . .lol
btw: "Between the do/loop". . .you might wanna use another word or somsthing. . .lol
Code:Looking for some project(s) to dedicate my time to! I know HTML, PHP, MySQL and JavaScript. - Message me if I can help you with something, all I want is some credit!
Firs things first. Don't user 000webhost after all. I forgot it's like uber tempermental with txtfiles. Use ******** instead it's easy enough to use to upload files.
Okay, well I'm not going to absolutely spoonfeed you (I doubt you need to be spoonfed totally) but yeah I'll point you in the right direction.
Okay with your textfile you write it out in like notepad or something first, make it a layout that's consistent such as
[php]
<username>HELLO</username><password>LOLOL</password>
[/php]
Something with consistent separators i.e <username></username> etc.
Now you upload that to your ftp site using a FTP uploader or w/e they're called. Nice, that's the list side of things done.
Now all you need to do is when a user presses "Login" to quickly get the stream and read it and see if you find the username there at all.
I'll give you a hint; Create a webclient and use intellisense...you're looking for string, remember
Also, you can't use StreamReader for this but I hear that "StringReader" works a treat
[php]
Dim txt As String = wc.DownloadString("https://******.********.com/resources/Login.txt")
Using sRead As New IO.StringReader(txt)
Do
If LINEVARIABLE is nothing then Exit Do
Loop
End Using
[/php]
In between the do/loop you're going to need to extract the username and the password. Check the snippets vault or write your own "ReadBetween" function to get the parts between "<username></username>" etc. Basically you first wanna loop through the lines until the end and check if any usernames on the list are what the user put into the textbox, if not well you can just exit with an error message (I recommend making this whole section a seperate boolean function) and if it does find the username, get the password from that line (be sure it's the same line as the username )
That should be all?
TROLOLOLOLO
Web-Designer (09-18-2010)
What imported posted above will work, but instead of using <username></username>
use something like:
[php]
txtfile contents:
username1;password1
username2;password2
username3;password3
code to seperate password from username:
Dim txt As String = wc.DownloadString("https://******.********.com/resources/Login.txt")
Using sRead As New IO.StringReader(txt)
Dim LINEVARIABLE as String
Dim SeperateWords() as String
Do
LINEVARIABLE = sRead.ReadLine()
If LINEVARIABLE is nothing then Exit Do
SeperateWords() = Split(LINEVARIABLE,";")
'Now SeperateWords() Contains:
'SeperateWords(0) = "username1"
'SeperateWords(1) = "password1"
Loop
End Using
[/php]
";" can be replaced with anything else, but make sure you use a character that can't be used on either password or username
Last edited by Erinador; 09-17-2010 at 09:12 AM.
Meh I didn't want to introduce splitting as he's new and headers make things much cleaner IMO. having
While it works if you split it, it doesn't contain too much info on the subject. I guess it doesn't really have to as the program doesn't give two shits what you contain it in, but I prefer the structure of mine. It's just an opinion, your method is equally good, if not better. (Probably is more efficient as you only need to split, rather than getbetween) But whatever floats your boat, really.Code:Info1;Info2
You can win the rat race,Originally Posted by Jeremy S. Anderson
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)
Side Note: 95% of free webhost don't allow to externally connect to their MySQL databases. You can only connect locally via php scripts on that webhost -> useless with a free webhost. I could sure offer you a MySQL DB with external access, but if it's just this simple login system, go for the textfile thingy above.
And please, encrypt the passwords using md5.
[php]Imports System.Security.Cryptography
Imports System.Text
Public Function MD5StringHash(ByVal strString As String) As String
Dim MD5 As New MD5CryptoServiceProvider
Dim Data As Byte()
Dim Result As Byte()
Dim Res As String = ""
Dim Tmp As String = ""
Data = Encoding.ASCII.GetBytes(strString)
Result = MD5.ComputeHash(Data)
For i As Integer = 0 To Result.Length - 1
Tmp = Hex(Result(i))
If Len(Tmp) = 1 Then Tmp = "0" & Tmp
Res += Tmp
Next
Return Res
End Function[/php]
[php]If MD5StringHash(SeperateWords(1)) = MD5StringHash(txtPassword.text) then
[...][/php]
Web-Designer (09-18-2010)
That's why you get payed web servers or dedicated servers...
On that note, I don't remember doing this for someone , somewhere on here....