helloSystem / Utilities

Utilities written in PyQt5, meant for use with helloSystem
BSD 2-Clause "Simplified" License
27 stars 29 forks source link

Consider adding a Hardware Probe utility #13

Closed probonopd closed 3 years ago

probonopd commented 3 years ago

We should consider adding a Hardware Probe utility that could optionally upload data to https://bsd-hardware.info/.

https://abf.rosalinux.ru/import/hw-probe-gui/blob/d010f11a86fc880a18dd2e12d2b5c79453cf92e7/dialog.sh is doing:

hw-probe -all -upload -clean -id "${i[*]}" > $tmpdir/probe 2>&1

if [ -f $tmpdir/probe ]
then
    public_url=$(grep -o https:.*probe=.* $tmpdir/probe | grep -v 'token=')
    probe_is_done="$probe_is_done<br/><br/><b>$probe_view:</b> <a href='$public_url'>$public_url</a><br/>"

    if grep -q "Uploaded" $tmpdir/probe
    then
        kdialog --passivepopup "$probe_is_done" 15
        echo "$probe_is_done">$tmpdir/report
    else
        kdialog --passivepopup "$probe_is_failed" 15
        echo "$probe_is_failed">$tmpdir/report
    fi
    kdialog --title "$title" --textbox $tmpdir/report 630 200
fi

I do have some privacy concerns though.

cc @linuxhw

probonopd commented 3 years ago

https://bsd-hardware.info/index.php?view=howto says:

Private information (including the username, machine's hostname, IP addresses, MAC addresses, UUIDs and serial numbers) is NOT uploaded to the database.

The tool uploads 32-byte prefix of salted SHA512 hash of MAC addresses/UUIDs and serial numbers to properly identify unique computers and hard drives. All the data is uploaded securely via HTTPS.

How can I verify this before uploading?

probonopd commented 3 years ago

During testing, it would be useful to be able to generate temporary probes that would be automatically deleted after an hour or so. Does something like this exist? There seems to be something similar implemented for VMs:

This is a probe of VM, so it's lifetime is limited. Please don't share it.

grahamperrin commented 3 years ago

sysutils/hw-probe

Related: https://github.com/helloSystem/hello/issues/67

Borrowing from an issue elsewhere:

2020-12-31 09 48 45

A minor issue: With hello-12.1-RELEASE-0a2ed28-amd64.iso (202012301349), initial launches of the Hardware Probe utility could not run a probe. After sudo pkg install hw-probe:


Side note: https://bsd-hardware.info/?probe=60d9540d35#Logs Biosdecode, Xinput, Lspci and Lsusb are not linked; not a helloSystem issue but (given what's in the screenshot) maybe sysutils/hw-probe needs another dependency or two to be expressed.

probonopd commented 3 years ago

sudo pkg install hw-probe

This will be fixed in the next build.

grahamperrin commented 3 years ago

Today's https://bsd-hardware.info/?probe=97a3ac7e36#Logs looks better. Uploaded using the GUI whilst booted live from a USB flash drive that was written from hello-0.3.0_0C155-FreeBSD-12.1-amd64.iso.

Two logs not present (struck through).

biosdecode(8)

@bsdhw should there be a log?

xinput(1)

Again, should there be a log?

probonopd commented 3 years ago

What happens if you run sudo biosdecode? Will add the xinput tool to the installed packages.

grahamperrin commented 3 years ago

Booted from hello-0.3.0_0C155-FreeBSD-12.1-amd64.iso in a virtual machine, at the time of writing:

FreeBSD% sudo biosdecode
# biosdecode 3.2
ACPI 2.0 present.
        OEM Identifier: VBOX  
        RSD Table 32-bit Address: 0xDFFF0000
        XSD Table 64-bit Address: 0x00000000DFFF0030
SMBIOS 2.5 present.
        Structure Table Length: 450 bytes
        Structure Table Address: 0x000E1000
        Number Of Structures: 10
        Maximum Structure Size: 255 bytes
FreeBSD% 

I'm a little confused, https://www.freebsd.org/cgi/man.cgi?query=biosdecode&apropos=0&sektion=8&manpath=FreeBSD+12.2-RELEASE finds nothing, from which I might assume that it's a port (not integral to the OS) however I can not find biosdecode in FreshPorts.

probonopd commented 3 years ago
% pkg which /usr/local/sbin/biosdecode 
/usr/local/sbin/biosdecode was installed by package dmidecode-3.2

https://github.com/helloSystem/ISO/commit/78182f6ff8c4fe9f7ee854e83b40bba522fc5623

probonopd commented 3 years ago

Implemented