i would like to get the User-Agent for Microsoft Edge from a local file in Windows 10.
(In other words, i want to get the User-Agent of MSEDGE currently installed on my PC without any outbound connection.)
Can you tell me which file it is contained in?
i don't care what method you use, as long as you can get an exact match to the actual User-Agent.
i am going to use Perl to get it.
(Just tell me which file contains the User-Agent or how it is generated from a local file.)
my browser User-Agent was in the following format
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/zzz.z.zzzz.zzz Safari/537.36 Edg/XXX.X.XXXX.XX
(Win64; the x64 part also differs depending on the environment.)
The XXX.X.XXXX.XX part can be obtained from the following folder name.
%ProgramFiles(x86)%\Microsoft\Edge\Application\XXX.X.XXXX.XX
(There may be multiple folders, but here i choose the one with the highest number.)
The zzz.z.zzzz.zzz part appears immediately after the string explicitly-allowed-ports inside the following file.
%ProgramFiles(x86)%\Microsoft\Edge\Application\XXX.X.XXXX.XX\msedge.dll
by merging these, i decided to make it a UserAgent string.
i think msedge.dll is not so efficient because it is huge, but i achieved my goal tentatively.
if you have a better way, please answer/comment anytime. thanks.
Related
I have a bunch of files in a Git repo which works okay on macOS and Linux, but will fail on Windows because the file name contains ?
I was wondering how do I configure Git only on my local Windows machine so that I can check it out and have it auto convert the file to something Windows will allow and push it back preserving the file name?
The best way to do this is to use the Windows Subsystem for Linux. It has a fully POSIX-compatible file system and is fully capable of storing arbitrary byte values (with the normal exceptions).
It is almost certainly not going to be possible to use Git for Windows on a native Windows file system, although if you happened to format an external hard disk as UDF (which, I believe, requires the full disk, not just a partition, to be formatted that way on Windows), then you could probably check it out there. UDF is at least capable of handling these characters on Unix.
I understand that KHTML is the HTML Layout Engine used, but what significance does the "like Gecko" part have? Why is it there?
Is there a historical reason similar to the "Mozilla" part of the User Agent String?
Konqueror began to pretend to be "like Gecko" to get the good pages,
and called itself Mozilla/5.0 (compatible; Konqueror/3.2; FreeBSD) (KHTML, like Gecko).
For more information, read:
Andersen, Aaron (September 3, 2008) -
History of the browser user-agent string - WebAIM
There's one symbol named KeTickCount which works in 32-bit, but when I applied that in my 64-bit dump (Windows 2008), it doesn't work anymore. Did windows change the value?
The only approach I can do is that use ".time" to get the current uptime and multiply it with ticksPerSecond, which is troublesome and inaccurate.
Run !kuser to get at that in windbg.
According to several posts on the internet, it has a hard-coded address of 0FFFFF78000000320h. I haven't tried it though.
If Firebug is not working or to grep the pulled URL, how do to it in Bash?
(on Windows, we can use Fiddler. On Mac there seems to be a tool tcpdump)
Sometimes Firebug is not working or if to grep if a certain path or domain URL is being pull,
can that be done on the Mac's Bash?
(such as to check if there is a pull of connect.js, or anything from www.foobar.com)
Wireshark
I don't know of a way to do it with bash, but from your question it sounds like the Wireshark packet sniffer would be a good option. You set it up to capture all packets matching a specific set of criteria (for instance, those going to host www.example.com:80) and you can then inspect the HTTP traffic.
On Mac OS X you may try http://www.charlesproxy.com (which is similar to Fiddler).
Is there a way that I manually have a user look up the current Codepage and locale of their windows OS? Is there a registry setting that stores that information?
It would also be useful if the technique worked all the way back to Windows 2000.
The Win32 GetACP() function works back to Windows 2000 to find the ANSI code page.
The GetLocaleInfo() function works also back to Windows 2000. Call it with a Locale parameter of LOCALE_SYSTEM_DEFAULT (or LOCALE_USER_DEFAULT, etc.)
If your question is not how you can get this data programmatically, but instead how a non-programmer can look up this info, then you probably want to post the question on ServerFault which is the right spot for questions like that.