Skip to content

Commit

Permalink
add some checks
Browse files Browse the repository at this point in the history
  • Loading branch information
chipik committed Aug 7, 2019
1 parent d8aefc4 commit 3228fc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions ble_read_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import argparse
import npyscreen
import subprocess
from os import path
from bs4 import BeautifulSoup
from prettytable import PrettyTable
from threading import Thread, Timer
Expand Down Expand Up @@ -282,8 +283,8 @@
}

if args.check_hash:
if not (hash2phone_url or hash2phone_db):
print("You have to specify hash2phone_url if you want to match hashes to phones")
if not (hash2phone_url or path.isfile(hash2phone_db)):
print("You have to specify hash2phone_url or create phones.db if you want to match hashes to phones. See howto here: https://github.com/hexway/apple_bleee/tree/master/hash2phone")
exit(1)
if args.check_hlr:
if not hlr_key or hlr_pwd:
Expand Down
16 changes: 8 additions & 8 deletions hash2phone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ cp map_hash_num.php /var/www/html/
- SQLite

```
hashmap_gen_sqlite.py dbinit
python3 hashmap_gen_sqlite.py dbinit
```

Fill database with hashes for phone numbers range with your favorite preffix (e.g. +12130000000 -> +12139999999)

- Postgresql

```
python ./hashmap_gen.py 1213
python3 hashmap_gen.py 1213
```

- SQLite

```
python3 hashmap_gen_sqlite.py 1213XXXXXX
```

## Usage
Expand All @@ -52,11 +58,5 @@ http://127.0.0.1/map_hash_num.php?hash=112233

![ph_candidates](img/hash_api.png)

- SQLite

```
hashmap_gen_sqlite.py 1213XXXXXX
hashmap_gen_sqlite.py 1213 XXX-XXX
```

will store the hashes for those numbers in a file named phones.db

0 comments on commit 3228fc1

Please sign in to comment.