Showing posts with label link. Show all posts
Showing posts with label link. Show all posts

Sunday, August 9, 2020

Measuring mouse sensitivity

While writing the Super User answer mentioned in yesterday's post, I needed to measure the ratio of physical mouse movement to pointer movement, making sure my 1:1 acceleration curve was actually equivalent to the desired unaccelerated setting. One of the posts I linked supplies a ZIP file which contains a MouseMovementRecorder ZIP file which contains a program that prints every mouse movement. I launched that program, made a very sudden horizontal or vertical mouse movement, and identified an output line with large distances. Dividing the large component of the "pointer movement" column by its counterpart in "mouse movement" produced the desired ratio, 2.5 by default on my system, though it probably varies by DPI. After setting an acceleration curve with a different slope, I measured again to make sure the ratio was scaled by the desired factor.

Friday, December 27, 2019

Seagate SeaTools can help test other brands of drives

Today I needed to check the health of a drive whose manufacturer doesn't seem to distribute diagnostic software specifically for it. I would have looked over the SMART information with Speccy, but the free version is for home use only and I was working with a business. I had heard good things about Seagate's SeaTools, so I tried that. It was able to perform a handful of checks on the drive which were helpful.

Saturday, June 8, 2019

Java's Proxy can't proxy a class, but Javassist can

One Java project I'm working on needs to be able to create instances of one class (specified dynamically) that act exactly like instances of a class with a very similar set of members. Java's built-in Proxy class can create an object that implements specified interfaces and delegates all method calls to a single handler, but since the resulting objects inherit from Proxy this works for interfaces only. However, the Javassist library provides ProxyFactory, which does something very similar but also allows setting the superclass.

Monday, December 3, 2018

Export-PfxCertificate won't export non-exportable private keys

Upon import to the certificate store, private keys can be marked as non-exportable. A commenter on Super User pointed out that PowerShell's Export-PfxCertificate cmdlet fails on such certificates. That makes sense, though I had hoped the non-exportability restriction was only enforced by UI. There are unofficial/unsupported ways to get around this by using tools like Mimikatz.

Monday, October 15, 2018

IML files from Gradle projects don't need to be in version control

IntelliJ and Android Studio projects include .iml files that seem to represent the project or module. However, that doesn't mean they need to be checked into version control repositories - Gradle projects can automatically generate them when the repository is first imported onto each computer. This JetBrains support article lists all the IDE metadata files that should or should not be in version control.

Tuesday, May 29, 2018

Wildcard certificates from Let's Encrypt

Let's Encrypt started offering wildcard certificates a while back, but not all client programs are able to take advantage of the new API. This Microsoft blog post is a very good guide to using the official certbot client under Bash on Ubuntu on Windows. Two things to note:

  1. *.example.com does not cover example.com, so you need two domains on the certificate: -d example.com -d *.example.com. This will require putting two different TXT records into the same DNS zone.
  2. It can take a while for the DNS changes to become visible to Let's Encrypt. I used Google's dig tool to check that both TXT records were consistently being returned. (Different nameservers may pick up the changes at different times.) Only press Enter on the second verification after both records are live.

Sunday, April 8, 2018

1000 Genomes VCF files might not have all SNPs

I've been trying to determine the co-occurrence of a handful of SNPs using a 1000 Genomes VCF file, but one of the SNPs seems to be absent. Its rsID doesn't appear in the VCF, nor can I find it by position. It's a pretty common SNP if I'm reading its NCBI page right; I expect that it should co-occur with the others that I can find in the VCF.

Per the IGSR site, a couple million variations were culled in the production of the Phase 3 data set (that I'm using) for a handful of reasons including quality control. It's possible that this SNP didn't quite make the cut due to uncertainty.

Tuesday, January 23, 2018

Using external SSL certificates with Winhost

Today I installed an SSL certificate onto a Winhost-hosted site. I didn't want to pay for a certificate from their business partners, so I needed to generate and load an external one. They gave me a CSR, which made things a little trickier than usual. My usual way of getting Let's Encrypt certificates is just to generate a completely fresh one, but that tool can take an external CSR. That requires also having a pre-generated private key PEM, and I can't find a way to conveniently do that on Windows. Fortunately, it's not too hard to generate a key with OpenSSL on Bash on Ubuntu on Windows. After moving that out where Windows applications can see it, I got a signed certificate from it. Winhost wants the PEM version of the certificate file, so -ExportCertificatePEM works as usual.

Saturday, October 21, 2017

Determining the volume of a specified file in PowerShell

NTFS makes it possible to mount one volume in an empty directory of another. Files on the mounted volume will be accessible through paths that appear to be on the host volume. One might wonder, then, how the true volume can be identified given a full path. I wrote a script in this Super User answer that does exactly that. It works by listing the mount points via WMI and finding the one that accounts for the largest chunk of the file path. Then it just issues a Get-Volume on the determined volume so that a volume object is returned.

Friday, October 6, 2017

Acquiring Let's Encrypt certificates on Windows

For a while, I've been getting my Let's Encrypt certificates (in manual mode) in an Ubuntu VM or in the Bash on Ubuntu on Windows environment. Some recent update, however, seems to have broken the BoUoW approach, and since I didn't want to hassle with a VM, I looked for an alternative method. I remembered that someone mentioned ACMESharp, a PowerShell client for Let's Encrypt. It comes with a very helpful quick start guide. I used the HTTP challenge with the manual handler. The only issue I encountered was that Update-ACMEIdentifier with a specified -ChallengeType always returned "pending" even after waiting a while, but supplying only the challenge alias worked as expected, returning a "valid" status very quickly. I was then able to generate a certificate and get it signed.

Sunday, May 21, 2017

Somewhat larger amount of hope for users hit with WannaCrypt

A while ago, someone published Wannakey, a program that can, under some circumstances, extract the private key generated by WannaCrypt. It was only guaranteed to do its job on Windows XP, and was not at the time paired with anything that uses that key to save the encrypted files.

Someone else built on that foundation to create Wanakiwi, which extracts the private key from the running WannaCrypt process and then uses it to repair all the files it can find. It works on Windows 7 as well as Windows XP. There is still an element of chance - the keys could have been overwritten in memory - and a reboot after infection would blow away the whole prospect, but Wanakiwi is much more hope for affected users.

Thursday, May 18, 2017

Small amount of hope for XP users hit with WannaCrypt

The ransomware WannaCrypt generates both halves of its key pair client-side, but it releases the private key so that its victims can't decrypt their files. On Windows XP, though, the function responsible for destroying the key does not immediately erase it from memory.

Someone created a tool to take advantage of those facts. Wannakey searches a WannaCrypt process's memory for the private key, saving it to disk. The caveats are that it only works if the system hasn't rebooted since the infection and that the memory occupied by the key could have been repurposed for something else in the meantime. So this provides a small but nonzero amount of hope.

Friday, May 5, 2017

Windows 10 1703 features a new .NET version

The newest update to Windows 10 - 1703, the Creators Update - includes a new version of the .NET Framework. .NET 4.7 includes small improvements to a handful of components, from Windows Forms (better high-DPI awareness!) to WCF (more security protocols). The new framework version can run on Windows 7 and newer; both online and offline installers are available.

Further reading: the Microsoft Docs article on what's new and the API differences.

Thursday, February 9, 2017

Let's Encrypt and cPanel shared hosting

I decided to finally go through the process of manually generating a Let's Encrypt certificate for Namecheap shared hosting. I have no real Linux machine in my control, so I spun up an Ubuntu 16.04 VM. I then followed this guide to manually requesting a certificate. It was less difficult than I expected; I just had to create a file with the challenge content on the server before pushing the last button in the letsencrypt utility. Then I moved the resulting files fullchain.pem and privkey.pem out of the /etc/letsencrypt/live/mydomain.com folder (with sudo, because that directory is protected).

cPanel has an SSL/TLS section that allows the management of certificate/key files. PEM files are just text, so I copied and pasted their content into the certificate and private key creation text boxes, as appropriate. Finally, I assigned the key pair to the Keen Modding domain. It worked - connections to the forum can now be secured!

Now I just need to repeat the certificate generation for subdomains and my other sites.

Thursday, January 26, 2017

Registry redirection and the WOW6432Node key

Like IO operations from 32-bit applications on System32 are redirected to SysWOW64, 32-bit programs accessing certain parts of the Registry are redirected to a different location. For example, operations on HKLM\Software will go to the equivalent path under HKLM\Software\WOW6432Node. There are some exceptions, where structures are shared between the two Registry views. MSDN has a list of affected locations.

If a Registry change in the normal parts only seems to affect some applications, you probably need to make it in the 32-bit section as well.

Tuesday, December 27, 2016

Students can get AutoDesk products for free

AutoDesk makes software for architects, engineers, manufacturers, and animators. For example, they're the company behind 3ds Max, the powerful 3D modeling and animation program. I had heard of their products, but until recently I didn't know I could actually get them.

If you're a student with a .edu address, they let you have quite a bit of their software for free for three years for educational purposes. Visit their education section for more information and to install the software.

Wednesday, December 14, 2016

You can play "Myst 3: Exile" with ResidualVM

It's very difficult to get Myst III: Exile running on modern Windows if you only use the original media. Though ScummVM can run the original Myst and its sequel Riven, it doesn't work on Myst 3. For that, you'll need its sister project, ResidualVM.

The folder structures you'll need to copy from installation media vary depending on which ResidualVM build you use. If you use the latest stable release, follow the instructions on the web site. If you use the newest development build, use the ones in the GitHub repository.

Friday, November 18, 2016

You can get Myst Masterpiece Edition from the Internet Archive

The Internet Archive has Myst Masterpiece Edition available for download. To actually use it, you'll want the BIN and CUE files from this directory. To convert that BIN into an ISO for free, you can use the demo edition of WinISO. Finally, if you have Windows 8 or higher, you can mount that ISO as a virtual CD drive; otherwise, you can extract it with 7zip or WinRAR.

To play it on a modern computer, you'll want ScummVM. Copy the necessary Myst files from that ISO into a new folder, then run ScummVM. Select the folder where you put those files, and you're good to go.

Wednesday, May 18, 2016

Join the Deep Web Stack Exchange private beta

I originally thought that only people who committed to the Area 51 proposal for the Stack Exchange site about the Deep Web could access the site during private beta. It turns out that anybody who knows about the site can access it via the Area 51 page. Clicking the "Visit the site now!" link will let you create a Stack Exchange account or, if you already have one, create an associated account on the new site.

So far, we have 67 questions; that's from just a bit more than a day of activity. Hopefully we'll keep going strong.

Tuesday, May 17, 2016

Deep Web Stack Exchange site: It's happening!

A couple days ago, I committed to a Stack Exchange Area 51 proposal for a Deep Web site and managed to drum up some additional interest in it. It got 100% committed yesterday and went into private beta today. So far, more than 50 questions have been posted, virtually all of which have one or more answers. Hopefully, we'll continue to experience high activity. Private beta usually lasts 20 days, and if we prove our viability, we go on to public beta, where the possibility of failure/closure effectively vanishes.

Interested in joining? Leave a comment with a way for me to contact you, or ping me in a Stack Exchange chatroom (@BenN).