Skip to content

Commit

Permalink
Latest Release RM1022-1815-0.93.1-c265f9f on PATREON - UPD PICOPASS +…
Browse files Browse the repository at this point in the history
… BLE SPAM
  • Loading branch information
RogueMaster committed Oct 24, 2023
1 parent 3e0ed7c commit dfdda47
Show file tree
Hide file tree
Showing 23 changed files with 124 additions and 130 deletions.
3 changes: 2 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ This software is for experimental purposes only and is not meant for any illegal
- Updated: [Bluetooth/USB Remote v1.5 (By Cutch)-OFW](https://github.com/flipperdevices/flipperzero-firmware/pull/1330) [Accelerated Mouse Pointer. Screen Nav is easy now! (By LeeroysHub)](https://github.com/LeeroysHub/flipperzero-firmware-wPlugins/commit/f67680d5b004a72419550a8268802030a8421643)
- OFW: [FastFAP: human readable error log #3156 (By DrZlo13)](https://github.com/flipperdevices/flipperzero-firmware/pull/3156)
- OFW: [fbt: glob & git improvements #3151 (By hedger)](https://github.com/flipperdevices/flipperzero-firmware/pull/3151)
- Updated: [BLE Spam v3.3 (By Willy-JL & ECTO-1A & Spooks4576 with research from xMasterX; OFW API thanks to noproto)](https://github.com/noproto/apple_ble_spam_ofw) [New Android Spam (By John4E656F)](https://github.com/John4E656F/fl-BLE_SPAM/blob/main/protocols/fastpair.c)
- Patreon Build Update: The ALL build is being replaced by ANIMSWITCHER. Too many people installing the ALL build and expecting their Flipper to work well without reading warnings on the ReadMe. If you have too many animations, Flipper runs slower.
- Updated: Accelerated Mouse Pointer Code Improvements (By LeeroysHub / Idea From Willy-JL)
- Updated: [BLE Spam v3.3 (By Willy-JL & ECTO-1A & Spooks4576 with research from xMasterX; OFW API thanks to noproto)](https://github.com/noproto/apple_ble_spam_ofw) [New Android Spam (By John4E656F)](https://github.com/John4E656F/fl-BLE_SPAM/blob/main/protocols/fastpair.c)
- Updated: [PicoPass (iClass) v1.6 (By Bettse)](https://github.com/flipperdevices/flipperzero-good-faps/tree/dev/picopass)

<a name="release">

Expand Down
2 changes: 1 addition & 1 deletion applications/external/ble_spam/protocols/continuity.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void continuity_make_packet(uint8_t* _size, uint8_t** _packet, const Prot
const ContinuityCfg* cfg = _cfg ? &_cfg->continuity : NULL;

ContinuityType type;
if(cfg) {
if(cfg && cfg->type != 0x00) {
type = cfg->type;
} else {
const ContinuityType types[] = {
Expand Down
2 changes: 1 addition & 1 deletion applications/external/ble_spam/protocols/easysetup.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void easysetup_make_packet(uint8_t* out_size, uint8_t** out_packet, const Protoc
const EasysetupCfg* cfg = _cfg ? &_cfg->easysetup : NULL;

EasysetupType type;
if(cfg) {
if(cfg && cfg->type != 0x00) {
type = cfg->type;
} else {
type = rand() % EasysetupTypeCOUNT;
Expand Down
2 changes: 1 addition & 1 deletion applications/external/ble_spam/protocols/easysetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Research by @Spooks4576

typedef enum {
EasysetupTypeBuds,
EasysetupTypeBuds = 0x01, // Skip 0 as it means unset
EasysetupTypeWatch,
EasysetupTypeCOUNT,
} EasysetupType;
Expand Down
9 changes: 5 additions & 4 deletions applications/external/hid_app/views/hid_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ static void hid_mouse_process(HidMouse* hid_mouse, InputEvent* event) {
hid_mouse->view,
HidMouseModel * model,
{
model->button_press_repeat_count = (event->type == InputTypePress) ? 1 :
(event->type == InputTypeRelease) ? 0 :
(model->button_press_repeat_count >= 10) ? 10 :
model->button_press_repeat_count + 1;
model->button_press_repeat_count =
(event->type == InputTypePress) ? 1 :
(event->type == InputTypeRelease) ? 0 :
(model->button_press_repeat_count >= 10) ? 10 :
model->button_press_repeat_count + 1;

if(event->key == InputKeyBack) {
if(event->type == InputTypeShort) {
Expand Down
2 changes: 1 addition & 1 deletion applications/external/picopass/.catalog/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- Faster loclass response collection
- Save as LF for all bit lengths
- Removes unvalidated H10301 parsing
## 1.5
## 1.5
- New random filename API
## 1.4
- Optimize crypto speed to fix compatibliity with Signo and OmniKey readers
Expand Down
14 changes: 8 additions & 6 deletions applications/external/picopass/application.fam
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
App(
appid="picopass",
name="PicoPass [iClass]",
name="PicoPass",
apptype=FlipperAppType.EXTERNAL,
targets=["f7"],
entry_point="picopass_app",
requires=[
"storage",
"gui",
],
stack_size=4 * 1024,
fap_description="App to communicate with NFC tags using the PicoPass(iClass) format",
fap_version="1.6",
fap_icon="125_10px.png",
fap_category="NFC",
fap_libs=["mbedtls"],
Expand All @@ -15,9 +22,4 @@ App(
],
fap_icon_assets="icons",
fap_file_assets="files",
fap_icon_assets_symbol="picopass",
fap_author="bettse",
fap_weburl="https://github.com/bettse/flipperzero-good-faps/tree/dev/picopass",
fap_version=(1, 6),
fap_description="App to communicate with NFC tags using the PicoPass(iClass) format",
)
4 changes: 0 additions & 4 deletions applications/external/picopass/files/iclass_elite_dict.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

## From https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/iclass_default_keys.dic

#FORMAT GUIDE: Never add # after a key.
#Always put the key on a new line and the comments on a separate line.
#Failure to do so will result in the key being skipped.

# key1/Kc from PicoPass 2k documentation
7665544332211000
# SAGEM
Expand Down
4 changes: 0 additions & 4 deletions applications/external/picopass/files/iclass_standard_dict.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

## From https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/iclass_default_keys.dic

#FORMAT GUIDE: Never add # after a key.
#Always put the key on a new line and the comments on a separate line.
#Failure to do so will result in the key being skipped.

# AA1
AEA684A6DAB23278
# key1/Kc from PicoPass 2k documentation
Expand Down
22 changes: 9 additions & 13 deletions applications/external/picopass/picopass_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static bool picopass_device_save_file_lfrfid(PicopassDevice* dev, FuriString* fi
bool result = false;
uint64_t target = 0;
uint64_t sentinel = 1ULL << pacs->bitLength;
memcpy(&target, pacs->credential, RFAL_PICOPASS_BLOCK_LEN);
memcpy(&target, pacs->credential, PICOPASS_BLOCK_LEN);
target = __builtin_bswap64(target);
FURI_LOG_D(TAG, "Original (%d): %016llx", pacs->bitLength, target);

Expand Down Expand Up @@ -132,8 +132,7 @@ static bool picopass_device_save_file(
// Write header
if(!flipper_format_write_header_cstr(file, picopass_file_header, picopass_file_version))
break;
if(!flipper_format_write_hex(
file, "Credential", pacs->credential, RFAL_PICOPASS_BLOCK_LEN))
if(!flipper_format_write_hex(file, "Credential", pacs->credential, PICOPASS_BLOCK_LEN))
break;

// TODO: Add elite
Expand All @@ -146,10 +145,7 @@ static bool picopass_device_save_file(
for(size_t i = 0; i < app_limit; i++) {
furi_string_printf(temp_str, "Block %d", i);
if(!flipper_format_write_hex(
file,
furi_string_get_cstr(temp_str),
AA1[i].data,
RFAL_PICOPASS_BLOCK_LEN)) {
file, furi_string_get_cstr(temp_str), AA1[i].data, PICOPASS_BLOCK_LEN)) {
block_saved = false;
break;
}
Expand Down Expand Up @@ -210,7 +206,7 @@ static bool picopass_device_load_data(PicopassDevice* dev, FuriString* path, boo
for(size_t i = 0; i < 6; i++) {
furi_string_printf(temp_str, "Block %d", i);
if(!flipper_format_read_hex(
file, furi_string_get_cstr(temp_str), AA1[i].data, RFAL_PICOPASS_BLOCK_LEN)) {
file, furi_string_get_cstr(temp_str), AA1[i].data, PICOPASS_BLOCK_LEN)) {
block_read = false;
break;
}
Expand All @@ -222,7 +218,7 @@ static bool picopass_device_load_data(PicopassDevice* dev, FuriString* path, boo
for(size_t i = 6; i < app_limit; i++) {
furi_string_printf(temp_str, "Block %d", i);
if(!flipper_format_read_hex(
file, furi_string_get_cstr(temp_str), AA1[i].data, RFAL_PICOPASS_BLOCK_LEN)) {
file, furi_string_get_cstr(temp_str), AA1[i].data, PICOPASS_BLOCK_LEN)) {
block_read = false;
break;
}
Expand Down Expand Up @@ -386,9 +382,9 @@ ReturnCode picopass_device_parse_credential(PicopassBlock* AA1, PicopassPacs* pa
}
} else if(pacs->encryption == PicopassDeviceEncryptionNone) {
FURI_LOG_D(TAG, "No Encryption");
memcpy(pacs->credential, AA1[7].data, RFAL_PICOPASS_BLOCK_LEN);
memcpy(pacs->pin0, AA1[8].data, RFAL_PICOPASS_BLOCK_LEN);
memcpy(pacs->pin1, AA1[9].data, RFAL_PICOPASS_BLOCK_LEN);
memcpy(pacs->credential, AA1[7].data, PICOPASS_BLOCK_LEN);
memcpy(pacs->pin0, AA1[8].data, PICOPASS_BLOCK_LEN);
memcpy(pacs->pin1, AA1[9].data, PICOPASS_BLOCK_LEN);
} else if(pacs->encryption == PicopassDeviceEncryptionDES) {
FURI_LOG_D(TAG, "DES Encrypted");
} else {
Expand Down Expand Up @@ -429,4 +425,4 @@ bool picopass_device_hid_csn(PicopassDevice* dev) {
bool isHidRange = (memcmp(csn + 5, "\xFF\x12\xE0", 3) == 0) && ((csn[4] & 0xF0) == 0xF0);

return isHidRange;
}
}
3 changes: 2 additions & 1 deletion applications/external/picopass/picopass_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ typedef enum {
PicopassEmulatorStateIdle,
PicopassEmulatorStateActive,
PicopassEmulatorStateSelected,
PicopassEmulatorStateStopEmulation,
} PicopassEmulatorState;

typedef struct {
Expand All @@ -95,7 +96,7 @@ typedef struct {
} PicopassPacs;

typedef struct {
uint8_t data[RFAL_PICOPASS_BLOCK_LEN];
uint8_t data[PICOPASS_BLOCK_LEN];
} PicopassBlock;

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion applications/external/picopass/picopass_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct Picopass {

char text_store[PICOPASS_TEXT_STORE_SIZE + 1];
FuriString* text_box_store;
uint8_t byte_input_store[RFAL_PICOPASS_BLOCK_LEN];
uint8_t byte_input_store[PICOPASS_BLOCK_LEN];

// Common Views
Submenu* submenu;
Expand Down
12 changes: 6 additions & 6 deletions applications/external/picopass/picopass_keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include "picopass_device.h"

extern const uint8_t picopass_iclass_key[RFAL_PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_factory_credit_key[RFAL_PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_factory_debit_key[RFAL_PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_xice_key[RFAL_PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_xicl_key[RFAL_PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_xics_key[RFAL_PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_iclass_key[PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_factory_credit_key[PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_factory_debit_key[PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_xice_key[PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_xicl_key[PICOPASS_BLOCK_LEN];
extern const uint8_t picopass_xics_key[PICOPASS_BLOCK_LEN];
Loading

0 comments on commit dfdda47

Please sign in to comment.