Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[Source] Login/Register Application [Source]

So yeah, today i finished a, kinda 2 hours project.

So here's a showoff xD





Features
So what this does, as the title says, it logs in to something that you want, and it registers to that samething...

This applications uses a uploaded textfile to get and check if the username/password is right. In order to do this you need to upload a php file, that will write/create the textfile in the same domain.

Source of The program

Login Form

Code
Imports System.Net
Imports System.IO
Public Class Form1
    Dim wc As New Net.WebClient
    Dim texting = wc.DownloadString("<yourdomainhere>/data.txt")
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  Form2.Show()
  Form2.TextBox1.Text = Me.TextBox1.Text
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

  If TextBox1.Text = Nothing Or TextBox2.Text = Nothing Or TextBox1.Text = Nothing And TextBox2.Text = Nothing Then
    MessageBox.Show("Please specify both username and password")
  ElseIf texting.contains(TextBox1.Text & ":" & TextBox2.Text) Then
    MessageBox.Show("you're loged in")
  ElseIf Not texting.contains(TextBox1.Text & ":" & TextBox2.Text) Then
    MessageBox.Show("Invalid login information")
  End If

    End Sub
End Class

Register Form

Code
Imports System.Net
Public Class Form2

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  Button2.Enabled = False
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

  Dim request As WebRequest = WebRequest.Create("<yourdomainhere>/post.php?w=" & TextBox1.Text & ":" & TextBox2.Text)

  request.GetResponse()
  MessageBox.Show("You have been successfully Registered, please restart the application to login", "Notification")
  Button2.Enabled = True
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  Process.Start(Application.ExecutablePath)
  Me.Close()
  Form1.Close()
    End Sub
End Class

PHP File

Code
<?php
$msg = $_GET['w'];
$logfile= 'data.txt';
$fp = fopen($logfile, "a");
fwrite($fp, $msg);
fclose($fp);
?>

If you're going to useit, leave a thanks =)

Special Thanks
Ac!d!c.
Вanksy
Antti
"There's no dead which can eternal lie, and with strange Aeons even death may die."


(Sep 24, 2011 12:07 PM)Androcir Wrote:  well good for you mate, it just demonstrates that you already had the knowledge, unlike me.

Fuck haters. they gonna hate forever.

Good Job , keep it up , I will take your source and i will try to make something more advanced :)
thanks again for the great share.
(Sep 24, 2011 12:14 PM)Submariner Wrote:  Fuck haters. they gonna hate forever.

Good Job , keep it up , I will take your source and i will try to make something more advanced :)
thanks again for the great share.

No, thank you!
And good luck with your project ;)
"There's no dead which can eternal lie, and with strange Aeons even death may die."


Its easy to code an application like this.

Anyway it will help some new members out there, Good job

-Blizz
This is not working. Login is form1 Register form2, when i debug, it opens register, and after successful registration, when you click restart, it just opens register again..

excuse me if im doing something wrong, but thats what happens to me :/
Hello,

Unfortunately I have found some LQP, Off-Topic or Flaming posts. I did infact have to remove them because they all fall under breaking HF rules. If you have any questions feel free to PM me.

We also recommend you take the time to read the HF Help Documents section. The answer to your questions should be contained in there.

Thank you,
Astonish is NJ
I might use this wana help me
:P

thanks
(Sep 30, 2011 04:53 AM)Shenron Wrote:  This is not working. Login is form1 Register form2, when i debug, it opens register, and after successful registration, when you click restart, it just opens register again..

excuse me if im doing something wrong, but thats what happens to me :/

Well, pm me the your code, and i'll see if i can help. Cuz the code i postyed works just fine =)

(Sep 30, 2011 03:43 AM)Blizzard Wrote:  Its easy to code an application like this.

Anyway it will help some new members out there, Good job

-Blizz

Yeah, it is really easy to code... i did this because some people ask for it and since i was a little too bored...
Thanks ;D
"There's no dead which can eternal lie, and with strange Aeons even death may die."


Looks good,
Thanks alot of sharing.

But how can I do such a thing:
I will approve the registration (He registers and I approve him..)
(Sep 30, 2011 10:50 AM)Stenography Wrote:  Looks good,
Thanks alot of sharing.

But how can I do such a thing:
I will approve the registration (He registers and I approve him..)

That i still don't know how to do it. But i kinda thought about it..
"There's no dead which can eternal lie, and with strange Aeons even death may die."


for approval, you could do something like the register writes to another text file, and you have to copy the registered members from that text file to another text file that the login form reads from. just a simple proposal

and dw, i must have been doing something wrong before :S
it works now.
but i think the php file might need to be rewritten.
if i register 2 accounts, it will save to the text file as something like this
fred:123hello:good
fred and hello being 2 different accounts and 123 and good the passwords
the login obviously has trouble reading this..

edit:
you should add something after successful login to make it go to the hidden page, just incase the biggest n00bs (not quite me) dont know to do that
PHP Code

<?php 
If TextBox1.Text = Nothing Or TextBox2.Text = Nothing Or TextBox1.Text = Nothing And TextBox2.Text = Nothing Then
    MessageBox
.Show("type password and username...")
  ElseIf 
texting.contains(TextBox1.Text & ":" & TextBox2.Text) Then
    MessageBox
.Show("Your logged in")
    
Me.Hide()
    
Form3.Show() 
(Sep 30, 2011 01:20 PM)Shenron Wrote:  for approval, you could do something like the register writes to another text file, and you have to copy the registered members from that text file to another text file that the login form reads from. just a simple proposal

and dw, i must have been doing something wrong before :S
it works now.
but i think the php file might need to be rewritten.
if i register 2 accounts, it will save to the text file as something like this
fred:123hello:good
fred and hello being 2 different accounts and 123 and good the passwords
the login obviously has trouble reading this..

edit:
you should add something after successful login to make it go to the hidden page, just incase the biggest n00bs (not quite me) dont know to do that
PHP Code

<?php 
If TextBox1.Text = Nothing Or TextBox2.Text = Nothing Or TextBox1.Text = Nothing And TextBox2.Text = Nothing Then
    MessageBox
.Show("type password and username...")
  ElseIf 
texting.contains(TextBox1.Text & ":" & TextBox2.Text) Then
    MessageBox
.Show("Your logged in")
    
Me.Hide()
    
Form3.Show() 

I'll work on the php, and the approval thingy, thanks for the feedback mate =)

"There's no dead which can eternal lie, and with strange Aeons even death may die."


Awesome share with the community thankyou so much !
(Sep 30, 2011 04:39 PM)xNoNamez Wrote:  Awesome share with the community thankyou so much !

No problem dude.
And thank you for the feedback =)
"There's no dead which can eternal lie, and with strange Aeons even death may die."


Basic & stays good.
Altough, someone can screw your ftp really hard if they know the .php file which is not hard to get.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by opsecJun 17, 2022 02:11 PM 2 228 Jun 17, 2022 02:11 PM
Last Post: benio2
[Java] by TennoFeb 3, 2019 04:49 AM 4 307 Feb 3, 2019 04:49 AM
Last Post: Tenno
[Shell] by HackooAug 15, 2017 01:14 AM 2 269 Aug 15, 2017 01:14 AM
Last Post: cryptoshell