RefreshCapcha

Author Topic: Stepping through a script line by line  (Read 7310 times)

md202000

  • Guest
Stepping through a script line by line
« on: October 09, 2009, 09:21:51 am »
 Is there a debugger or another way to step through a script that I'm updating?

I notice that several scripts are not working.  Nothing is being displayed when I know the tors are out there.  The two that I checked were torrent-damage and elbitz.   I took a look at the scripts and saw what I believe is the problem.

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 661
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Stepping through a script line by line
« Reply #2 on: October 12, 2009, 03:07:34 pm »
welcome to the forums md202000...


i have heard of MD 20/20.. is that where you have derived your name from?  ;D

if you need any help getting the script debugger enabled, or help with it..  dont hesitate to ask.


also, please make sure you notify us if you have repaired a non-working script! we all will thank you for your efforts (not to mention unlock your account)!


-chip
  -  https://convivea.com  -   And...  boom goes the dynamite.

md202000

  • Guest
Re: Stepping through a script line by line
« Reply #3 on: January 25, 2010, 11:39:36 am »
Well, better late than never - Yes indeed Chip, Mad Dog was on my mind when I came up with it.  Due to the high alcohol content (not for the taste ....) , it was the drink of choice back in high school.   

I picked-up the Torrent-Damage script again - I noticed it was de-activated as "site no longer exists".  Actually, they had some registration issues for five days a last month.  Once that was all worked out, they came back online.

However, they have recently changed their page flow - the current script no longer works (even after being activated). 

That's my project for tonight...

I'll keep you all up-to-date.

Thanks


Offline CuF

  • Sr. Member
  • ****
  • Posts: 330
  • Karma: +40/-0
    • View Profile
Re: Stepping through a script line by line
« Reply #4 on: January 27, 2010, 03:27:40 am »
Let us know if you need any help.
I took a quick took, and it's a subscription site so you would need to provide either account info or an invite.

To start you will need to strip some of the removed tags from the script.
Here's the fixed beginning to the script:
Code: [Select]
[script]
modified=12/15/2009
name=Torrent-Damage.net
home=http://www.torrent-damage.net/
author=Bovski
pwd=1
login=http://www.torrent-damage.net/takelogin.php
form=username=%USER%&password=%PASS%
failed=<form method="post" action="takelogin.php">
failed2=/login.php?return
main=http://www.torrent-damage.net/browse.php?incldead=0&query=%SEARCH%&cat=0

[code]
[/code]

md202000

  • Guest
Re: Stepping through a script line by line
« Reply #5 on: January 29, 2010, 04:48:22 pm »
Thanks,

Here's what I found so far,

Based on my very green review, they made 3 changes that I needed to account for:

1.  Changed .../takelogin.php to  .../login.php
2.  Changed .../browse.php   to  .../torrents.php
3.  Reduced the parameters in the search string.   

I made the changes to the script as follows (not sure how to add as snippet)

code:

name=Torrent-Damage.net
home=http://www.torrent-damage.net/
author=Bovski
pwd=1
login=http://www.torrent-damage.net/login.php
form=username=%USER%&password=%PASS%
failed=<form action="login.php"  method="post" >
failed2=/login.php?return
main=http://www.torrent-damage.net/torrents.php?searchstr=%SEARCH%

However, the above code won't authenticate or login to the site.   So, I'm still looking into it.

When debuging, I get the following:

Script: Torrent-Damage.net  --  On Line: [ 1 / 34 ]

Last Executed:   

Next To Execute:   d=replace(d,</tr><tr><td style,<td style)

Forthcoming:   d=replace(d,<tr>,</tr><tr>)


-----------------DEBUG: VARIABLES----------------

-----------------CURRENT TORRENT: STORED VARIABLES----------------
1 - Name:
2 - Size:
3 - Page:
5 - Seeders: 0
6 - Leechers: 0
7 - URL:

-----------------DATA: VARIABLE 'd'----------------
HTTP/1.1 302 Found
Date: Sat, 30 Jan 2010 07:35:04 GMT
Content-Type: text/html
Connection: close
Server: Apache
X-Powered-By: PHP/5.2.8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://www.torrent-damage.net/login.php
Content-Length: 0



-----------------END: VARIABLES----------------


And thats all - it doesn't make it to the "code" routine.

md202000

  • Guest
Re: Stepping through a script line by line
« Reply #6 on: January 30, 2010, 06:42:34 am »
Got the login working, had to change 'failed2'.  Moving forward..