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

.NET 

Login system failing

I'm creating a program and using 2 authentication systems (BetterSeal & My own) I can login succesfully on the program but i cant run gen.php with a webrequest (returns login.failed)
This works if i just goto the browser but not with the program (my syntax is correct)

Gen.PHP in web-browser:
[Image: 8H31ucV.png]

Webreq for Gen.php in application:
[Image: s8IJtrV.png]

My code for webrequest in program:
Code
 Public Function getAccountType()

       Dim type
       If typebx.Text = "Netflix" Then
           type = "netflix"
           Return type
       End If

       If typebx.Text = "Hulu" Then
           type = "hulu"
           Return type
       End If

       If typebx.Text = "Roblox" Then
           type = "roblox"
           Return type
       End If

       If typebx.Text = "HBONow" Then
           type = "hbo"
           Return type
       End If

       If typebx.Text = "Proxies" Then
           type = "proxies"
           Return type
       End If

       If typebx.Text = "Gmail" Then
           type = "gmail"
           Return type
       End If


       Return type
   End Function

   Private Sub genbt_Click(sender As Object, e As EventArgs) Handles genbt.Click

       If num.Value = 1 Then
           Dim result1 As String = VelocityClient.DownloadString("http://192.34.109.75/gen.php?username=" + Form2.user.Text + "&password=" + Form2.pass.Text + "&IP=" + ip + "&action=" + getAccountType())
           RichTextBox1.Text = result1
       End If

       If num.Value = 2 Then
'nothing here yet
       End If

       If num.Value = 3 Then
'nothing here yet
       End If

       If num.Value = 4 Then
'nothing here yet
       End If

       If num.Value = 5 Then
'nothing here yet
       End If

   End Sub

Gen.php code (WARNING: Messy and unconventional method):
https://pastebin.com/HxUtbhfk


for getting the user:pass from form 2 i have tried several things, I tried passing the user:pass in seperate strings to form1 and also tried getting user:pass from form2 directly ect.

Any help is appreciated.
$count = mysqli_num_rows($result);
if ($count == 1){
...
else {
echo "Login.Failed";
}

you generate new account $count is 0
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(Nov 8, 2017 08:51 AM)HFDone Wrote:  $count = mysqli_num_rows($result);
if ($count == 1){
...
else {
echo "Login.Failed";
}

you generate new account $count is 0

that's for login, Generator doesn't take the account from a mysql database :P
why not store them in a class? so you can retrieve them all the time you want?
Shouldn't this be in PHP instead?
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Nov 8, 2017 12:49 PM)0xDEAD10CC Wrote:  Shouldn't this be in PHP instead?

i think because he sends another request in a new form without username and password it gets a failed login?
didn't read the code as it's sloppy
(Nov 8, 2017 01:29 PM)Owl Wrote:  The problem has something to do with "velocityclient". Works fine on regular webclient:

Code
Using wc As New WebClient
   Console.WriteLine(wc.DownloadString(
                       "http://192.34.109.75/gen.php?username=test&password=test&IP=1&action=netflix"))
End Using

I managed to get it too work, For some reason the server i was hosting on was messing things up, Hosted on another server and it worked fine, Maybe some sort of firewall ?
(Nov 8, 2017 01:56 PM)CacheIsAFag Wrote:  I managed to get it too work, For some reason the server i was hosting on was messing things up, Hosted on another server and it worked fine, Maybe some sort of firewall ?

i would guess php settings
You should also give your php snippet. There may be some misconfigured out there.
(Nov 8, 2017 07:00 PM)cocaine_monkey Wrote:  i would guess php settings

Yeh i think maybe the server that didn't work was running a different version of php or something as i installed manually and not with LAMPP or XAMPP
Something like this might help you with your PHP end, to keep it more organized and compatible
[Image: Syr3DlV.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by H4cker193Sep 30, 2017 04:01 PM 1 134 Sep 30, 2017 04:01 PM
Last Post: koolkid
[C] by D_MuLaSep 24, 2016 02:21 PM 10 324 Sep 24, 2016 02:21 PM
Last Post: 6577657534735
[.NET] by Ammar_HFMar 16, 2015 03:35 AM 10 256 Mar 16, 2015 03:35 AM
Last Post: Ammar_HF