/    Sign up×
Community /Pin to ProfileBookmark

tried for days…

Hi everybody,

I have been trying something for days and did not manage. We have a remote server whose administrator cannot be reached at the present time. We need the files that are on this server. There several tousands. The problem is that for security purpose, to get a file, you need to login with user name, password and capcha. I figure that a cookie is then set on my pc. Next, you type in your file name the file coming from some unknown directory is downloaded.

I can do that from my browser without problem, meaning connect and download on my pc. I even put up a script popping up windows, downloading and closing the window. However, the memory of the pc gets filled up and the pc crashes (too many windows opened and closed).

Do you know of any way to connect using loggin/capcha from our hosting server (we need to do that only once), save the cookie somewhere and have a direct download from server to server without having to go through a browser????

I really would be grateful as I tried for days !!!!

Here is my script :

[code=php]<?php
for ($idfs = 1 ; $idfs <= 5000 ; $idfs++) {
$add=’http://www.remoteserver.net/file’.$pieces[$idfs]’;
echo ‘<script>var winPop’.$idfs.’ = window.open(”.$add.”); </script>’;
echo ‘<script>setTimeout(‘winPop’.$idfs.’.close ()’,15000);</script>’;
}
?>[/code]

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@netbuddyJan 24.2007 — The system administrator cannot be contacted at this time... Hmmm heard that one before, many times, Sounds like you are looking to leech files.

If you have a remote server, you will have some way of connecting to it other than via a web browser and if you were meant to have permission to or access to the remote server, the network admin will have set up your login and account prefs and what your allowed to access and that also would mean simple easy access via a mapped drive letter. You would at the very least have FTP and you dont indicate that so I am assuming that the intention is to syphon off a copy of a sites content for your own use..

Your request sound very sus plus the script you post is not complete, where is the rest of it?
Copy linkTweet thisAlerts:
@patimagesauthorJan 24.2007 — NO!

There is not bad in there. I work in a company and we have an other one abroad. The bloody admin in on vacation and does answer his phone. We normally do not interact much with this other place but now we have a meeting and we need to get the files for a presentation!!!!!!!! No bad there !!! Use PM if you do not want to give a solution that could help piracy. As for the script, sorry, there was a mistake, find the corrected version below. You can check my previous posts, you will see that I have been trying for a while !!!!!!!!!!!!

<?php

for ($idfs = 1 ; $idfs <= 5000 ; $idfs++) {

$add='http://www.remoteserver.net/file'.$idfs;

echo '<script>var winPop'.$idfs.' = window.open(''.$add.''); </script>';

echo '<script>setTimeout('winPop'.$idfs.'.close ()',15000);</script>';

}

?>
Copy linkTweet thisAlerts:
@NightShift58Jan 24.2007 — Take a hard look at the cURL functions. They are about the only way you're going to be able to (remotely) work with cookies.

http://cr.php.net/manual/en/ref.curl.php , and

http://curl.haxx.se/

A cookie-specific example:

http://curl.haxx.se/libcurl/php/examples/cookiejar.html
Copy linkTweet thisAlerts:
@bokehJan 24.2007 — Do you have to fill in the captcha for each file to be downloaded?
Copy linkTweet thisAlerts:
@bokehJan 24.2007 — Take a hard look at the cURL functions. They are about the only way you're going to be able to (remotely) work with cookies.[/QUOTE]The thing is that means installing cURL (not always possible). I wrote a script a while back that makes requests and sends and receives cookies. It's not heavily tested or optimised though as I don't have time.

http://www.webdeveloper.com/forum/showthread.php?t=118761
Copy linkTweet thisAlerts:
@patimagesauthorJan 24.2007 — thanks to all of you guys ! I will have a look into curl and try your script Bokeh! I do not need to login several times, only once. In any case, thanks again for your time. I ll let you know !
Copy linkTweet thisAlerts:
@NightShift58Jan 24.2007 — The thing is that means installing cURL (not always possible).[/quote]Actually, the hosting trend seems to be disabling file_get_contents() and forcing the use of cURL. That's why I even looked at cURL - having lived a simple life until then...

But, it works fine and even has possibilities that go much beyond file() and f_g_c().

I don't mind helping the OP with your script and some of the ones I also have.

I think the captcha - if only once - can be captured to browser via f_g_c() and displayed on browser, from there posted/submitted via cURL/Http_Request, grab the cookie and download the 20,000 files he/she needs to get from that server. but it'll undoubtedly take longer than the 3-4 lines it took to describe it... I think we're talking 4-letter words here: W-O-R-K...
×

Success!

Help @patimages spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...