Caching details from TCP dump - browser

I browsed a lot of data (lets say visited 30 websites) and saved all the traffic in tcpdump using wireshark. I want to know the caching time(max age) for all the objects in all the websites. Is there any smart way to accurately get caching life for the objects?
Issue: In http response when you get the caching age it just tells you the file type, how we can relate to each response with the correct request.
Thansk

Apply a display filter:
http.request_in || http.response_in || http.cache_control
Add columns.
Select in the Packet Details pane: http.request_in
Right-click and select Apply as Column
Repeat those steps for "http.response_in" and "http.cache_control".
Export the displayed packets to a .csv file to get an overview.
Go to File
Export Packet Dissections
as "CSV" (Comma Separated Values packet summary) file...
Packet Range:
select All packets
Select Displayed
Hope this helps.
Edit (see comment): find http.request_in
Apply a display filter:
http.request.method == "GET"
Select a packet
Go to the Packet Details pane
Right-click on Hypertext Trasnsfer Protocol
Select Expand Subtrees
Look for [Response in frame: ]
FYI
Display Filter Reference
http

Related

Is it possible to display dict.values() under the wx.ComboBox but transmit dict.keys() to Bind event?

I'm working on a GUI based on wxpython and have the following question regarding wx.Combobox feature:
Is it possible to display dict.values() in the drop down list and select one of the displayed item but in Bind event send dict.key for this item somehow? I want to present possible options for selection in a user friendly way - example is below.
I think it should be possible with the dictionary but don't know how to realize that.
I'm parsing all Sections from INI file with configparser to a list:
sections= ['123ABC456','123DEF456','123GHI456','123JKL456','123MNO456']
and assign it to Combobox:
self.combo_sections = wx.ComboBox(panel, choices=sections)
self.combo_sections.Bind(wx.EVT_COMBOBOX, self.on_combo_sections)
self.on_combo_sections function is parsing section's options.
What i need is to convert list items to a readable format:
['ABC','DEF','GHI','JKL','MNO']
And display these values under combobox drop down list. Since initial Section's values are essential for further work - based on section name, configparser gets section's options, how can i send original values instead of formatted ones but still display formatted ones under the drop down?
Thanks in advance for any inputs!
wxComboBox supports associating the so called "client data" with each of its items, so you can use this and store the sections value as this client data, then you will be able to get them back whenever you have an index of combobox item.
Alternatively, just keep your own array in combobox items order and store the sections in it -- this is more or less how "client data" is implemented internally anyhow.
The main advantage of using built-in client data support is that it is kept in sync even if the items are added/inserted/deleted to/from the control, but if your combobox doesn't change after creation, using your own data structure should be simpler.

No data is appearing in SSMS even though my job is running without errors

Problem: No data is appearing in SSMS (Sql Server Management Studio)
I don't see any errors appearing and my job diagram successfully shows a process from input to output.
I'm trying to use the continuous export feature of Azure Application Insights, Stream Analytics, and SQL Database.
Here is my query:
SELECT
A.context.data.eventTime as eventTime,
A.context.device.type as deviceType,
A.context.[user].anonId as userId,
A.context.device.roleInstance as machineName
INTO DevUserlgnsOutput -- Output Name
FROM devUserlgnsStreamInput A -- Input Name
I tested the query with sample data and the output box below the query and it returned what I expected, so I don't think the query itself is the issue.
I also know that the custom events I'm trying to display the attributes of have occurred since I began the job. My job is also still running and has not stopped since its creation.
In addition, I would like to point out that the monitoring graph on the stream analytics page detects 0 inputs, 0 outputs, and 0 runtime errors.
Thank you in advance for the help!
Below are some pictures that might help:
Stream Analytics Output Details
The Empty SSMS after I clicked "display top 1000 rows," which should be filled with data
No input events, output events, or runtime errors for the stream analytics job
I've had this issue twice with 2 separate application insights, containers, jobs, etc. Both times I solved this by editing the path pattern of my input(s) to my job.
To navigate to the necessary blade to make the following changes:
1) Click on your stream analytics job
2) Click "inputs" under the "job topology" section of the blade
3) Click your input (if multiple inputs, do this to 1 at a time)
4) Use the blade that pops up on the right side of the screen
The 4 potential solutions I've come across are ( A-D in bold):
A. Making sure the path pattern you enter is plain text with no hidden characters (sometimes copying it from the container on Azure made it not plain text).
*Steps:*
1) Cut the path pattern you have already in the input blade
2) Paste it into Notepad and re-copy it
3) Re-paste it into the path pattern slot of your input
B. Append your path pattern with /{date}/{time}
Simply type this at the end of your path pattern in the blade's textbox
C. Remove the container name and the "/" that immediately follows it from the beginning of your path pattern (see picture below)
Edit path pattern
Should be self-explanatory after seeing the pic.
D. Changing the date format of your input to YYYY-MM-DD in the drop-down box.
Should also be self-explanatory (look at the above picture if not).
Hope this helps!!

viewJsonService returning too many entries to dataGrid

I've set up an ExtLib REST service as "xe:viewJsonService" and connected it to a domino view. Currently the view contains 63 entries. The documents behind those entries have read access restrictions.
The Json returned by the service is consumed by a Dojo Data Grid (taken from the ExtLib libraries).
The page is accessed by a test user having read access to only one of the 64 entries. This user however sees a data grid containing a single data element, followed by 63 empty entries, like this:
Looking at the raw Json data I see that the service indeed is only returning a single entry, but it knows that there are 63 siblings:
[
{
"#entryid":"1-6C5763E4A122F1D3C1257EC700355386",
"#unid":"6C5763E4A122F1D3C1257EC700355386",
"#noteid":"3FD2E",
"#position":"1",
"#read":true,
"#siblings":63,
"#form":"fInvoice",
"colIconStatus":"imgInvExported.gif",
"colIconLock":"blank.gif",
"invInvoiceDate":"2015-09-21T09:44:27Z",
"invJobInvNumbers":"111\/5152\/52567\/ 001",
"invSupplierNameShort":"My Test Company GmbH",
"invAmount":121.5
}
]
Technically speaking this is correct as the service has access to all 64 entries. Problem is that the data grid is making space for 64 entries instead of only one.
Question is: how can I tell the data grid the correct amount of data to be displayed? Or do I need to manipulate the REST service instead?
EDIT: continuing my search for a possible solution in meanwhile found a few other related questions this one by Eric McCormick (including a very good approach by Stephan Wissel), or this one by Steve Zavocki. So my question would be a duplicate, really... (sorry for that)
Caveat: please read down to the bottom of this answer as you might run into unexpected ussues!
Finally after some playing around I just stumbled upon an obscure property that seems to help, for whatever reason (I'll be making this a new question):
the property globalValues appears to be available for service types xe:documentJsonService, xe:viewItemFileService, xe:viewJsonLegacyService, xe:viewJsonService and xe:viewXmlLegacyService. this property has three fixed options called Entries (= 0x0001), Top Level (= 0x0002) and Timestamp (= 0x0004). Just by playing the goold old "trial-and-error" game I found that setting this property to 1 (= Entries) modifies / filters the resulting data:
by default the raw JSON returned by xe:viewItemFileService looks like this:
{
"#timestamp":"2015-10-14T12:57:59Z",
"#toplevelentries":63,
"items":
[
{
...
}
]
}
Setting globalValues to "1" removes the #timestamp and #toplevelentries fields from the output:
{
"items":
[
{
...
}
]
}
And, more importantly, this also removes the empty rows from my data grid!
There's only one thing that's making me nervous and that is that I can't find any explanation at all in regards to that property. So I really don't have a clue whether there are any unwanted side effects...
Update: thanks to Knut Herrmann I did some more testing on this (see comments below this answer). In my test case there are over 13,000 documents in my view; as long as my test user can only read a small amount of those everything seems to be fine. Then I added 200 more documents to the read-enabled list. Result is a data-grid that constantly has to recalculate its scroll bar: the further down I'm scrolling the smaller the scroll handle gets. As soon as I reach the bottom line however the grid goes berzerk and decides to only display the first 13 (?!?) rows, and also the scroll bar is removed alltogether. Performance isn't as bad as I expected, though.
So I have to agree with Knut that this isn't such a good solution for the combination of large views with a large subset of accessible entries!
Lothar,
I have experienced this before as you pointed out. I believe the answer is to use the 'keys' property to filter out the invalid entries.
I am not sure about how your application is structured, but if the user can only see certain entries in the view, I would consider categorizing by user, and then use the keys to show them only the rows in which they have access.
You asked if you can change the dojo grid to exclude the entries. I think the answer there is no. Your options are to filter via the REST service or via the Notes view.
Here is a related blog post that I wrote on the issues I was having. http://notesspeak.blogspot.com/2013/07/creating-updatable-rest-service-for-use.html
EDIT 2 Additional Things to Try
1) Did you see the comment on my blog post? I haven't tried it myself. Credit goes to blog comment-er "Goo Goo".
"I use this code in onstyleRow event of the grid to solve the blank rows issue "
which using viewJsonService:
var row = arguments[0];
var rowItem = djxDataGrid1.getItem(row.index);
var rowCount = Object.keys(restService1._index).length - 1; //-1 for omit the onUpdate event
if(row.index >= rowCount){
row.customStyles += 'display:none;';
}
2) What I personally did to fix the issue is in this SO answer: How to configure an xe:viewFileItemService on an XPage to filter the data in a categorized view?
Given what you said about your view structure, I am not sure that this will apply to you.

How can I send a SharePoint alert only when a particular column is changed?

I need to trigger alert, if value of particular column (say marks<8, send mail to manager) changes.
What should I do?
Some kinds of lists (e.g. tasks) allow to send alerts when someone changes an item that appears in a particular view. Read the article Use SharePoint Filtered Views to Stop Sending Alerts to Yourself to get all the details (appropriate section begins with Well you need to set up a filtered view).
If you list supports this feature, first create a view that shows only the items that satisfy your marks<8 condition and then configure an alert that uses this view.
You can implement an event handler on the list to do this :
http://www.c-sharpcorner.com/UploadFile/Chandresh.P/EventHandler04292009070324AM/EventHandler.aspx

WATIR: how do drive outlook web access

since the emails loads dynamically how do you find a specific email that contains a button back to your site. This is like signing up at a site. Customer receives email to confirm.
Thanks for the support
BigD
OWA, bless MS's little hearts (at least in the circa 2003 version I'm looking at here) uses frames, so first of all brush up on that or you are gonna be hating life. The list of incoming messages is in a frame named 'viewer' The message summaries are contained in a table lacking any useful means to identify it that is in a div of class 'msgViewerCont" and an ID of dvContents. So to see if a message exists you want to look to see if you can find a row in that table which contains the subject you expect to see.
(be careful using ID values on OWA.. apparently nobody in the group that developed it read the part of the HTML standard that specifies that ID values are supposed to be unique.. the re-use them all over that page.)
Presuming you know the subject of the message you are about to receive, and also that you keep that mail account cleared out so that it will be the ONLY message there with that subject line, then you can check to see if it exists usng
subject = regex.new("subject you are looking for")
browser.frame(:name, 'viewer').div(:id, dvContents).table(:index, 1).row(:text, subject).exists?
to click on it use .click instead of exists.
once you've clicked it, OWA will refresh the PreviewPane iframe.. inside that iframe is another one that has the message body in it.
all those frames, are nested inside the viewer frame. welcome to nested frame hell. hope you enjoy your stay. (like I said, bone up on frames, you're in for a fun ride)

Resources