How do I use REGTLIB.EXE to unregister a type library - regtlib

How do I use REGTLIB.EXE to unregister a type library?
Is this even possible? When I type regtlib /? it displays no information at all.

Short answer:
regtlib -u [filename]
Background:
There are (at least) two versions of regtlib.exe. Since at least version 6.0.81.91 (having file size is 40960) it DOES support -u to unregister a .TLB
file.
The version that does not support -u has no version information, which
means that when you view its properties in Windows explorer, there is no
version tab. And the file length is 30720 bytes.
(Original forum post / notes)

Related

SSLKEYLOGFILE environment variable doesn't populate any text file

My operating system is Windows 10 64 bits. I use the latest versions of Firefox and Chrome.
I want to save the pre-master keys in order to use them with WireShark.
For this, I have found many tutorials that all recommend using the SSLKEYLOGFILE environment variable.
However, no matter the path I put in this variable, no file is being created by Firefox (normal and developer editions) or Chrome. This is true even when I restart those browsers or the operating system. This is also true when I clear the cache on the browsers.
I found an alternative way of setting the SSLKEYLOGFILE variable with Chrome by launching the browser with the following argument:
--ssl-key-log-file=PATH
And while this argument does create a log file, it is never populated. It remains completely empty.
What makes this problem even more annoying is that I don't know if there's any debug log that would at least let me know what's happening.
Anyone have ideas on how to solve this issue?
Verified in both Chrome and Firefox
Windows 10 64bit [Version 10.0.17763.379]
I would not use the --ssl-key-log-file flag with Chrome. In my testing, it does not have an effect.
Steps to get SSL keylog file
Change your directory to one that you or your programs have access to. I am using the Desktop folder.
C:\> cd $HOME\Desktop
Set the SSLKEYLOGFILE variable. This sets it for the user (HKCU). To set it for the machine (HKLM), add the /m flag to the end of the command.
PS C:\Users\rj\Desktop> SetX SSLKEYLOGFILE "$(get-location)\ssl.log"
Verify that the variable has been set in a separate powershell window (SetX does not apply to the current window).
PS C:\Users\rj\Desktop> Get-ChildItem ENV: | findstr SSLKEYLOGFILE
SSLKEYLOGFILE C:\Users\rj\Desktop\ssl.log
You can also verify that SSLKEYLOGFILE is a user variable by going to the Control Panel > System and Security > System > Advanced System Settings > Advanced tab > Environment Variables > User Variables. You should see a listing like the powershell example where the value is a directory.
Open Chrome/Firefox and go to an https website like https://stackoverflow.com.
You should see an ssl.log show up on your desktop.
Image of end result
Further Reading
2018-12-07, F5, Decrypting SSL traffic: Great article on doing the above, but cross-platform
2019-03-18, Mozilla, NSS Key Log Format
: The SSLKEYLOGFILE format
2018-08-17, Wireshark Bugzilla, Add TLS 1.3 support: Has good test pcap/SSLKEYLOGFILE contents for TLS1.3 (See Comment 83)
You mentioned that you are using Wireshark. If you using it to export a file from a TLS-encrypted stream in a capture, this article may help you.
One thing I ran into is: Chrome doesn't always fully close when you close the window. Sometimes it stays open in the background. Use the Windows Process Explorer to list all the processes and make cure Chrome is closed. Also, after restarting Chrome, you can double click on it in Process Explorer and select the Environment tab to list all the variables set in it's environment. Make sure SSLKEYLOGFILE is shown in that list. Then Chrome will be sending keys to the specified file.
First off all the problem is that the browsers are protected better and that flaw is patched, thats why you cant capture no ssl. I dont know the details. But chrome with --no-sandbox(linux) option on ,when running will enable you to capture ssl/tls key without any issues from the first try, so you can play with decription of packets. Never tried on windows btw..
This worked for me...
set the SSKEYLOG env: variable as normal in Linux.
just point it to your pefererd save location of the sslkey.log
windows system/advance/env vars/user variables.
add SSLKEYLOGfile with the path to your preferred save location C:/user/sslkey.log
close and your done here.
NSS_ALLOW_SSLKEYLOG=1 is what's missing from the Booleans in Firefox's advanced options.
its been also removed from the general release but is still in the dev ops version. just not listed.
download and install the dev ops version of Firefox
open a terminal start it from its exe if on Linux.
windows just open it from the icon.
go to the about:config
create a new Boolean with NSS_ALLOW_SSLKEYLOG=1 and set it to true.
quit
now create a new symbolic/icon link to the new dev version fire fox version
when you run Firefox from the terminal in Linux the sskeylog should be created and start populating.
run it from the task bar icon in Linux and it doesn't make or update the keylog (just in case you dont want it populating every time you open the browser).
in windows, you will have to disable the env var or it will keep populating every time you open any browser that supports sslkey logging.
on that note opera and vivaldi should work with no changes to the advanced option.
lastly.. open wireshark go to
edit/preferences/protocols/tls
and put the path to the sslkey.log in the pre master secret log box.
click ok.
close everything..
start Wireshark
start your browser (from terminal in linux).
you should start seeing sslkeylog start populating and see extra options for decryption in the tabs of Wireshark.
have fun :)
1st solution:
Restart Chrome
2nd solution:
Use Firefox

weblogic 12.2.1 config wizard C:\Program is not recognized error

Running the Config Wizard via the start menu (Windows 7) simply fails. Running it from the command prompt shows the infamous
'C:\Program' is not recognized as an internal or external command, operable program or batch file
I know this is due to the space in "Program Files" (dir C:\pro* /x doesn't show C:\Progra~1).
The solution I've found for this is to replace C:\Program Files\... with "C:\Program Files\...".
My question is this:
Since the WebLogic config wizard runs from config.cmd, which is loaded with variables for path names, do I have to update Windows system environment variable PATH and put quotes around all path names that have a space (since I don't know what WebLogic is looking for)?
Update:
I tried this and received Files was unexpected at this time. Which made me think I was off with the quotes, but they are paired properly around every path with C:\Program Files. A search on this error resulted with this advice...basically the double quotes are the cause.
If the lack of quotes causes the first problem, and the presence of quotes causes the second problem, what to do? It's a loop...
I installed another JDK in a location with no spaces (still got the error because I didn't change any environment variables because work site will change them back, breaking things).
The install docs in chapter 4 say:
To begin domain configuration, navigate to the
ORACLE_HOME/oracle_common/common/bin directory and start the
Configuration Wizard.
On UNIX operating systems:
./config.sh
On Microsoft Windows operating systems:
.\config.cmd
Which implied at a command prompt (to me anyways). I was reading another site for help and the guy said to update config.cmd to point it to new JDK location instead of JAVA_HOME.
Instead of right clicking on config.cmd to edit it I double clicked it and lo and behold...this nice domain creator GUI opened up where I could specify which JDK to use. Done! No errors...
If that little tidbit were in the docs it would've save me a lot of time and frustration. And no, I'm not a server admin type, just a dev who needed a local web server for testing purposes.
I hope this helps someone.

Chrome not Firefox are not dumping to SSLKEYLOGFILE variable

I'm trying to decrypt SSL packages with Wireshark as described here. I have already created a SSLKEYLOGFILE System and User variable and the log file. I have restarted my computer (running Windows 10), and opened https urls with Chrome and Firefox, but none write to the ssl log file. My Chrome version is 56.0.2924.87 (64-bit) and my Firefox version is 51.0.1 (32-bit). Any idea how can I make any of the two browsers write to that file? Or is there any way to get the SSL key to be able to decrypt SSL packages in Wireshark?
You are doing something wrong. Tested on version 58 & you do not need to reboot. To activate either:
set environment variable e.g. SSLKEYLOGFILE to %USERPROFILE%\sslkeysENV.pms
run chrome with argument e.g.:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --ssl-key-log-file=%USERPROFILE%\sslkeysARG.pms
With Firefox the features seems to be disabled by default and is only available in debug builds. With Chrome this might have been vanished by switching the underlying SSL engine from NSS (which implemented this feature and is also used in Firefox) to BoringSSL (which maybe does not have this feature).
Update: according to #Lekensteyn (see comment) the feature is again available in current Firefox and Chrome builds.
I have solved it!
You MUST be sure chrome totally be closed. And then reopen a fresh new chrome instance.
Chrome has a default options let chrome run in background enabled.
Double check your taskbar of windows or processes lists to make sure there's no chrome instance exists.
That's why --ssl-key-log-file don't working, chrome stills alive after you click exit button.
Try Firefox Developer edition, the above mentioned feature is turned on by default. I tested yesterday only.
Some antiviruses (like Avast) inject the SSLKEYLOGFILE environment variable into well-known processes like firefox.exe and chrome.exe. If you rename the browser executable file and launch that, then the environment variable won't be overridden.
Try to close your current browsing session, it behave like you just add a new path to PATH, only work from the new session and so on.
Besides what they have already pointed out, I want to show three points that may help. These are tips for Linux (CentOS)
Make sure the file that related to SSLKEYLOGFILE can be written and read, to make sure you can use:
chmod -R 777 sslkey.txt
Make sure your Firefox or Chrome is opened under the same user with the file mentioned, for example under root.
Find some useful comments here

Mercurial: Commit files with more than 255 characters path length (Windows)?

I try to commit a folder hierarchy into out Mercurial repository, which contains files, whiches absolute path length exceeds 255 characters (Windows max. path length).
For these files I receive an error message saying
The system cannot find the path specified
We use TortoiseHG and an Eclipse plugin for Mercurial, both don't work.
Has anybody found a solution for this?
(I do not want to change the repository's location on my HD)
There exists an extension which is aimed at solving this exact problem. It is: https://www.mercurial-scm.org/wiki/Win32LongFileNamesExtension
It uses \\?\ style names to transparently handle long files.
I'm the author, let me know if it works for you.
I've just installed Aaron Cohen' extension, as he suggested.
And it perfectly works with my TortoiseHG 2.6.1 ! Thanks, Aaron!
Though, I'd like to add a detailed guide here, because I cannot find one...
(At least here's what I did on my Win7 x64 - I'm not sure this is the shortest way possible)
1. Download Mercurial-py
Note the Python version required
I've downloaded "Mercurial-2.4.2 (64-bit py2.7)"
2. Download Python
Make sure you're downloading compatible version.
I used "Windows X86-64 MSI Installer (2.7.3)" link
3. Install Python
I've installed it to "D:\Python27"
4. Download pywin32
It's required by the Win32LongFileNamesExtension.
Note the Python version number in pywin32's filename.
I used "pywin32-218.win32-py2.7.exe"
5. Install pywin32
Make sure installer detected correct Python installation
In my case, it's installed in "d:\Python27\Lib\site-packages\pywin32_system32\"
6. Install Mercurial
Make sure installer detected correct Python installation
In my case, it's installed in "d:\Python27\Lib\site-packages\mercurial\"
7. Set PYTHONPATH enviroment variable
setx PYTHONPATH d:\Python27\Lib\site-packages\win32lfn\src;d:\Python27\Lib\site-packages\mercurial\
Use this cli command, or do the same using some other method
Of course, you should adapt paths to your needs
Restart your cli after this, to make sure env. variable is now properly set
8. Download win32lfn
Check for availible downloads on the project's repository page
If there's still nothing, just clone a repository from https://bitbucket.org/remleduff/win32lfn to "d:\Python27\Lib\site-packages\win32lfn\"
Now "win32lfn.pyc" should be in "d:\Python27\Lib\site-packages\win32lfn\src\"
9. Do interanal win32lfn tests
cd /D D:\Python27
python d:\Python27\Lib\site-packages\win32lfn\tests\testwin32lfn.py
10. Create a backup of your repository.
For me, everything went just fune, but you never know....
11. Add win32lfn to hgrc
[extensions]
win32lfn = d:\Python27\Lib\site-packages\win32lfn\src\win32lfn.py
you can find "hgrc" in your ".hg" folder, inside your repository
12. Test it!
The quick and dirty solution is to map a network drive.
For the path c:\some long path\project folder
Map \\localhost\c$\some long path\ to drive Z:\
cd z:\project folder
hg push
We are using this successfully as an interim solution, before migrating to shorter paths.
The mercurial plugins above look good but unfortunately there are numerous non-mercurial bugs related to path greater than 255 characters. For example the VS2010 failure at exactly 259 characters is a real corker!
http://support.microsoft.com/kb/2516078
See https://www.mercurial-scm.org/wiki/Win32LongFileNamesExtension (Aaron pointed to it via the mercurial-devel mailing list).
Another workaround without changing the path to the repo could be to create a second path to it by means of directory junction points. It may work because the reparsing is done at a very low level by the file system driver (or rather some installed filter), so the full (Unicode) path is known by that time and the expansion to beyond 260 characters should work fine. Give it a try. You can use the tool mklink on Windows Vista or 7 and junction.exe from Sysinternals on Windows 2000 or later. For mklink make sure to create a junction point. I'm not sure the reparsing mechanism works the same for directory symlinks (although I faintly remember that it should).
If you don't have a Unicode version of the program available, the limit is 260 characters (including drive letter part). There is nothing to get around it.
However, all ANSI functions are implemented by means of their Unicode counterpart and therefore you may get lucky by providing the full path prepended with \\?\. This may work, but likely won't because the program itself didn't consider anything beyond MAX_PATH (= 260). Ask the author to compile a Unicode version and use the prefix I mentioned. This will fix the issue.
This is a limit of the Win32 subsystem. The absolute path length limit is approximately 32,767 characters. Approximately because the object manager of Windows may expand it (symlinks in the object namespace and the likes).
Windows 10 system running the mercurial 4.4.1 client
Aaron Cohen extension will work I did need make a small one small tweak
based on a comment from mhaecki on this thread: https://bitbucket.org/remleduff/win32lfn/issues/13/not-compatible-with-version-431
in the win32lfn.py file I changed:
from mercurial import util, osutil,cmdutil
from mercurial.i18n import _
to:
from mercurial import util, cmdutil
from mercurial.cext import osutil
from mercurial.i18n import _

KVM install and QEMU install

I try to install qemu, but I should intall the kvm first, and I have checked my cpu supporting the visualization, so I don't know why. Here is the error, when I input kvm.
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
And a new window for qemu comes out, but there are
boot failed....could not read the boot disk, could not read from CDROM(code 0003)
What can I do. I searched the methods for a long time. Thanks!
when I use mobprobe, the problem is here, (I checked my CPU, it supports VMX.)
FATAL: Error inserting kvm_intel (/lib/modules/2.6.38-8-generic/kernel/arch/x86/kvm/kvm-intel.ko): Operation not supported
When I use:~$ kvm -cdrom img.iso -hda disk.img -boot d
open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support kvm: -cdrom img.iso: could not open disk image img.iso: No such file or directory
I don't know why..... Thanks!
The "could not open disk image img.iso" problem is the easier of the two errors: that file does not exist. That argument means "mount the disk image in the file img.iso as the CD-ROM"; that file must exist (and should be a valid ISO). Try downloading a ISO of any Linux flavor, for example.
disk.img must also exist (that argument means "use the disk image contained in the file disk.img as the hard disk"). You can create it using dd, e.g.:
dd if=/dev/zero of=images/disk.img bs=512M count=20
That will create a 10GB disk image in a file called disk.img. Adjust the block size and # of blocks (bs and count) to increase or decrease the size; bs cannot be larger than available memory.
For the second problem, Could not initialize KVM, will disable KVM, there are a number of possible causes:
disabled in BIOS
you are not running as root (i.e. using sudo) and your user cannot access /dev/kvm
the machine you are on is already virtualized (e.g. you are using Amazon EC2). These CPUs may have the VMX flag (because they are paravirtualized) but cannot be virtualized (because the hypervisor won't allow it.)
Note that this is NOT a fatal error; qemu can run without KVM support, it just runs in emulation mode and is quite slow.
The first problem will probably produce some output, examine the output of dmesg (dmesg | grep kvm). It can be solved by enabling it in BIOS.
The second problem can be diagnosed easily by running the commands as root instead of as a user. If that works, you have identified the problem.
The third problem is more difficult to resolve. XEN-blanket may help.
Pasting the output of "sudo kvm-ok" might be allow someone to offer more insight.
The instructions given in here would be translatable to other platforms:
https://help.ubuntu.com/community/KVM/Installation
If you provide more information about the machines you are using and your desired goals, we can be more helpful.
Did you check your BIOS-Settings? Some BIOS let you choose wether you want to activate VT / VMX or not.
Furthermore, I've found following, pretty similiar thread:
http://ubuntuforums.org/archive/index.php/t-755122.html
Hope this helps
Your problem is your system does not have KVM modules inserted. Please check your BIOS setting regarding VT is enabled, and also your KVM module matches your specific Linux distribution. An unmatched version of KVM module and Linux cannot be inserted.
Check the VM xml CD-ROM is set as 'file' not 'block'.
try to load kvm-intel or kvm-amd kernel modules, then take a look at dmesg, if loaded successfully you should be good to go