Get the page protection of a user mode page from kernel mode - windows

I want to get the page protection of a user-mode page from user kernel-mode.
I know it's possible using the undocumented function NtQueryVirtualMemory (which is the way that windows XP uses when VirtualQuery is called in user mode)
But I rather do it in some documented way...
If it's Possible to traverse the VAD list in a documented way it will be great as well, because it will allow me to check the page protection of a lot of pages quickly.

Related

How to prevent Firefox tracking protection from blocking flickr-images I inserted dynamically with javascript?

Locally I have apache running, calling http://home/s.html
There by Javascript I fetch the xml-file from a flickr-search. I visually want to represent the search, by inserting html in the s.html-page.
The images are all blocked.
Random example for blocked file: https://farm9.staticflickr.com/8120/29612550501_6162ed8901_n.jpg
This is adressed in other questions here on stackoverflow, but not really answered for the following detail:
Is it possible to somehow circumvent the tracking protection using
Javascript?
P.S. Firefox seems to use a protection list organized by disconnect.me
This list is really running wild! It even blocks the small avatar-images (under https://secure.gravatar.com) that are used on the Bugzilla website itself! (Random example page: https://bugzilla.mozilla.org/show_bug.cgi?id=1101005) On a more philosophical view, I wonder if the Firefox developers browse themselves with strict tracking protection, and therefore see their own bugzilla-website slightly broken?
I will post on this topic on superuser, but with an approriate question for superuser. Here I only want to know, if it possible for me to circumvent that blocking with my javascript!

Change browser language preference programmatically

How can I change the browser language preference setting programmatically?
In the scenario at hand, I want to start the webapp in different languages. The app delivers the language as requested in the browser's language preferences, so I want to reconfigure the browser to English, perform some steps, then reconfigure the browser to a different language, and repeat those steps.
For automation, I'd use VBScript (using some COM server?) or QTP (which basically is just a VBScript client in this context), but I don't think this should matter.
If Ansgar does not disagree, I post the final result of researching this topic:
It seems there is no better way than updating HKCU\Software\Microsoft\Internet Explorer\International\AcceptLanguage, and (at least) broadcasting a WM_SETTINGCHANGE message via SendMessage so every process in the current session sees this change immediately.
See http://www.codeproject.com/Articles/20756/Change-Internet-Explorer-Proxy-Setting-without-R for good examples how to do that.
do what google does (rather used to do)....
add a language parameter to your query string from your app...
eg. google.com/?ln=id&from=myApp
on the sessionstart event handler.... determine the ln parameter of the request and redirect the request to the appropriate web page versions, provide an English fallback if their system language is not supported by your site.
or
Add a translation widget to your website (bing.com/translate)... to allow visitors to use machine/human generated translations.

WP7: Is it possible to get a referrer from the installation page/link?

This question involves both programming and architectural subjects.
Firstly, sorry if it was asked previously, with other words or in another way. I just haven't found anything that matches with my issue.
Here we go. Supose that you have developed a WP app and uploaded it to Windows Store. Now supose you have a webpage named "any_dynamic_name_that_can_change.php" with a button that redirects you to your Windows Store app's page. And now, FROM THE APP (after you install it on your device), you want to know the page's name from where the Windows Store was accessed.
I've checked WP docummentations and I'm fully aware that WP SDK don't have any features that allow us to implement this behavior. In android SDK, one can make use of Referrer/BroadcastReceiver features to pass arguments through your page and Google Play. I've sussccesfuly made it in my Android's app version.
My question is: is there a solution to implement this "know-from" behavior? I don't care if it involves using third systems or saving arguments somewhere, or even if the solution is a "hard-to-do" task. I'm just looking for it, if it exists...
Any hints, comments and answers will be very welcome!
And sorry if my question wasn't well explained, or if it is too broad!
Unfortunately the Windows Phone Store does not provide this and has no way of providing the information that would be needed to implement this either.
The nearest thing you could do would be to look at the IP address of requests to the pages with the links and the first request from the app. Obviously there are lots of reasons why this wouldn't be a perfect solution but it may be better than nothing.
The only other solution would involve the person viewing the page(s) and the app to provide a unique identifier such as their credentials.
An alternative approach would be to track clicks on the individual pages. It wouldn't be able to tell you conversions once the person gets to the store but it could tell you which pages were the greatest drivers of people to your apps in the store.
There is a not so complex way to do that.
Requirements:
Register protocol handler into your app like myappname:// or similar.
The big flow for tracking installation referrer is:
1 - Redirect the user to your site into device system browser http://mysite.com/start_tracking
2 - in that page add cookie to keep track of source page
3 - then Redirect user to the windows phone market installation page
4 - ** INSTALLATION PROCESS ** (this register the protocol handler myappname://)
5 - On the first launch of your native app you need to open the system browser with http://mysite.com/referrer_2_app location, then sys browser send to your web server cookie information stored in step 2.
6 - Then your /referrer_2_app redirect the browser to myappname://cookievalue
7 - This automatically re-open your native app and .....
8 - You are able to read /cookivalue and close your tracking
Hope that this big picture is enough.
If someone need more details let me know.
Tobia

use both regular(4kb) session and db session in one codeigniter app?

So I have a framework we've built on codeigniter. It uses regular codeigniter sessions by default which allows up to 4kb storage encrypted on a cookie.
Its for general apps that require a registration process, which can vary in size as questions are generated dynamically through an admin panel. Registration process relies on session data as it redirects throughout process.
I have used db_sessions in the past when I knew this would be an issue on the framework, however, I'm now considering the possibility to always have registration process using db_session and the rest of the site use the 4kb cookie session.
Is this possible. It seems like it could be a really bad idea, but I don't really want to rework the dynamic registration process or really use db_session for whole site as it will eventually make the site run very slow if too many users are online at once.
so I'm think I can just set the variable in config to be true only when the registration controller is loaded(by checking the url via $_SERVER or the uri helper if I can load it in the config which I'm guessing I cant).
Does this seem plausible?
It seems like it could be a really bad idea
You answered your own question :) You'll have issues when the user switches from one page to another. What happens if they open multiple windows, press a 'back' button etc. You'll need to switch the cookie over when they start registration, and switch it back at the end. It will be very very messy for basically no gain.
but I don't really want to rework the dynamic registration process or
really use db_session for whole site as it will eventually make the
site run very slow if too many users are online at once.
The reality is; your website has to be huge to have ANY real performance issues by using a DB for your sessions. Any if you are not using the DB, then you are relying on the cookie stored on the users computer. Depending on your site, this means they might have the ability to edit that cookie and change "admin = true" or something.
Just use the DB session - I think you are overcomplicating the situation.

Javascript user request layer

I am currently writing a compatibility layer between browsers and for this I need to ask the user to confirm an action. Currently the only standard way in JavaScript to do this is window.confirm which is synchronous and I do not want to block the whole site. So I would be searching for a library which can display a asynchronous browser-like request (e.g. the ones they use for Geolocation).
EDIT: And similar to the native one I do not need/want the user interaction to be modal. Just displaying and reacting on user input that is all.
I remember having seen such sites, but cannot remember where.
Can someone point me in the right direction?
As a bonus it would be great if it would work an look like the native ones in IE, FF and Opera.
the jQueryUI library has a dialog plugin that can be made modal. Since it is JS, it does not block the rest of the page execution.

Resources