mirror of
https://github.com/videoman/proxmark3-web.git
synced 2024-11-10 17:14:41 +08:00
it mostly works.
This commit is contained in:
parent
6cb1ee44e3
commit
a4ee322f01
2 changed files with 19 additions and 1 deletions
|
@ -156,9 +156,23 @@ if(True):
|
||||||
flash('ERROR: Could not read a card... please try again....')
|
flash('ERROR: Could not read a card... please try again....')
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('index'))
|
||||||
|
|
||||||
|
@app.route('/hid/sim')
|
||||||
|
def sim_hid_card():
|
||||||
|
raw_cardnumber = request.args.get('raw_cardnumber')
|
||||||
|
if debug:
|
||||||
|
print('Got card raw: ' + str(raw_cardnumber))
|
||||||
|
|
||||||
|
#Send hid simulate tag to proxmark3
|
||||||
|
write_hid = subprocess.run([proxmark3_rdv4_client, serial_port, '-c', 'lf hid sim ' + raw_cardnumber ], capture_output=True)
|
||||||
|
if('ERROR: serial port' in write_hid.stdout.decode('ASCII')):
|
||||||
|
flash('Serial port error')
|
||||||
|
return render_template('card_list')
|
||||||
|
|
||||||
|
|
||||||
@app.route('/write')
|
@app.route('/write')
|
||||||
def write_hid():
|
def write_hid():
|
||||||
raw_cardnumber = request.args.get('raw_cardnumber')
|
raw_cardnumber = request.args.get('raw_cardnumber')
|
||||||
|
if debug:
|
||||||
print('Got card raw: ' + str(raw_cardnumber))
|
print('Got card raw: ' + str(raw_cardnumber))
|
||||||
|
|
||||||
write_hid = subprocess.run([proxmark3_rdv4_client, serial_port, '-c', 'lf t55xx wipe ; lf hid clone ' + raw_cardnumber + ' ; lf hid read' ], capture_output=True)
|
write_hid = subprocess.run([proxmark3_rdv4_client, serial_port, '-c', 'lf t55xx wipe ; lf hid clone ' + raw_cardnumber + ' ; lf hid read' ], capture_output=True)
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
<input type="hidden" name="raw_cardnumber" value={{ row['card_raw'] }} />
|
<input type="hidden" name="raw_cardnumber" value={{ row['card_raw'] }} />
|
||||||
<button type="submit" class="btn btn-primary">Clone</button>
|
<button type="submit" class="btn btn-primary">Clone</button>
|
||||||
</form>
|
</form>
|
||||||
|
<form action="/hid/sim" method="get">
|
||||||
|
<input type="hidden" name="raw_cardnumber" value={{ row['card_raw'] }} />
|
||||||
|
<button type="submit" class="btn btn-success">Simulate</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{{ row['card_facility_code'] }}
|
{{ row['card_facility_code'] }}
|
||||||
|
|
Loading…
Reference in a new issue