Click here to Skip to main content
15,887,464 members
Home / Discussions / C#
   

C#

 
QuestionStill Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Anindya Chatterjee6-May-08 7:03
Anindya Chatterjee6-May-08 7:03 
AnswerRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
led mike6-May-08 8:19
led mike6-May-08 8:19 
GeneralRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Anindya Chatterjee6-May-08 10:36
Anindya Chatterjee6-May-08 10:36 
GeneralRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
led mike6-May-08 11:40
led mike6-May-08 11:40 
GeneralRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Anindya Chatterjee6-May-08 17:51
Anindya Chatterjee6-May-08 17:51 
AnswerRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Spacix One7-May-08 2:34
Spacix One7-May-08 2:34 
GeneralRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Anindya Chatterjee7-May-08 2:38
Anindya Chatterjee7-May-08 2:38 
GeneralRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Spacix One7-May-08 2:47
Spacix One7-May-08 2:47 
No, it won't download in IE until the Navigating event exits.

I'm asking you to do the following:
private void rapidWebBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
    string filename = @"C:\test.rar";
    Regex pattern = new Regex(@"http://([0-9a-zA-Z]+)\.rapidshare\.(com|de)/files/([0-9]+)/([0-9]+)/([^\r\n]+)", RegexOptions.IgnoreCase);
    string match = e.Url.AbsoluteUri;
    if (pattern.IsMatch(match))
    {
        WebClient client = new WebClient();
        Uri uri = new Uri(match);
        client.DownloadFileAsync(uri, filename);
        e.Cancel = true;
    }
}
and if this doesn't work, you can use download and use WireShark[^] and WinPCap to record a successful request from within IE and reverse engineer the "good" request header requirements and you're set. You might also be able to use FireFox with live HTTP headers plugin that allows you to view HTTP data...

Yet if not canceling the event until AFTER your file download fixes the problem; none of the header stuff would be required.


-Spacix
All your skynet questions[^] belong to solved

I dislike the black-and-white voting system on questions/answers. Dead | X|

RantRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Spacix One6-May-08 10:16
Spacix One6-May-08 10:16 
JokeRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
That Asian Guy6-May-08 11:02
That Asian Guy6-May-08 11:02 
GeneralRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Anthony Mushrow6-May-08 11:22
professionalAnthony Mushrow6-May-08 11:22 
RantRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Spacix One6-May-08 11:30
Spacix One6-May-08 11:30 
GeneralRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
led mike6-May-08 11:36
led mike6-May-08 11:36 
JokeRe: Still Stuck: How to intercept rapidshare download in WebBrowser control using Http POST Pin
Spacix One7-May-08 2:37
Spacix One7-May-08 2:37 
QuestionWatiN and VS 2008 Pin
Drew19846-May-08 6:18
Drew19846-May-08 6:18 
QuestionException Logging Application Block - Not Releasing File [modified] Pin
Tristan Rhodes6-May-08 5:44
Tristan Rhodes6-May-08 5:44 
AnswerRe: Exception Logging Application Block - Not Releasing File Pin
tgrt6-May-08 7:17
tgrt6-May-08 7:17 
GeneralRe: Exception Logging Application Block - Not Releasing File Pin
Tristan Rhodes6-May-08 22:42
Tristan Rhodes6-May-08 22:42 
Questionstop button capturing in BHO (IE) Pin
eswes6-May-08 5:42
eswes6-May-08 5:42 
AnswerRe: stop button capturing in BHO (IE) Pin
Spacix One6-May-08 10:10
Spacix One6-May-08 10:10 
AnswerRe: stop button capturing in BHO (IE) Pin
chhoussem26-Feb-09 2:59
chhoussem26-Feb-09 2:59 
QuestionAdd a signature to an e - mail message Pin
Christiaan Laubscher6-May-08 5:21
Christiaan Laubscher6-May-08 5:21 
AnswerRe: Add a signature to an e - mail message Pin
Dave Kreskowiak6-May-08 5:49
mveDave Kreskowiak6-May-08 5:49 
GeneralMessage Removed Pin
6-May-08 19:55
Christiaan Laubscher6-May-08 19:55 
GeneralRe: Add a signature to an e - mail message Pin
Dave Kreskowiak7-May-08 1:59
mveDave Kreskowiak7-May-08 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.