Merge branch 'development' of ssh://git.tcp.direct:2222/freqy/protomolecule into development

This commit is contained in:
kayos 2021-05-08 15:45:42 -07:00
commit 939f0337b4
4 changed files with 27 additions and 9 deletions

@ -5,6 +5,17 @@ Cross platform BLE scanner and logger with teeth \n
***add a better description*** ***add a better description***
# Dev notes
- **dust** util functions
- **eros** found devices DB
- **phoebe** tiny go stuff
- **scanStuff** well i mean...
- **blueStuff** connect to devices / retreive service characteristics
# TODO # TODO
## Short Term Needs ## Short Term Needs
@ -28,10 +39,7 @@ Cross platform BLE scanner and logger with teeth \n
- If GATT exploits are known, present user with options - If GATT exploits are known, present user with options
- ### Logging - ### Logging vs 6.5 grendel drop
- Exportable
- ### Connect to device - ### Connect to device
- ### Read / Write GATT - ### Read / Write GATT
- ### Device selection - ### Device selection

@ -0,0 +1,5 @@
package blueStuff
//controls connections to found devices to get service characteristics
//func

@ -1,6 +1,5 @@
package eros package eros
// Eros controls the Bitcask db that holds the devices captured during scanning // Eros controls the Bitcask db that holds the devices captured during scanning
// //
// MAC (Key) // MAC (Key)
@ -44,13 +43,13 @@ func Awaken() {
} }
// Remember - store device details into the database // Remember - store device details into the database
func Remember(mac string, name string, adv []byte, services []string) error { func Remember(mac string, name string, adv []byte /*, services []string*/) error {
var err error var err error
details := Details{ details := Details{
LocalName: name, LocalName: name,
Advertisement: adv, Advertisement: adv,
Services: services, //Services: services,
} }
device := Device{ device := Device{
@ -83,5 +82,3 @@ func Recall(mac string) (Device, error) {
json.Unmarshal(bytes, &member) json.Unmarshal(bytes, &member)
return member, err return member, err
} }

@ -4,6 +4,7 @@ import (
"github.com/fatih/color" "github.com/fatih/color"
"protomolecule/src/dust" "protomolecule/src/dust"
"protomolecule/src/eros"
projVars "protomolecule/src/vars" projVars "protomolecule/src/vars"
"tinygo.org/x/bluetooth" "tinygo.org/x/bluetooth"
@ -33,6 +34,9 @@ func Scanners() {
println(device.AdvertisementPayload) println(device.AdvertisementPayload)
//for _, uuid := range device.AdvertisementFields.ServiceUUIDs { //for _, uuid := range device.AdvertisementFields.ServiceUUIDs {
//places captured devices into the eros DB
eros.Remember(device.Address.String(), device.LocalName(), device.AdvertisementPayload.Bytes())
//TODO: create localname fort devices that dont broadcast one * dust.OhNameMeZaddy() * //TODO: create localname fort devices that dont broadcast one * dust.OhNameMeZaddy() *
projVars.ScanList[device.Address.String()] = device.LocalName() projVars.ScanList[device.Address.String()] = device.LocalName()
@ -41,8 +45,12 @@ func Scanners() {
//projVars.InitResults = append( projVars.ScanList[device.Address.String()], 1) //projVars.InitResults = append( projVars.ScanList[device.Address.String()], 1)
//TESTS and Stuff//
color.Red(i) color.Red(i)
//test for data being placed
eros.Recall(device.Address.String())
//time.Sleep(3 * time.Minute) //time.Sleep(3 * time.Minute)
//results = device //results = device