GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Coding gurus: How to get past a login form (https://gfy.com/showthread.php?t=865769)

Jakez 10-30-2008 06:31 PM

Coding gurus: How to get past a login form
 
I have some PHP code that is getting the source code of a forums page, BUT the forum requires you to be logged in to view any threads. Is there any kind of way to make the script "log in" or any way to get past vBulletins required login?

fris 10-30-2008 06:33 PM

curl can do what you want

Jakez 10-30-2008 06:39 PM

Quote:

Originally Posted by fris (Post 14979996)
curl can do what you want

Any specific keywords I could use to search for my solution? :)

fris 10-30-2008 06:45 PM

http://curl.haxx.se/libcurl/php/exam...bay_login.html

sample for ebay, will have to modify it of course, but im sure you can find an example if you just search goog for a bit

WiredGuy 10-30-2008 06:47 PM

Make sure if you use curl to use cookies too or you'll lose the 'login' state.
WG

fris 10-30-2008 06:49 PM

basically use post to login, keep the cookie, follow the location, and access the next page with the stored cookie

Bro Media - BANNED FOR LIFE 10-30-2008 06:50 PM

PHP Code:

<?php
include('classes/curl.class.inc.php');
$curl->login('http://www.site.com/login.php','user=username&pass=password&submit=Login','','off');
$curl->grab_page('http://site.com/members.php','','off');
$curl->display();
?>

works like a charm ;)

Jakez 11-12-2008 03:55 PM

Quote:

Originally Posted by Retox Josh (Post 14980127)
PHP Code:

<?php
include('classes/curl.class.inc.php');
$curl->login('http://www.site.com/login.php','user=username&pass=password&submit=Login','','off');
$curl->grab_page('http://site.com/members.php','','off');
$curl->display();
?>

works like a charm ;)

Wheres the curl.class.inc.php though?

If someone could throw something really basic together that logs into a vBulletin forum I'll PayPal you like $10 for it.

fris 11-12-2008 04:00 PM

if you provide a demo account to the vbulletin maybe someone can do it, so they can test it out

Bro Media - BANNED FOR LIFE 11-12-2008 04:23 PM

Quote:

Originally Posted by Jakez (Post 15044936)
Wheres the curl.class.inc.php though?

If someone could throw something really basic together that logs into a vBulletin forum I'll PayPal you like $10 for it.

It's in my private collection used for my own purposes, for $50 epass I will release it.

Jakez 11-15-2008 08:58 AM

Quote:

Originally Posted by fris (Post 15044979)
if you provide a demo account to the vbulletin maybe someone can do it, so they can test it out

Good idea, made a test account here:

http://board.rapbasement.com/
username: RBdummyaccount
password: 123456

Quote:

Originally Posted by Retox Josh (Post 15045131)
It's in my private collection used for my own purposes, for $50 epass I will release it.

Damn that's kind of steep lol, but I don't have any ePass money atm anyways :Oh crap

mikeyddddd 11-15-2008 09:14 AM

Quote:

Originally Posted by Jakez (Post 15057661)
Good idea, made a test account here:

http://board.rapbasement.com/
username: RBdummyaccount
password: 123456


Bro Media - BANNED FOR LIFE 11-15-2008 09:17 AM

Quote:

Originally Posted by Jakez (Post 15057661)
Damn that's kind of steep lol, but I don't have any ePass money atm anyways :Oh crap

That's because my time is money, and I don't give my time up for others cheap.

P.S. I tested your login via my script and it works perfectly.

jwerd 11-15-2008 09:23 AM

http://www.phpclasses.org/browse/package/1988.html

They also have documentation on how to use the class file and interface with it. I use phpclasses a lot, when I don't want to reinvent the wheel, yet I want a nice OOP approach to whatever I'm doing. They always give basic examples on how to do things, as well.
:thumbsup:thumbsup

jwerd 11-15-2008 09:25 AM

You may also be able to find a great PEAR package to handling CURL. Good luck!:thumbsup

fuzebox 11-15-2008 09:30 AM

I know I'll be visiting 13scripts.com for all my coding needs :1orglaugh


All times are GMT -7. The time now is 02:21 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123