I’ve been working on this presentation for a long time, so it was awesome to get the first chunk of it out there. Then I saw Graham Pugh publish his with presenter notes included and was like “oh Graham’s really, really smart, so I’ll copy him!” so here’s mine: Just to put a little color on this (or colour if you’re in Brighton), some of my work on extensions has been in support of building https://www.secretchest.io – a new password manager that shards secrets like keys, passwords, and passkeys to make them quantum safe. There’s a sign-up to get access to our private beta on the site. That started with…
-
-
Detecting LLM-Generated Code
Large language models (LLMs) are a type of artificial intelligence that generates text, translates languages, writes different kinds of creative content, creates net-new artistic works, and answers questions in an informative way. They are trained on massive datasets of text and code, and can learn to produce human-quality output. Because of how they import massive troves of data and create similar content, they can then be fairly formulaic in their output. A few things to look for to help determine if code was written by an LLM: If you are suspicious that a piece of code was written by an LLM, you can use a number of tools to help…
-
Detecting AI-Generated (LLM) Content In Articles
We hear more and more about the pros and cons of AI. There is a movement to regulate the use, movies about dangers of sentient robots, and those who think AI will free humanity from any boring work, or work that involves a lot of repetitive tasks. Going back to the 1950s and 1960s, what they called AI (or what we might call small shell scripts these days) were supposed to “Augment Human Intellect” as the great Doug Englebart wrote about in his 1962 article https://www.dougengelbart.org/content/view/138 or Vannevar Bush’s “As We May Think” from 1945, available at https://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/. What is an LLM? A large language model (LLM) is a type…
-
Google Cloud Function to convert JSON to a plist
The following is a Google Cloud Function that converts JSON to a property list. It uses the json and plistlib modules to return the property list data. Deploy the function as a Python 3.7 runtime with the following in the function code field:
-
Scripts To Show Browser Extensions In Windows
Posted scripts to return browser extensions installed in Firefox, Google Chrome, and Windows Edge at https://github.com/krypted/extensionsmanager/tree/main/Windows%20Extensions. There’s a python and a VBscript version of each. The VBScript uses a Set objShell = CreateObject(“WScript.Shell”) statement to create a new instance of the WScript.Shell object and the strExtensionsPath = objShell.ExpandEnvironmentStrings(“%APPDATA%\Mozilla\Firefox\Profiles\%USERNAME%\extensions”) statement gets the path to the extensions directory, so if it’s different for a given environment, make sure to change that per-script. The Set colExtensions = objShell.EnumFiles(strExtensionsPath, “*.xpi”) statement gets a collection of all the extensions in the extensions directory. The Chrome version looks for crx, etc. Might be a way to do these with custom extension types that I’m not aware…
-
Simple sqlite3 Fuzzer
One of my favorite ways to find escape defects in code is to employ a generic fuzzer. I typically have 5-10 laptops running fuzzers for various projects at a time. I was recently doing some research on sqlite3 and so started to fuzz the implementation built into macOS. The fuzzer generates random SQL statements and executes them against a SQLite database file. If any errors are encountered, they will be printed to the console: There’s not much logic here. Add more complex tests to improve it. Like SQL grammar to generate valid SQL statements, or a genetic algorithm to evolve SQL statements that are more likely to find bugs. Use…
-
Google Cloud Function to convert YAML to a plist
TLDR: The GCF at https://github.com/krypted/tinyconverters/blob/main/GCF_YAML_to_PLIST.py will convert basic YAML to PLISTs. Here’s a Google Cloud Function that converts YAML to a property list. The function takes the YAML data as an event object, uses the yaml and plistlib modules to convert the YAML data to a property list, and returns the property list. To deploy this function, use the “Create Function” button in the Google Cloud Console. When prompted, select the Python 3.7 runtime and paste in the following script: Once the function is deployed, call it with a POST request to the function’s URL and include the YAML data. For example: Given the above input, the response body will…
-
Google Cloud Function to convert YAML to JSON
TLDR: Just posted this little Google Cloud Function to https://github.com/krypted/tinyconverters/blob/main/YAML_to_JSON.py. This Google Cloud Function converts YAML to JSON. The function takes YAML as input, uses the yaml and json modules, and returns the JSON data. The function below should be deployed as a Python 3.7 runtime: Once the function is deployed, call it by sending a POST request to the function’s URL with the YAML: The response body contains the JSON data as follows:
-
New Book, The Startup Players Handbook, Now Available For Download
The physical editions aren’t shipping just yet, but the book I wrote last year with Chip Pearson and Amy Larson Pearson is now available for download through Kindle and the Apple Books app! Writing about business can be incredibly challenging. Especially in a time when it’s evolving more rapidly than at any point in history. Having said that, there are many constants that never change (or at least haven’t). There are also more types of businesses now than ever, and more being started. The approach we took was to lay out the tenants of building a sound business without taking on funding, places where funding might accelerate growth, and what…
-
Lambda Function To Calc The Fields In A JSON Document
Below is a Lambda function to return the number of fields in a JSON document. This Lambda function expects the JSON document in a body field of the event. It loads the JSON document using the standard json.loads() and counts the number of fields by retrieving the keys of the loaded JSON object and calculating the length. The expected response would be a 200 status code if successful, with the number of fields as a string in the response body (which can easily be changed to an int, but made sense to leave as str so if it got some wacky data I’d see that). If the JSON document is…