Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-09-2012, 08:25 PM   PM User | #1
nigel12
New to the CF scene

 
Join Date: Oct 2012
Location: Birmingham
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nigel12 is an unknown quantity at this point
help with downloaded script possible database problem

Hi,
I was torn between which forum to post this question in but here goes.
I have recently downloaded a php script from cobrascripts. It is called autohits
I have tried contacting cobrascripts but as it is a free script they are not interested in helping. So I am hoping someone here will help me. I have done as they said,
Installed script
Installed database table
and it works to some degree ie I have created a fake account and managed to login as a regular user.
The problem is I can not access the admin area with the username and password they have given me.
Is there away around this ?
When I login to phpMyAdmin there is no user listed there called admin, so I created a user called "admin" and gave it the password "test" but it still did not work. I'm not sure if that is because I have created the user inaccurately or not. As my phpMyAdmin skills are not as good as I would like.
Can anyone help me get this up and running ie point my nose in the right direction.
I think If I could create an admin account directly in my user table database it might work.

I worked on the assumption that if one can create a user account then I have installed the table correctly. So now you have it why cant I login to admin panel
nigel12 is offline   Reply With Quote
Old 10-09-2012, 09:56 PM   PM User | #2
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,513
Thanks: 45
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
It could be anything.

I could have a look for you via teamviewer / vnc but it would cost as its unchartered territory.

When you created a new password in your phpmyadmin did you use a hash or a plain text password?
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 10-10-2012, 03:54 AM   PM User | #3
nigel12
New to the CF scene

 
Join Date: Oct 2012
Location: Birmingham
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nigel12 is an unknown quantity at this point
I used a plain text password,
nigel12 is offline   Reply With Quote
Old 10-10-2012, 11:36 AM   PM User | #4
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,513
Thanks: 45
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Most scripts don't use plain text passwords - they use a hash. This is so that no admin, hacker or anyone else can ever find the users real password aud use it to abuse a users account elsewhere.

When the password is sent to the script it will hash it (in other words convert it to a digital equivalent of a finger print). It will then compare this to the hash stored in the database. If they are the same then its a successful login. If not.. its a failed login.

Now, if you've been putting in a plain text password into your database it will never match what the script is comparing it to.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 10-11-2012, 06:03 PM   PM User | #5
nigel12
New to the CF scene

 
Join Date: Oct 2012
Location: Birmingham
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nigel12 is an unknown quantity at this point
Thanks for getting back to me,
OK it would seem when I was looking for the admin user account that was supposed to be setup with the script. I was looking in the table under user, when it was actually listed in the table under "pass"

So the admin account is listed and there is a hash password there. Is it possible to convert the hash password in to a plain text one so I can see what it is? (because it is obviously not what I was told)
Or do I need to somehow remove the hash password that is there and replace it.
Regards Nige.
nigel12 is offline   Reply With Quote
Old 10-11-2012, 06:14 PM   PM User | #6
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,513
Thanks: 45
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
No you cannot decrypt a hashed password. Re-read what I said above about them. The whole point is that others can't get your original password if they gain access to the database.

You really need to consult the docs that came with your script. So far with the questions you've asked you're starting to look like a wannabe attacker so I would recommend that it you're genuine, you go back to the site you downloaded it from and check out the docs thoroughly.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Reply

Bookmarks

Tags
database, downloaded, php, script

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 08:49 AM.


Advertisement
Log in to turn off these ads.