Commit Graph
52 Commits
Author SHA1 Message Date
Matt Moran 750fd646c1 Shorten command help text, reorder changelog 2022-01-17 23:38:00 +13:00
Matt Moran a1c3465525 Merge remote-tracking branch 'upstream/master' into feat/hf-gallagher-remove-aid-limits 2022-01-17 23:28:06 +13:00
Matt Moran 072e97998f Fix wasn't freeing arg ctx, improve comments 2022-01-15 14:40:40 +13:00
Matt Moran 2805b8f7ff Update CHANGELOG.md 2022-01-15 14:10:37 +13:00
Matt Moran 8118ab538c Update commands.json/.md 2022-01-15 14:10:23 +13:00
Matt Moran 4c9d167966 Update styles to match changes 2022-01-15 14:02:46 +13:00
Matt Moran f057184ee3 Fix styles (missing braces) 2022-01-15 13:16:34 +13:00
Matt Moran a6280e2978 Merge remote-tracking branch 'upstream/master' into feat/hf-gallagher-remove-aid-limits 2022-01-15 12:11:12 +13:00
Matt Moran aa6b74a08d Fix was attempting to credential file when --noappcreate was passed 2022-01-13 21:06:21 +13:00
Matt Moran cb6a1db852 Continue reading credentials if one fails (e.g. when using different site keys) 2022-01-08 18:13:29 +13:00
Matt Moran 1f8217ec2e Use DesfireGetAIDList to find an available AID
... and check that user-specified AID is available (before writing to the CAD)
2022-01-08 00:36:59 +13:00
Matt Moran b3dc6f62ab Refactor, adds select_aid_and_auth_with_key 2022-01-07 23:59:46 +13:00
Matt Moran beefc97995 Add ability to use custom CAD key, add ability to skip some actions
For cloning & deleting:
- Add ability to use custom Card Application Directory key (`--cadkey`)
- Add ability to skip updating the CAD (`--noupdatecad`)
- Add ability to skip creating/deleting the app and only update the CAD (`--nocreateapp`, `--nodeleteapp`)
2022-01-07 23:57:47 +13:00
Matt Moran 69049a6621 Remove incorrect AID validation 2022-01-07 19:31:36 +13:00
Matt Moran 6d88224a12 Update changelog for hf gallagher commands 2022-01-07 19:29:55 +13:00
Matt Moran f67485d2dd Merge remote-tracking branch 'upstream/master' into feat/hf-gallagher 2022-01-07 01:30:23 +13:00
Matt Moran 14b6580fcb Squashed commit of the following:
commit 8f77179a2f
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Thu Jan 6 11:25:38 2022 +0100

    remove unused file

commit bcafc5d03c
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Thu Jan 6 11:24:04 2022 +0100

    some historical copyright adjustments, thanks @iceman1001!

commit b703bb746b
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Thu Jan 6 02:19:46 2022 +0100

    Adapting license headers, WIP

commit 8952a1f712
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Thu Jan 6 00:37:34 2022 +0100

    adapt contributing text

commit cdfb83075f
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Thu Jan 6 00:24:15 2022 +0100

    toc

commit 014817f854
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Thu Jan 6 00:15:40 2022 +0100

    Adding AUTHORS and changing licensing terms from 'GPLv2 or later' to 'GPLv3 or later' to comply with components available only under 'GPLv3 or later'. Details:

    Initial releases by Jonathan Westhues in 2005-2007 were made under GPL
    "either version 2 of the License, or (at your option) any later version"

    Since then, a number of dependencies and files were integrated to the project, but under a "GPLv3 or later" license. These components are reveng, desfire_crypto and lrpcrypto. Note that compnents cryptorf, hitag2crack and fpga-xc3s100e are also under GPLv3+ but not bound to the firmware or client source code.

    Therefore, we must mechanically upgrade the license of the whole project to GPLv3+, as made possible by the initial licensing terms and as mandated by the inclusion of GPLv3+ code.

    Still to do: update each source file header:

        Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.

        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.

commit 5561466fe8
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Wed Jan 5 18:56:56 2022 +0100

    make style

commit 2d1a1dc034
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Wed Jan 5 17:57:49 2022 +0100

    make style doc/commands.json

commit fc53665e5c
Merge: a6d22ee43 c0cc09d86
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Wed Jan 5 17:52:44 2022 +0100

    Merge pull request #1552 from joswr1ght/master

    Add --no-auth support for hf mfdes createapp

commit c0cc09d86b
Author: Joshua Wright <jwright@hasborg.com>
Date:   Wed Jan 5 07:12:20 2022 -0500

    Style consistency changes for hf mfdes createapp feature addition

commit f9c96f49da
Author: Joshua Wright <jwright@hasborg.com>
Date:   Tue Jan 4 17:01:10 2022 -0500

    Update CHANGELOG with MIFARE DESFire createapp --no-auth change

commit 859b55933d
Author: Joshua Wright <jwright@hasborg.com>
Date:   Tue Jan 4 15:55:26 2022 -0500

    Add --no-auth support for hf mfdes createapp
2022-01-07 01:08:55 +13:00
Matt Moran 533b31bc6d Format code/strings 2022-01-07 01:03:43 +13:00
Matt Moran 6f510db9fb Fix incorrect CAD was written when removing credentials 2022-01-07 00:30:25 +13:00
Matt Moran 84ff84ffd0 Add hf gallagher diversify 2022-01-07 00:05:38 +13:00
Matt Moran 82cd44e99f Reorder function definitions
Order is roughly:
- exported helpers
- helpers
- read -> create -> delete
- exported commands
2022-01-06 00:11:30 +13:00
Matt Moran 02e5fb6b1c Fix incorrect comments 2022-01-06 00:00:04 +13:00
Matt Moran de30ba90d1 Merge remote-tracking branch 'upstream/master' into feat/hf-gallagher 2022-01-05 23:56:33 +13:00
Matt Moran caebfdca62 Update license from LGPL to GPL 2022-01-05 23:54:18 +13:00
Matt Moran 8ecfc4af34 Make variables & function names snake_case 2022-01-05 23:53:03 +13:00
Matt Moran fad30294aa Format styles 2022-01-05 23:08:10 +13:00
Matt Moran 81da8a1317 Add hf gallagher delete command 2022-01-05 00:22:34 +13:00
Matt Moran 28437f018b Check if facility already exists in CAD
Disallow duplicate credentials for the same facility (because readers won't handle it properly - I assume they'll just use the first entry?)
2022-01-04 22:38:30 +13:00
Matt Moran d7989caad0 Automatically choose an new valid Gallagher AID 2022-01-04 22:15:00 +13:00
Matt Moran d3da798517 Move GallagherDiversifyKey to top of file 2022-01-04 21:14:18 +13:00
Matt Moran 28844756d9 Add default MIFARE Site Key 2022-01-04 18:19:42 +13:00
Matt Moran e129bee161 Fix print level should be ERR, was FAILED 2022-01-04 18:06:20 +13:00
Matt Moran f395b28643 Extract cadAidUintToByte and cadAidByteToUint 2022-01-04 18:06:02 +13:00
Matt Moran 21b080e49a Extract selectAid and authenticate commands 2022-01-04 17:42:05 +13:00
Matt Moran 1e3ed42f54 Extract CAD_AID to a constant 2022-01-04 17:04:05 +13:00
Matt Moran 863cf16015 Add comments and logging 2022-01-04 16:59:59 +13:00
Matt Moran aed687cb96 Add basic cloning support 2022-01-03 17:02:56 +13:00
Matt Moran 7b0a85a0af Fix incorrect types in encodeCardholderCredentials 2022-01-03 16:39:18 +13:00
Matt Moran 13ff8d50cf Add hf gallagher reader command 2022-01-01 22:22:57 +13:00
Matt Moran 491c93e715 Add CardholderCredentials struct 2022-01-01 17:34:53 +13:00
Matt Moran a1db683673 Add basic structure for hf gallagher 2021-12-29 23:42:06 +13:00
Matt Moran f0b82c6311 Extract gallagher encoding/decoding
Change input parameters to be `arg_u640` so that we can check they are the right lengths (and not have them silently truncated)
2021-12-29 23:10:48 +13:00
Matt Moran ac216b6cbd Add comments for common AIDs 2021-12-29 14:43:54 +13:00
Matt Moran 63d2afc2d8 Update CHANGELOG.md 2021-02-12 10:51:14 +13:00
DarkMatterMatt d7a1145945 Add support for specifying region/facility/card/issue numbers to Gallagher simulation
Extract `region_code`/`facility_code`/`card_number`/`issue_level` validation to `isValidGallagherParams` function
Add `--rc/fc/cn/il` parameters to `lf gallagher sim`
2021-02-12 10:23:05 +13:00
DarkMatterMatt a75bba6ca7 Merge branch 'master' into feat/gallagher-encoding 2021-02-11 18:57:13 +13:00
DarkMatterMatt 73465e5167 Reorder & simplify code 2021-02-11 17:36:02 +13:00
DarkMatterMatt 03347fcfea Refactor how blocks are generated to be cleaner 2021-02-11 14:07:14 +13:00
DarkMatterMatt 0fdbdb044f Use ARRAYLEN instead of constant length 2021-02-11 11:30:22 +13:00
DarkMatterMatt 62ccbc0a37 Fix styles
Run `make style`
2021-02-11 11:12:45 +13:00
DarkMatterMatt f655391bd4 Initial implementation of encoding 2021-02-11 00:17:48 +13:00
DarkMatterMatt a4da1476b6 Fix Gallagher data decoding & CRC checks
Descramble function was re-scrambling the data
Skip constant magic prefix `7FEA` to get correct data to decode
Fix offsets & bitmasks to correctly decode card and region codes
Fix CRC refin & refout parameters (both now false)
2021-02-10 15:47:14 +13:00