Skip to content

Add Create credential flow (#1)#2

Open
redteamlife wants to merge 1 commit intobettse:mainfrom
redteamlife:main
Open

Add Create credential flow (#1)#2
redteamlife wants to merge 1 commit intobettse:mainfrom
redteamlife:main

Conversation

@redteamlife
Copy link

  • Add support for creating manual iClass credentials without needing to read from a source card or saved file.

    • Pick Wiegand format, facility code, and card number, then emulate, write (to card), or save.

    • Defaults to target legacy iClass (standard keys, 3DES) with a sensible CSN.

  • Added a "Create Advanced" submenu for tweaking specific pacs data (pin/biometrics/encryption,etc) but, it currently remains commented out/hidden until it’s fully fleshed out and tested.

  • Fixed typo in sio.asn1

* Add support for creating manual iClass credentials without needing to read from a source card or saved file.
    
    * Pick Wiegand format, facility code, and card number, then emulate, write (to card), or save.
   
    * Defaults to target legacy iClass (standard keys, 3DES) with a sensible CSN.

* Added a "Create Advanced" submenu for tweaking specific pacs data (pin/biometrics/encryption,etc) but, it currently remains commented out/hidden until it’s fully fleshed out and tested.

* Fixed typo in sio.asn1
Copy link
Owner

@bettse bettse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, turns out I didn't have the repo marked to "watch" and missed this completely. I haven't tested it yet, but there are some changes I'd like to have made first. A quick win would be to pull the emulate UI changes into it's own PR so I can merge that quickly. You'll see comments with some of the other stuff.

widget_reset(widget);
widget_add_icon_element(widget, 0, 3, &I_RFIDDolphinSend_97x61);
widget_add_string_element(widget, 92, 30, AlignCenter, AlignTop, FontPrimary, "Emulating");
widget_add_string_element(widget, 92, 25, AlignCenter, AlignTop, FontPrimary, "Emulating");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the changes to this file into it's own PR?

static PicopassCreateState create_state;
static bool create_state_initialized = false;

static uint32_t picopass_create_max_facility(WiegandFormat format) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it gets wordy, but I'd prefer to still use the full terms "facility_code" and "card_number" (or I'll accept "fc" and "cn")

@@ -0,0 +1,188 @@
#include "../picopass_i.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets pull this out of the PR until it is ready

picopass_create_apply_cred_type_defaults(picopass);
picopass_scene_create_update_menu(picopass);
consumed = true;
// Advanced scene temporarily disabled while being tested.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not always the best at it myself, but I prefer not to check in commented out code

CreateActionWrite,
CreateActionSave,
CreateActionCount,
} CreateAction;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we just load the data up into the right struct and then push to the picopass_scene_saved_menu that has emulate/write/save?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants