Headless reinstall and update https://raspberrypi.stackexchange.com/a/57023
- create a text file in /boot/ called ssh
# With this two lines of bash you will donwload the last malware samples extracted from the public lists of www.malwaredomainlist.com | |
# and you'll submit automatically the alive samples (check if the response was an executable or not) to totalhash.com (contribute to | |
# the community) and obtain the detection rate of the sample # from Virus Total (virustotal.com). | |
# As a result you'll get a bunch of executable files and their detection rate in the log "output.virustotal.txt" | |
# Download all the samples detected and listed in the public CSV of mdl.com | |
$ curl -s http://www.malwaredomainlist.com/mdlcsv.php | awk 'BEGIN {FS="\",\""} {print $2}' | strings -n 3 | grep -E "\.exe$|\.so$|\.bin$|\.src$|\.pdf$|\.docx$|\.vb$|\.sh$" | xargs -I% bash -c 'echo "Downloading: %" && curl -s -O %' | tee $(date +%Y%m%d_%H%M)_malware_download.log | |
# Upload the downloaded samples to totalhash.com and query virustotal.com with it MD5 checksum to obtain the detection ratio | |
$ ls *_malware_download.log -ltr | tail -n1 | cat $(awk '{pr |
BASEURL=http://username:[email protected]:3000 | |
for dash in $(curl -s -k "${BASEURL}/api/search" | jq -r '.[].title'); do | |
curl -k "${BASEURL}/api/dashboards/db/${dash}" > "${dash}.json" | |
done |
#!/bin/bash | |
./run.sh "${@}" & | |
timeout 10 bash -c "until </dev/tcp/localhost/3000; do sleep 1; done" | |
curl -s -H "Content-Type: application/json" \ | |
-XPOST http://admin:admin@localhost:3000/api/datasources \ | |
-d @- <<EOF | |
{ | |
"name": "influx", |
Headless reinstall and update https://raspberrypi.stackexchange.com/a/57023
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/godbus/dbus" | |
) | |
// dbus-monitor --system "type='signal',sender='org.freedesktop.NetworkManager',interface='org.freedesktop.NetworkManager'" |
#!/usr/bin/env python | |
import dbus | |
NM = 'org.freedesktop.NetworkManager' | |
NMCA = NM + '.Connection.Active' | |
NMDW = NM + '.Device.Wireless' | |
NMAP = NM + '.AccessPoint' | |
DBUS_PROPS = 'org.freedesktop.DBus.Properties' |
const LEDS = [LED1,LED2,LED3]; | |
const onBtnClick = | |
(fn)=> setWatch(fn, BTN, {edge:"rising", debounce:50, repeat:true}); | |
const turnOn = (el) => { | |
el.write(true); | |
}; | |
const turnOff = (el) => { |
Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.
This process was tested on WSL Ubuntu 18.04.
your-usernamename
#!/bin/bash | |
cve2cveUrl () { | |
[[ $1 =~ CVE-([0-9]{4})-([0-9]+) ]] | |
#echo "${BASH_REMATCH[0]}" | |
#echo "${BASH_REMATCH[1]}" | |
#echo "${BASH_REMATCH[2]}" | |
cveUrl="https://raw.githubusercontent.com/aquasecurity/vuln-list/master/nvd/${BASH_REMATCH[1]}/$1.json" | |
} |