Tech of Interest

Editing an iOS 11 backup manually in Windows

EDIT (2018-11-12): Marcel Dopita wrote a post How to restore modified iOS 12 backup which deals with iOS 12. Give that a read if you need to do this procedure for iOS 12.

So you want to replace one or more files inside an iOS 11 device backup made using iTunes, but you don’t want to pay for a program that does it would rather do this by hand, as it isn’t that hard and you don’t mind getting your hands dirty. So here is the step-by-step guide to replacing files in an iTunes created device backup.

Personal musings

System File Checker and more with Windows 10

The System File Checker is a very useful tool for repairing/replacing vital Windows system files. Sometimes though, it is unable to do its job, and you have to go through the CBS.log file buried in the Windows directory. Here is the Microsoft KB article on using SFC and sifting through the cbs.log file. The command in the article for doing that

findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

will certainly do the job. But I decided to use the excuse to make a ramped up PowerShell version that does the same thing, with a few extra features, and using as many PowerShell commands as possible instead of command line or 3rd party (7zip being the exception). It is just something I whipped up in a few hours, so if anyone spots any bugs let me know.

##### Configurable script variables
[string]$cbsLogFilePath = $env:windir + "\Logs\CBS\CBS.log"
[string]$sfcLogFilePath = $env:USERPROFILE + "\Documents\SFC.log"
[long]$maxLogFilesizeBytes = 1048576
##### End of configurable script variables

[System.IO.FileInfo]$sfcLogObj = $null

# Checks to see if output log file exists and creates it if it does not
if(!(Test-Path $sfcLogFilePath)) {
 Write-Host ($sfcLogFilePath + " does not exist. Creating...")
 $sfcLogObj = New-Item $sfcLogFilePath -ItemType File
else {
 Write-Host ($sfcLogFilePath + " exists")
 $sfcLogObj = Get-Item $sfcLogFilePath

# Archive old SFC log file if current log file exceeds maxLogFilesizeBytes
if($sfcLogObj.Length -ge $maxLogFilesizeBytes) {
 Write-Host ($sfcLogObj.FullName + " is larger than " + $maxLogFilesizeBytes + " bytes. Archiving...")
 7za a -t7z -mx9 -mmt=on -y ($sfcLogObj.FullName + "." + (Get-Date -UFormat "%Y%m%d%H%M%S") + ".7z") $sfcLogObj.FullName
 if($LastExitCode -as [int] -gt 0) { Exit $LastExitCode } # Die with 7za's error number if it is above 0
 $sfcLogObj = New-Item $sfcLogFilePath -ItemType File

# Append SFC log info scraped from CBS log file
Write-Host ("Scraping " + $cbsLogFilePath + " for SFC log entries...")
Get-Date -Format F | Out-File -FilePath $sfcLogObj.FullName -Append -Encoding utf8 
Select-String -Path $cbsLogFilePath -SimpleMatch "[SR]" -CaseSensitive | Out-File -FilePath $sfcLogObj.FullName -Append -Encoding utf8

This page by ZigZag3143 on the Microsoft community posts about using SFC as well, but it goes into extra depth of using the Deployment Image Servicing and Management tool (a.k.a. DISM) when SFC fails. And as a bit of an augment, over here on is an article that goes more into depth about using DISM, including using a mounted Windows ISO to grab files for DISM when even it fails under normal operation.

Personal musings

419 Scam via Skype

I get a colossal amount of spam, usually in e-mail form. This one amused me just because it was as a Skype friend request, and that is different for me as I am relatively new to Skype (yes, I know, late to the game there). Here is the request, verbatim:

Lawyer Ebenezer Sekyi would like to add you on Skype

Enter a message to introduce yourself.Hello Friend, how are you? , I am Lawyer Ebenezer Sekyi, from the Ghana Bar Association. I need your assistance to transfer the sum of $25 Million United States dollars through official bank to bank wire transfer Service to your country. This fund was deposited by my late client Mr. Maj. Gen. Khattiya Sawasdipol the leader of the Anti government protesters who was shot gun on the head on 13th May 2010 he was granting an interview discussion with New York Times.Please kindly read easy here the link: 2010/05/14/world/Asia/14thai.html.

Since i got information about his death, I have been expecting his next of kin to come over and claim his fund currently deposited with the (National Investment Bank Accra), because the bank cannot release the fund unless somebody applies for it as nest of kin or relation to the deceased as indicated in the banking guiding and laws but unfortunately nobody behind for the claim.

It is therefore upon in view of that I now decided to make this business proposal to you to stand contact the bank as the next of kin or relation to the decease for safety and subsequent disbursement since nobody is coming for it, because i don’t want the fund to go into the bank treasury as unclaimed bill.

Moreover if you would want to work with me to carry out this project, you have to take it at high priority and be serious over this project and also treat it as both urgent and confidential until this fund is finally get to your country.

Kindly furnish me with these following details as: Email me on or call me +233246054259.

1. Complete Names & address.
2. Your age, sex, & marital status.
3. Your current occupation.
4. Your Direct Telephone number/mobile
5 Your ID Card

Upon-receipt of the needed information, I shall prepare your file of claim which you will fill and submit it to the Bank for the release of the fund.

Kind Regards,
Lawyer Ebenezer Sekyi

Sorry Mr. Sekyi, I will have to politely decline both your offer and your friend request.

Personal musings

Phishing in 2015

This has to be one of the laziest phishing spam messages I have ever got. Grammar is all over the place, with sentences just truncated for no apparent reason, the URL is not even masked in any way to appear legitimate and in fact has as its domain (although I did learn that .xyz is one of the new top level domains), it asks for the secret question and answer.

Come on phishers, you have to do better; a twelve year old wouldn’t fall for this. This must actually be an experiment someone is doing to see how crap and obvious a phishing spam mail can be and still get hits.Low effort phishing


Cygnus Personal musings Red Hydra

Hard drive 3, me 0

Back in July the 3TB hard drive I use for Cygnus files (but not the OS files, which are contained on a much older 40GB drive) decided it didn’t like me and threw a hissy fit. After several days of fscking it repeatedly, which reduced the partition size to 2TB for some reason, I managed to wrest a working file system back off the beast.

But alas, badblocks run non-destructively caused kernel panics (I assume, since it happens when I am not at the computer itself and it just comes back restarted and running fsck yet again), so once I put the house of cards that is the file system on that drive back together again, I decided to just get what data I could save using ddrescue.

Naturally at this point, the beast fights back with this little problem:

ddrescue pain
Gotta love that read speed

The partition has about 685GB of data on it, of which I have no idea of its integrity at this point. I have been running ddrescue 24/7 for 2 months straight now, and I have no idea if it is going to be all for naught.

I suppose the lesson is: if you are just fiddling around with an old computer as a household server/tinkering box, when you start to make something more important on it that you actually care about, maybe then you ought to consider backups or something.

Personal musings Tech of Interest

Xamarin & stuff

So a friend has pointed me to Xamarin, and I must say I am interested. The ability to deploy an app across many platforms using almost entirely C# (which is one of my favourite languages, I must admit) with little overhead, what’s not to like? I will probably be fiddling around with it in the near future on my spare time, as I work on my current contract.

Incidentally, this contract, which I started several weeks ago, is one of the main reasons I haven’t done much in the way of Cygnus or Red Hydra coding. That and I suck at blogging. 😉

Patch notes Red Hydra

Red Hydra ver 0.3 alpha

Patch notes:

  • Tweaked Product class to fix minor issues
  • Modified main page to display list of recently updated products
  • Modified config vars to have “CFG__” prefix for easier identification
  • Removed unique index on Version.Name column in DB that prevents different products from having the same version names (holdover from Cygnus behaviour)
Patch notes Red Hydra

Red Hydra ver 0.2 alpha

Patch notes:

  • Renamed “Project” and references to it to Product
  • Renamed Red Hydra main page description to “Simple Product Issue & Version Tracking”
  • Added capability to sort by name for future use
  • Removed issue type field as it is oversimplified
Patch notes Red Hydra

Red Hydra ver 0.1 alpha

Finally got around to forking the issue & version code (along with a not insignificant amount of other Cygnus code) from Cygnus v3.2. Ironically, since I cannot use Red Hydra as a bug tracker for itself yet, I need to keep track of them in a text file or something.

Patch notes:

  • Copied over frontend issue and version display and administration files
  • Copied over menu, header & footer, and DB connection include files
  • Copied over issue and version class files
  • Copied over CSS main file
  • Created Red Hydra dev and prod DBs, then copied over Issue and Version tables & data
  • Copied over config.php, with modifications
Cygnus Patch notes

Cygnus ver 3.2

Patch notes (from Dec 30, 2013):

  • Modified main admin page to reduce slow loading
  • Altered movie serieses and tv shows to use new sorting methods
  • Fixed opening a movie browse page other than offset 0 (page 1) which displays an empty list
  • Fixed adding or editing a movie or episode to perform validation before files are uploaded
  • Added a check for file move failures after they are uploaded