This is a collection of a few of my smaller webOS scripts.
License: AGPL v3 or later
#!/bin/bash | |
export CRED=root@id | |
SSH=$(whereis ssh | awk '{print $2}') | |
JQ=$(whereis jq | awk '{print $2}') | |
SCP=$(whereis scp | awk '{print $2}') | |
if [ -z "$SSH" ]; then | |
echo "Unable to find ssh" 1>&2 | |
return 1 |
#define STRICT | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#pragma warning(push) | |
#pragma warning(disable:4820) | |
#include <dbt.h> | |
#pragma warning(pop) | |
#include <stdlib.h> |
#!/bin/sh | |
# Directory to store overlays in (one directory structure is created per overlay configured down below) | |
OVERLAY_BASE=/var/lib/webosbrew/customca | |
overlay() { | |
set -e | |
overlay_id="$(echo $1 | sed 's;/;__;g')" | |
unset TARGET SOURCE FSTYPE OPTIONS | |
eval $(findmnt -P $1) |
This is a collection of a few of my smaller webOS scripts.
License: AGPL v3 or later
I'm hoping this will help other people seeking to identify this component.
I²C digital temperature sensor IC from Mitsumi (MinebeaMitsumi).
Comes in an SO-8 (SOP-8D) package. The marking 286C
is on the bottom right. The "M" logo in the upper left looks a lot like the logo for Microchip. There is a 3-digit date cod
#!/bin/sh | |
# by throwaway96 | |
# licensed under AGPLv3+ | |
# https://gist.github.com/throwaway96/bb31a17562eec4d8325020dee8c7e6b5 | |
cert=/home/root/something.crt | |
name=lol_hax | |
file="${name}.pem" | |
tmp="/tmp/tempcert.pem.${$}" |
There is a vulnerability/backdoor in webOS 5+ that allows you to easily run arbitrary commands as root during the boot process. The easiest way to exploit it simply involves putting a file on a USB drive and having it connected to your TV while it boots. There are two other methods that are more complex and require additional exploits.
This is a note on how I fixed a relatively minor issue with Microsoft SQL Server Express LocalDB. The solution was a bit difficult to find. Therefore I'm writing this in the hope that it will be found by other people who have the same problem and Google the error message text. This is based on a StackOverflow answer by Yennefer. I've added a bit more detail and an alternative way to delete the triggers. I'm leaving out most of my mistakes, several dead ends, etc.
I'm certainly no expert on anything in this document. I'm just sharing what worked for me.
When I opened Microsoft's Volume Activation Management Tool (VAMT) and tried to connect to my LocalDB instance as usual, I got this error:
The Python interpreter on webOS 1‒6 is python
(Python 2.7), while on webOS 7+ it's python3
.
To make a Python script that can be run on any version of webOS, I added a bit of shell script at the top that figures out the name of the Python interpreter and uses that to re-execute itself:
#!/bin/sh
''''command -v -- python3 >/dev/null && exec python3 -- "$0" "$@" || exec python -- "$0" "$@" # '''
Python ignores this because it just sees a docstring (idea from here), and the shell is no longer running after exec
. I'm sure someone else has already done this, but I didn't really know what to search for. (Edit: Found this. It's more thorough, but a lot longer.)
WinMerge's Compare As > Disassemble IL Code and Disassemble Native Code options appear to be almost completely undocumented, so when I came across the error message Visual Studio not installed
I wasn't able to find any relevant information online. I'm hoping this document will help anyone who runs into the same problem in the future.
If you don't care about the explanation, you should be able to solve the problem by opening the Visual Studio "Developer Command Prompt" and running this:
mkdir "%APPDATA%\WinMerge\Commands\ildasm" "%APPDATA%\WinMerge\Commands\dumpbin"
where.exe ildasm.exe >"%APPDATA%\WinMerge\Commands\ildasm\ildasm.txt"
where.exe dumpbin.exe >"%APPDATA%\WinMerge\Commands\dumpbin\dumpbinpath.txt"