Sign in to follow this  
Followers 0
schuc

How to find source for .PHP script via web?

6 posts in this topic

Hi All

I am writing a script to grab the latest versions of a few free security programs and I have that all working(with some tips from Wakillon :x on how to get and then extract the direct file download link from the html source of the page).

The issue I am having is that for SuperAntiSpyware, there is a link on the main page(http://www.superantispyware.com/portablescanner.html) to download the file, but the link is to a .PHP script and I am not able to use _GetSourceCode() on a .PHP file, it seems.

Any help or suggestions are welcome.

Local $_String = _GetSourceCode ( 'http://www.superantispyware.com/sasportable.php' )
MsgBox(0, "", $_String) ; $_String does not contain .php file contents

Share this post


Link to post
Share on other sites



The only way to get PHP script is to find a vulnerability in a site, hack it and literally FTP the file over. Which is illegal.

With PHP, the page is precomputed and sent to you as an HTML page. This PHP script most likely is a re-directing script.Find where it redirects, and you have your required link.

shanet.


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

The only way to get PHP script is to find a vulnerability in a site, hack it and literally FTP the file over. Which is illegal.

With PHP, the page is precomputed and sent to you as an HTML page. This PHP script most likely is a re-directing script.Find where it redirects, and you have your required link.

Thanks for your reply. Yea, I'm definitely not looking to hack into anyone website. I'm just trying to get the latest version of free software. The PHP is probably being used to generate the random filename created for download.

Share this post


Link to post
Share on other sites

That big red button redirects to the most recent file in this directory. http://www.superantispyware.com/downloads/temp/

This link is the same except the files are sorted by the Last modified value. Get the source of this page, find the last link, and that will be the most recent version of the program. http://www.superantispyware.com/downloads/temp/?M=A

Cool...how did you find the redirect being to 'http://www.superantispyware.com/downloads/temp/'? I wasn't able to determine that with the ways I was trying.

My concern about parsing and grabbing a file from that TEMP directory is that I wouldn't know what file to grab. Every time you click on the red button on the main page, it seems the PHP file is creating a temp named version of the file to download. This is easy to see by clicking on the red button, noting the random download filename, then look at the temp directory you discovered. The new file will be there.

Share this post


Link to post
Share on other sites

My concern about parsing and grabbing a file from that TEMP directory is that I wouldn't know what file to grab

Deathbringer, you pretty much nailed it! I am able to get the original(unprocessed/unrenamed) file by looking a directory up from temp http://www.superantispyware.com/downloads/.

Would you please tell me how you were able to determine the redirect went to 'http://www.superantispyware.com/downloads/'? That was the piece I was missing which held me up.

Thanks! :x

Share this post


Link to post
Share on other sites

It's been a long time since I've used the default Firefox downloader, but I'm pretty sure the Copy Source URL is in there too.

Right you are. I was just looking at html source and such and didn't look at the Firefox downloader. Sure enough, there is a 'Copy Download Link' option in the downloader window.

Thanks a lot.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0