Capture network traffic in IE to file

Andrzej

New Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
Dear Colleagues,

I need to do the following by VBA procedure in Outlook:

1) open in Internet Explorer http:// www. anyaddress.com
2) wait (about 15 seconds) until IE redirects to https:// www. hugedomains.com/domain_profile.cfm?d=anyaddress&e=com
3) read the word "hugedomains" from URL2

I am using WinHttpRequest object to realize that task, but I cannot find property which returns redirected URL
(see attached Sub url_redirect)
I got stuck. Can anybody give me a clue?

I am wondering about another solution : write a code which captures network traffic (IE F12, Network, save to file option), saves to file (networkdata.xml) and finds "hugedomains" word by function InStr, but in this case I completely don't know how to do that....

Sorry for asking maybe stupid (hope not) questions, but I really don't know how to go further.

Regards,
Andrzej Nizankowicz

(admin: hoping my edit to show the urls makes it easier to understand)
 

Attachments

Last edited by a moderator:

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The big problem (as i see it) is controlling IE (or any browser) using VBA - your options are fairly limited. Fiddler could get the url but i don't know about reading it using VBA. You may need to forget outlook and use C## or a VB program in Windows.

Do you just need to get the keyword and is it anywhere in the webpage after redirect? Reading the page might be doable.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Do you have a url that takes longer to redirect? I think it's working as you want here - but my redirects are fast.
when i use
adr = "http:// slipstick.me/17wlo"

the msgbox has the redirected url - it's the same with your url. i can then use regex or instr to find the redirected url.
HTML:
---------------------------
Microsoft Outlook
---------------------------
<!DOCTYPE html>
<html lang="en-US" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<head>
<meta charset="UTF-8"/>
<title>Block Macros in Office 2013/2016</title><meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="The August 9 2016 security update for Office 2013 included a non-security feature to allow administrators to use Group Policy to block macros from running in files that are downloaded from the Internet. This feature was added to Office 2016 earlier this year."/>
<meta name="robots" content="noodp"/>
<link rel="canonical" href="http://www.slipstick.com/outlook/block-macros-office-20132016/"/>
<meta property="og:locale" content="en_US"/>
<meta property="og:type" content="article"/>
<meta property="og:title" content="Block Macros in Office 2013/2016"/>
<meta property="og:description" content="The August 9 2016 security update for Office 2013 included a non-security feature to allow administrators to use Group Policy to block macros from runn
---------------------------
OK  
---------------------------


Your adr url returns me this and i can get the path from the title or css path.

HTML:
---------------------------
Microsoft Outlook
---------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>HugeDomains.com - AnyAddress.com is for sale (Any Address)</title>
<link rel="stylesheet" href="https://static.HugeDomains.com/css/common.css" />
<link rel="stylesheet" href="https://static.HugeDomains.com/css/v3.css" />
<link rel="stylesheet" href="https://static.HugeDomains.com/css/pages_v3b.css" />
<link rel="stylesheet" href="https://static.HugeDomains.com/css/styles_hd.css" />
<script type="text/javascript" src="https://static.HugeDomains.com/js/common.js"></script>
<script type="text/javascript" src="https://static.HugeDomains.com/js/common_v3.js">
</script>
<script type="text/javascript" src="https://static.HugeDomains.com/js/jquery-1.5.1.min.js"></script>
<script language="javascript"> function headerWindowLoad() { return true; } </script>
<script
---------------------------
OK  
---------------------------
(hoping this will be readable)
 

Andrzej

New Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
Dear Diane,
Thank you very much for the answer, but...
URL1 and consequently URL2 was only an example. I am doing that on classified network and I can't give real example.
After redirection from URL1 to URL2 there is no url2 in the HTML page
(I've checked the whole redirected html, I mean section <head> and <body>).
While pressing F12 in IE I can see desired word: Bookmark "network"; in left column URL
(next: protocol HTTP/ Method GET/ Result 200 / Type application json / ...)
How to retrieve that data ? I would really appreciate any idea.

Regards,
Andrzej
 

Andrzej

New Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
Dear Diane, Dear Colleagues,
I need somehow to read redirected URL2
I'm almost decided to capture network traffic and save it to file.
Can anyone tell me if it's possible with VBA and how to do that?
I really appreciate any clues...

Regards,
Andrzej
 
Top