evilsocket/bleah

error reading datafile

NadSo opened this issue · 28 comments

NadSo commented

Hello,
I wanted to read a data file but I got the following error:
datafile_error

the file.txt is saved under the same directory where the bleah is

is file.txt in the folder where you're running the tool from?

NadSo commented

file.txt is saved under: Desktop->bleah-master->bleah

you're running the tool from your home folder, give it the correct path of the file, how do you even expect it to work if you don't do that?! -.-

NadSo commented

but that is what I did

no, your CWD is your home, so -r file.txt means -r /home/kamdem/file.txt which obviously does not exist .. learn to use a terminal please.

NadSo commented

Is it supposed to do that?

datafile

NadSo commented

I thought it would Read data to be written from the file.txt. Instead of it It just scan for BLE devices

There's a help menu and several examples in the README, you clearly didn't bother reading and understanding that documentation.

NadSo commented

no it is not true. In the README the description says "Read data to be written from this file" . There is not any example about the datafile.

it can be any data

NadSo commented

thanks yungtravla for your reply. But I thought the data in my file.txt should be read

? The grammar in the --help and README.md are correct, maybe you are misinterpreting?

Bleah reads the data - that will be written - from your text file

so it reads whatever contents from your file.txt and writes it to the UUID that you specify from a ble device

NadSo commented

so for example if my file.txt contents the data: 1,2,3,4. the tool will write this data to the UUID ?

Have you tried --data? Then you will understand --datafile/-r

NadSo commented

yes I did. --data is used to write some data to the characteristic

and yes.

bingo, and --datafile does the same, but reads the data from a file

NadSo commented

In the same way --datafile/r is used the write data to characteristic from the file.txt, right?

that is exactly what I said and what is written in the docs.

wait. what...? Did you really just say it is used to write data to characteristics from the file.txt? Grammar plz

please explain to me what characteristics from a txt file are

NadSo commented

Thank you so much. So by using --datafile I have to specify which characteristic I want to write data to. That is what was missing

NadSo commented

I meant write data from the file to characteristics

try bleah -t10 -fe

wait 20 seconds, and bleah will enumerate all the characteristics

000fe00-000f-00f0-00f0-0000f00f0f0f00f these address types are UUIDs, you can write data to a UUID if it has the WRITE property listed next to it

Fixed by properly handling the exception:

lulz