proxmark3-lf-hid-read.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --
  2. -- Copyright (c) 2019 Clementine Computing LLC.
  3. --
  4. -- This file is part of PopuFare.
  5. --
  6. -- PopuFare is free software: you can redistribute it and/or modify
  7. -- it under the terms of the GNU Affero General Public License as published by
  8. -- the Free Software Foundation, either version 3 of the License, or
  9. -- (at your option) any later version.
  10. --
  11. -- PopuFare is distributed in the hope that it will be useful,
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. -- GNU Affero General Public License for more details.
  15. --
  16. -- You should have received a copy of the GNU Affero General Public License
  17. -- along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
  18. --
  19. -- example usage:
  20. --
  21. -- stdbuf -eL -oL ./proxmark3 /dev/ttyACM0 -l lf-hid-read.lua | tee lf-hid-read.log
  22. --
  23. local cmds = require('commands')
  24. local getopt = require('getopt')
  25. local bin = require('bin')
  26. local utils = require('utils')
  27. local format=string.format
  28. local floor=math.floor
  29. local os = require("os")
  30. local function main(args)
  31. print( string.rep('#',30) )
  32. print( string.rep('#',30) )
  33. -- core.console will go async when waiting for the proxmark to return
  34. -- so need to wait for a response (sleep)
  35. --
  36. core.console('lf hid read')
  37. os.execute("sleep infinity")
  38. end
  39. main(args)