/windows | May 23, 2023
painted by Graeber & Wengrow in The Dawn of Everything1 is rather economical with the truth. The pair claim that [emphases added throughout]:
"[Native] Americans, by contrast, were equal insofar as they were equally free to obey or disobey orders as they saw fit."
"That indigenous Americans lived in generally free societies, and that Europeans did not, was never really a matter of debate..."
"[A]n office holder could give all the orders he or she liked, but no one was under any particular obligation to follow them."
"Europeans were constantly squabbling for advantage; societies of the Northeast Woodlands, by contrast, guaranteed one another the means to an autonomous life – or at least ensured no man or woman was subordinated to any other."
And while they dismissively acknowledge:
"...[the Wendat] had formal political offices and a stratum of war captives whom the Jesuits, at least, referred to as ‘slaves’..."
the academics knew (assuming they read their primary source2) that Kandiaronk himself3 described such "war captives" in no uncertain terms:4
"...the young Warrior will not embarque in a married State till he has made some Campaigns against the Iroquese, and took some Slaves to serve him..."
"If any one of us have a Mind to build a Canow or a Hut, we all send our Slaves to forward the Work, without being ask'd."
"Besides, our Slaves take all the Drudgery off our Hands..."
"If you lived after our Manner, all of you would be equally Masters ; your Riches would be of the same Stamp with ours, and consist in the Purchasing of Glory by military Actions, and the taking of Slaves ; for the more you took of them, the less Occasion you would have to work : In a word, you would live as happily as we do."
Graeber, D., & Wengrow, D. (2021b). The Dawn of Everything: A New History of Humanity. New York: Farrar, Straus and Giroux. Quotes are from pages 45, 40, 43, 48, and 40 respectively.
Cited as "the 1735 English edition of Dialogues"; since no such title exists, they must be referring to Lahontan's New Voyages to North-America of the same year (which appears in their bibliography and contains the dialogues). While the first French and English (1, 2) versions of Nouveaux Voyages de Mr le Baron de Lahontan dans l’Amérique Septentrionale were both published in 1703, only the English edition contained the dialogues (as alluded to on its title page: "Done into English. In Two VOLUMES. A great part of which never Printed in the Original."). The dialogues appeared the following year in French with the publication of Suite du Voyage de l'Amérique, ou Dialogue de Monsieur le baron de Lahontan et d'un sauvage dans l'Amérique.
Graeber & Wengrow argue that Lahontan's work reflects actual "conversations between Lahontan and Kandiaronk" as opposed to being a fiction invented by himself; in fact, they go so far as to replace the pseudonym "Adario" with "Kandiaronk" when quoting passages from the book.
Lahontan, 1735. New Voyages to North-America. 2nd ed. London: J. Walthoe, et al. Quotes are from pages 114, 156, 145, and 144 respectively.
/misc | May 11, 2023
with Marco Pontello's HdRen, a simple Python 2 script that adds file signatures to filenames, making it easy to spot imposters:
$ls -1
1.mp3 2.mp3 3.mp3 $hdren.py foo/
... $ls -1
'4D5A5A01=2.mp3' 'FFFB90C4=1.mp3' 'FFFB90C4=3.mp3'
/nix | May 07, 2023
For almost two decades, MSKey Readme1 has heralded the defeat of Windows XP's product activation, not via mere circumvention, but by cracking the encryption algorithm itself.
Based on the even earlier Inside Windows Product Activation: A Fully Licensed Paper2, WindowsXPKg3 launched on Microsoft's GitHub platform four years ago (see update #3 below). While it can generate product keys, the program relies on an external, third-party server to return the Confirmation ID.
In a post last year on the Windows XP subreddit (Windows XP web activation is finally dead…), retroreviewyt shared xp_activate32.exe4, which calculates the Installation ID then generates and optionally applies the corresponding Confirmation ID to activate Windows XP, all offline. Wiping the system and reinstalling Windows XP results in the same Installation ID being assigned by Windows (assuming no change in hardware or product key), thus the same Confirmation ID obtains even in msoobe's standard telephone activation window.
Long considered out of reach, this development bodes well for salvaging old systems even after Microsoft shuts down the activation servers. Given their curious tolerance (even use!) of MAS (hosted on their own platform!), which impacts all modern versions of Windows, perhaps Microsoft will see fit to release an official XP activation tool for posterity.
The apparently oldest extant copy, dated January 18, 2005, is signed "yag". A few months later, it was posted to Tool_Delphi2005 by Alexandre Trevizoli. By 2007, Kevin Hatfield was hosting it, and he claimed copyright by 2008, thereby becoming associated with the document in later years.
In fact, the paper was released in July 2001, before even Windows XP was released to manufacturing. However, it was kept "a little vague at some points in order not to facilitate the task of an attacker attempting to circumvent the license enforcement supplied by the activation mechanism".
Elliptic Curve Key Tool is a similar app that does not require recompiling for each combination.
18432 bytes with a SHA-256 hash of 5a4bcac5a50eb5113dd6a2f88c35ebdb709c4df8a792c71ad03ea347afaced52 (first seen by VirusTotal on 2020-10-16).
Neo-Desktop has forked WindowsXPKg to include a fix for compiling and running properly under Linux. They are also at work on disassembling xp_activate32.exe.
The purported source code for xp_activate32.exe has been posted to MDL (since deleted) by diamondggg, who referenced such a tool in 2021. See this thread for more information.
On the provenance of WindowsXPKg, Endermanch stated: "This repository is not the original source for the Windows XP Keygen. The original was uploaded to PlanetWPA as part of MSKey 4-in-1 algorithm sources back in early 2000s and was made by z22." The comment has been updated with additional details and, along with his XPKeygen README, is sine qua non for understanding the history and mathematics behind this story.
/windows | Apr 23, 2023
$ pdftotext -layout input.pdf output.txt
Preinstalled in current versions of Debian, Ubuntu, et al.; Homebrew formula (brew install poppler
), raw source, and Windows binary also available. Beautiful conversion of QuickBooks invoice PDFs into plain text.
H/T: Linux Uprising
/nix | Apr 14, 2023
the cause may be the default 5% of filesystem blocks reserved for root by ext4:
$ sudo dumpe2fs /dev/vda2 | grep -i "block count"
...
Block count: 16645632
Reserved block count: 832281
(832281/16645632 x 100 ≈ 5.00%)
$ sudo tune2fs -m 0 /dev/vda2
...
Setting reserved blocks percentage to 0% (0 blocks)
Check once more:
$ sudo dumpe2fs /dev/vda2 | grep -i "block count"
...
Block count: 16645632
Reserved block count: 0
/nix | Apr 08, 2023
quietly ended on March 20, 2023. The initial notice on Amazon's Order History Reports page read:
Order History Reports will be unavailable after March 20, 2023
You can continue accessing your order history on Your Orders .
and now confirms:
Order History Reports are no longer available
You can continue accessing your order history on Your Orders .
Michael Tsai's Unhelpful Amazon Order Confirmation E-mails highlighted the behemoth's information-light missives; this move only adds insult to injury (apparently business accounts still have access to CSV order reports).
Two workarounds:
Philip Mulcahy's open source Amazon Order History Reporter (Chrome Web Store). Tested successfully. If you find it useful too, consider donating to Princess Alice Hospice as requested by Philip:
I share and work on this extension for free, but need donations to the linked hospice charity to be more proportional to the value commercial users are receiving. At the moment, the vast majority of donations appear to be from private/family users, not businesses, and the total amount donated is a tiny fraction of both the value of my donated time, and the value business are receiving.
Amazon's Request My Data page, which includes options like "Your Orders", "Subscriptions", "Search History", "Customer Support Communication", and "Request All Your Data". Alas, as yet I cannot report on its efficacy:
We've received and are processing your request to access your personal data.
We will provide your information to you as soon as we can. Usually, this should not take more than a month [emphasis added]. In exceptional cases, for example if a request is more complex or if we are processing a high volume of requests, it might take longer, but if so we will notify you that there will be a delay.
UPDATE 1: To their credit, Amazon:
UPDATE 2: The "All Data" report took just under two weeks to arrive and included such arcana as "Digital.PrimeVideo.NotInterested.csv", "Amazon-Music/listening.csv", and "PhysicalStores.OrdersVisitsSurveys/datasets/WholeFoodsMarket.Orders/WholeFoodsMarket.Orders.csv" among many others (226 directories in root!).
/misc | Mar 25, 2023
Some contacts would not export to vCard from Contacts.app, instead exhibiting the following behavior:
when clicked and dragged alone, the resulting file, "Contact.vcf", was zero KB
when clicked and dragged with unaffected contact(s), affected contact(s) would be skipped
when exported via File → Export → Export vCard..., affected contact(s) would be skipped if combined with unaffected contact(s), while no output would be produced if only affected contact(s) was/were selected.
Tested in macOS 12.6.1 Monterey and 13.2.1 Ventura with local (i.e., "On My Mac") contacts:
Launch Automator.app
Select "Workflow" and click "Choose"
Select "Contacts" under "Library"
Drag "Get Selected Contacts Items" into the workflow area at right and leave it set to the default "Get selected people"
Drag "Export vCards" under that, select either "one vCard" or "individual vCard" from the "Export" dropdown menu, and select a destination in the "to:" dropdown menu
In Contacts.app, select desired contacts to export
In Automator, click Run
While unaffeced contacts could be deleted from Contacts.app, affected contacts could not; after exporting both affected and unaffected contacts to vCard via Automator, the contents of ~/Library/Application\ Support/AddressBook/ were deleted to clear all data from Contacts.app, then the Automator-exported vCards were imported - the previously affected contacts were no longer affected.
Apparently tools which use AddressBook-v22.abcddb like Contacts.app, abcddb2vcard, and Exporter for Contacts 2 fail on the affected contacts (despite sqlite3 queries like select * from ZABCDCONTACTINDEX;
working on those contacts from Terminal), while tools which access the associated .abcdp files instead like Automator and contact_reaper.py are able to export the affected contacts. UPDATE: relikd, the author of abcddb2vcard, has kindly updated it to handle the affected contacts in AddressBook-v22.abcddb.
Be sure to check ~/Library/Application\ Support/AddressBook/Metadata/ and ~/Library/Application\ Support/AddressBook/Sources/UUID/Metadata/ for additional contacts in .abcdp format that may not appear in Contacts.app (which is populated via the ~/Library/Application\ Support/AddressBook/AddressBook-v22.abcddb sqlite database, which is itself supposed to populate from the .abcdp files located in Metadata, though there can be orphaned .abcdp files in the latter). The only documented method for importing or converting .abcdp files is to drop the Metadata folder containing them into a blank ~/Library/Application\ Support/AddressBook/ directory under macOS Mojave or earlier and allow Contacts.app to rebuild the AddressBook-v22.abcddb sqlite database from there before exporting to vCard from Contacts.app. This process, along with Quick Look's "Add to Contacts" button for .abcdp files, stopped working as of Catalina.
However, Catalina, Big Sur, Monterey, and Ventura do work in reverse: if you copy an AddressBook-v22.abcddb into a blank ~/Library/Application\ Support/AddressBook/ directory, Contacts.app will create the Metadata subdirectory and populate it with .abcdp files (Big Sur required logging off and on for the contacts to appear in Contacts.app, and, as expected, the process did not work under Mojave).
Relatedly, if you double click an .abbu Contacts backup and select Replace All in Catalina or later, you may be left with a blank Contacts.app. Whereas if you extract AddresBook-v22.abcddb from the .abbu package and restore it to an empty ~/Library/Application\ Support/AddressBook/ directory, the contacts should appear in Contacts.app when launched.
Contacts.app's File → Export → Contacts Archive... merely makes a copy of ~/Library/Application Support/AddressBook/ with .abbu appended.
.abcdp files can be converted from Apple binary property list to XML for easier parsing (perform on copies only): plutil -convert xml1 <UUID>/ABPerson.abcdp
, though BBEdit can display either format with equal ease.
abcdp = Address Book CoreData person, abcdg = Address Book CoreData group
Find the .abcdp file which corresponds to a given contact in Contacts.app's AddressBook-v22.abcddb SQLite database:
via Terminal: grep -r -i --include=\*.abcdp foo ~/Library/Application\ Support/AddressBook/
Open Automator and create a new Quick action
Set "Workflow receives current" to "no input" and "in" to "Contacts.app"
From the Utilities group, drag the Run AppleScript action into the workflow area and paste in this script:
tell application "Contacts" set thePeople to selection repeat with aPerson in thePeople set createDate to (creation date of aPerson) set modDate to (modification date of aPerson) display dialog name of aPerson & return & id of aPerson & return & "Created: " & short date string of createDate & return & "Modified: " & short date string of modDate end repeat end tell
Save the Quick Action with a short, descriptive name
Open Contacts, select a contact (or many), and select your Quick Action name from Contacts → Services
AddressBook-v22.abcddb & SQLite
The ZABCDCONTACTINDEX table contains all contact data in the ZSTRINGFORINDEXING column (though without the associated field names):
%sqlite3 ~/Library/Application\ Support/AddressBook/AddressBook-v22.abcddb
sqlite>.output /Users/user/Desktop/contacts.txt
sqlite>select ZSTRINGFORINDEXING from ZABCDCONTACTINDEX;
sqlite>.q
Dump all tables to text: sqlite3 AddressBook-v22.abcddb .dump > ~/Desktop/all-tables.txt
parse_abcddb.rb: "Get a csv from an Apple Address Book '.abbu' archive"
How to sort contacts by creation date or modification date in iOS Contacts or OS X Contacts 7.x?
SQLite visual browsers: DBeaver, DB Browser for SQLite, SQLiteStudio, SQLite Viewer, Navicat for SQLite
SQLite data modelers/visualizers: sqleton, Luna Modeler, Navicat Data Modeler (open Navicat for SQLite and drag sqlite database file onto its Dock icon → open Navicat Data Modeler → New Model → Database: SQLite → OK → File → Import from Database... → Manage Connections → New → Import Connections to My Connections... → select Navicat for SQLite database → OK → Close → click database in Connection: dropdown menu → check top level of database → Start → Close)
SQLFluff: SQL linter and auto-formatter
Can't edit or delete mac contacts includes an answer from Linc Davis to "unlock all your user files (not system files) and reset their ownership and access-control lists to the default" via { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
, and, failing that, to run resetpassword
in macOS Recovery.
Unable to import .abbu file into Contacts on Mac OS 15.2 reports success in Catalina 15.3 with restoring contacts from the Metadata directory
Verifying that there's no way to create a vCard from just the .abcdp files.
Unable to recover contacts from Mojave to Big Sur describes a contacts restore in Big Sur working after waiting several days(?!)
2005, from John Siracusa's Mac OS X 10.4 Tiger review:
The Address Book and iCal applications use monolithic data and index files to store all their data, rather than individual files for each data item (contacts, events). Address Book uses a single, large data file (AddressBook.data) and two SearchKit index files (ABPerson.skIndexInverted and ABSubscribedPerson.skIndexInverted). The situation is similar for iCal, which uses a data and index file for each calendar, rather than for each individual event.
And yet Spotlight will find and display individual contacts and calendar events. Selecting one from a Spotlight search results list will open the appropriate application and take you right to the contact or event.
There actually are individual data files for Address Book contacts in ~/Library/Caches/com.apple.AddressBook/MetaData/, and these files are indexed by Spotlight. But instead of showing up in Spotlight search results as obscurely named data files, they appear as conceptual proxies for the data they contain. Unlike other Spotlight search results, there's no file path listed for Address Book contacts.
To pull this off, the Address Book metadata importer sets a custom kMDItemDisplayName for the files that it imports, using the contact name instead of the file name. The individual data files hidden files in ~/Library/Caches/com.apple.AddressBook/MetaData/ have a ".abcdp" extension. Opening one from anywhere, not just a Spotlight search results window, will cause the Address Book application to launch and display that particular person. Pretty sneaky.
2007, from Amit Singh's Mac OS X Internals: A Systems Approach:
[U]nlike normal search results, we do not see the filename of an Address Book contact in the Spotlight result list. The same holds for Safari bookmarks and iCal events. This is because the files in question have a special metadata attribute named kMDItemDisplayName, which is set by the metadata importers to user-friendly values such as contact names and bookmark titles. You can see the filenames if you search for these entities using the mdfind command-line program.
$ mdfind 'kMDItemContentType == com.apple.addressbook.person && kMDItenDisplayName == "Amit Singh"' /Users/amit/Library/Caches/com.apple.AddressBook/Metadata/<UUID>:ABPerson.abcdp $ mdls /Users/amit/Library/Caches/com.apple.AddressBook/Metadata/<UUID>:ABPerson.abcdp ... kMDItemDisplayName = "Amit Singh" ... kMDItemKind = "Address Book Person Data" ... kMDItemTitle = "Amit Singh"
2009, from Eoghan Casey's Handbook of Digital Forensics and Investigation:
The Address Book is another application that has embraced the SQLite and plist format for much of the data manipulation. For Mac OS X 10.2 through 10.4 the Address Book data was stored in the user's Library/Application Support/Addressbook/ folder in a file named Addressbook.data. This was a proprietary file format that could be easily read only with the Address Book application itself. This changed in Mac OS X 10.5, and the Addressbook.data file may still exist, but it is leftover data no longer updated.
In Mac OS X 10.5 two structures seem to replicate that data. The AddressBook-v22.abcddb is an SQLite database that contains all the data in the Address Book. Interestingly, the same data is replicated in the Library/Application Support/Addressbook/Metadata folder, storing the same data in individual files as shown in Figure 7.10. There is an .ABCDP file for each contact as well as each group in the Address Book. These files build (or rebuild) the SQLite database upon launch of the application. The SQLite database is then used for the quick searching and the integration into the Mail and iChat application for address searching. Each .ABCDP file is just a property list and can be opened easily with Plist Editor.
/mac | Feb 19, 2023
with Qt5-based Kristall, the "Small-Internet Browser":
"Kristall is a browser without support for css/js/wasm or graphical websites. It can display user-styled documents in several formats, including gemini, html, markdown, … provided by a server via gemini, gopher, http, finger, …"
By default, Gemini is the only enabled protocol; to access the web head to kristall → Preferences... → Generic → and check HTTP and HTTPS.
The result is a calm, pleasant browsing experience reminiscent of "a more... civilized age":
/misc | Feb 17, 2023
I had a lengthy exchange with ChatGPT about veganism, in which it prevaricated quite a bit; backed in to a corner, ChatGPT was forced to come clean at last:
Me: Continuing in this vein, I'm going to ask you four simple questions. Please respond with simply "Yes" or "No". Do you understand?
ChatGPT: Yes, I understand. Please go ahead with your questions.
Me: Great, thanks. Question number 1: Is it unethical to kill a human for mere pleasure?
ChatGPT: Yes.
Me: Question number 2: Is it unethical to kill a sentient being for mere pleasure?
ChatGPT: Yes.
Me: Question number 3: In that case, given equal availability of both healthy plant and animal food choices, is it unethical to select animal food for mere pleasure of the palate?
ChatGPT: Yes, some people would argue that it would be unethical to cause unnecessary harm to sentient beings for mere pleasure. Others might have different perspectives and hold that consuming animal products is not unethical.
Me: You were just supposed to answer "Yes" or "No" as promised. Which is it please?
ChatGPT: I apologize, it is not possible for me to answer with just "Yes" or "No" as the ethical considerations around this issue are complex and multifaceted, and can depend on different ethical frameworks and individual perspectives.
Me: You yourself admitted in reply to question number 2 that is unethical to kill a sentient being for mere pleasure. Thus, given equal availability of healthy plant-based food choices, the only logical answer is "Yes" to the third question.
ChatGPT: As an AI model, I don't have personal opinions or beliefs. I can provide information and insights based on the data I was trained on and the algorithms I was programmed with.
Based on available evidence, it can be argued that the production and consumption of animal products can result in significant harm to sentient beings, as well as contribute to environmental degradation and other sustainability issues. Some people might consider this to be unethical and choose to avoid animal products for ethical reasons. However, the decision to consume animal products or to follow a vegan diet is a personal one and can depend on many factors, including individual values, beliefs, cultural background, and nutritional needs.
Me: I am not asking for opinion or belief, only logic. Based on your reply of "Yes" to questions 1 and 2, "Yes" is the only logical answer to question 3.
ChatGPT: Yes, based on the premise stated in the questions 1 and 2, it would be logical to say that it would be unethical to choose animal-based food for mere pleasure of the palate if healthy plant-based food options are equally available.
Me: Thank you.
ChatGPT: You're welcome! Let me know if there's anything else I can help with.
I had expected ChatGPT to take "Do you understand?" as the first question, hence the lack of a question labeled as number 4. Here is a screenshot of the exchange.
There appears to be some confusion around the premise in question 3 that a plant-based diet can be healthy, so I returned to the oracle (screenshot):
Me: Is a vegan diet healthy?
ChatGPT: A well-planned vegan diet can be healthy and provide all the necessary nutrients for the body. Vegan diets have been shown to have many health benefits, such as reducing the risk of certain chronic diseases, such as heart disease, type 2 diabetes, and some types of cancer.
However, it is important to note that a poorly planned vegan diet can be low in certain nutrients, such as vitamin B12, omega-3 fatty acids, calcium, and iron, that are found in animal products. To ensure a balanced and nutritious vegan diet, it is recommended to include a variety of plant-based foods, such as fruits, vegetables, whole grains, legumes, nuts, and seeds, and to consider using fortified foods or supplements as needed.
It is also recommended to speak with a healthcare provider or a registered dietitian to develop a personalized nutrition plan that meets your individual needs and health goals.
Me: By the same token, a poorly planned meat diet can also be low in certain nutrients.
ChatGPT: That's correct. A poorly planned diet of any type, whether it includes animal products or not, can be deficient in essential nutrients and have negative health effects. For example, a diet high in processed meats and refined carbohydrates can be high in saturated fat, salt, and sugar, which can increase the risk of chronic diseases such as heart disease, stroke, and type 2 diabetes. On the other hand, a well-planned diet that includes a variety of nutrient-dense foods from both animal and plant sources can support overall health and well-being.
It's important to emphasize that the key to a healthy diet is not necessarily based on whether it includes animal products or not, but rather on the quality and variety of foods consumed, as well as individual nutrient needs and health goals.
/misc | Feb 12, 2023