Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2019-03-28 21:14:13

cosmic
Contributor
Registered: 2019-03-18
Posts: 6

How can I read a block into a variable within the AppMain?

Within appmain.c, I was hoping to loop forever reading Block 7 from many of my fobs to see if any of them had a password (but wasn't enabled).

However it seems that:

void T55xxReadBlock(uint16_t arg0, uint8_t Block, uint32_t Pwd) {

doesn't return a value.

How would I return the value of that block into an int?

I know I could just read and it would print to the screen, but how would I return that value and perhaps operate on it?

Offline

#2 2019-03-28 21:55:51

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: How can I read a block into a variable within the AppMain?

if a password is set you have to know it to read it.   so if you know it what are you trying to do?

Offline

#3 2019-03-28 22:17:24

cosmic
Contributor
Registered: 2019-03-18
Posts: 6

Re: How can I read a block into a variable within the AppMain?

Well it's just any block. I'm trying to just store messages in blocks.

That's my goal. To store random messages in unused blocks.

Reading a value of block 7 was just an example.
Let's say I wanted to read block 0 into an int so I could flip bit 22 and enable the password, but only if the password bit is not set.

Offline

#4 2019-03-29 00:09:14

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: How can I read a block into a variable within the AppMain?

It would take a bit of refactoring, but it could be done.  That's the beauty of open source.  You can change it however you want. 

If you want specific help on something I'm afraid you'll have to be a little more specific.

Offline

#5 2019-03-29 18:36:51

cosmic
Contributor
Registered: 2019-03-18
Posts: 6

Re: How can I read a block into a variable within the AppMain?

Okay, I'm willing to give it a shot. Will just need some guidance since my hardware knowledge/debugging skills are still quite basic.

How can I modify:

void T55xxReadBlock(uint16_t arg0, uint8_t Block, uint32_t Pwd) { 

in armsrc/lfops.c such that instead of returning void, it returns the 32bit int it reads.

Am I correct to think that I would need to modify:

uint32_t DoAcquisition(uint8_t decimation, uint32_t bits_per_sample, bool averaging, int trigger_threshold, bool silent, int bufsize, int cancel_after)

in armsrc/lfsampling.c to return the data samples and then it would be up to me to determine which data samples are the value of the block I'm looking for?

Offline

#6 2019-03-30 08:19:03

piwi
Contributor
Registered: 2013-06-04
Posts: 704

Re: How can I read a block into a variable within the AppMain?

I propose that you have a look at T55xxReadBlock() in client/cmdlft55x.c instead. Or is there a specific reason to implement on the device?

Offline

Board footer

Powered by FluxBB