mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-04-10 06:21:51 +08:00
commit
13df22ef59
3 changed files with 349 additions and 330 deletions
27
appveyor.yml
27
appveyor.yml
|
@ -1,8 +1,27 @@
|
|||
version: 1.0.{build}
|
||||
init:
|
||||
- cmd: >-
|
||||
set QTDIR=C:\Qt\5.5\mingw492_32
|
||||
environment:
|
||||
global:
|
||||
CYG_ROOT: C:\cygwin
|
||||
CYG_MIRROR: http://cygwin.mirror.constant.com
|
||||
CYG_CACHE: C:\cygwin\var\cache\setup
|
||||
CYG_BASH: C:\cygwin\bin\bash
|
||||
|
||||
set PATH=%PATH%;%QTDIR%\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin
|
||||
init:
|
||||
- cmd:
|
||||
- set QTDIR=C:\Qt\5.5\mingw492_32
|
||||
- set PATH=%PATH%;%QTDIR%\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin
|
||||
- c:\cygwin\setup-x86.exe --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages autoconf,automake,bison,gcc-core,gcc-g++,mingw-runtime,mingw-binutils,mingw-gcc-core,mingw-gcc-g++,mingw-pthreads,mingw-w32api,libtool,make,gettext-devel,gettext,intltool,libiconv,pkg-config,git,curl,libxslt,libreadline-devel,libreadline7 > NUL 2>&1'
|
||||
- '%CYG_BASH% -lc "cygcheck -dc cygwin"'
|
||||
- if not exist "make.zip" curl -L -o make.zip http://gnuwin32.sourceforge.net/downlinks/make-bin-zip.php
|
||||
- if not exist "make-dep.zip" curl -L -o make-dep.zip http://gnuwin32.sourceforge.net/downlinks/make-dep-zip.php
|
||||
- if not exist "gcc-arm-none-eabi.zip" curl -L -o gcc-arm-none-eabi.zip https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip
|
||||
- if not exist "C:\strawberry" cinst strawberryperl #once I workout how to install Digest::SHA for perl, this won't be required
|
||||
- set PATH=C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH%
|
||||
- unzip -o -q gcc-arm-none-eabi.zip -d c:\gcc\
|
||||
- unzip make.zip -d c:\gnuwin32\
|
||||
- unzip make-dep.zip -d c:\gnuwin32\
|
||||
- set PATH=C:\Program Files\git\bin;%PATH:C:\Program Files\git\bin;=% #move git to begining of PATH so find works correctly
|
||||
- set PATH=%PATH%;c:\gnuwin32\bin;c:\gcc\bin
|
||||
- set PATH=%PATH%;c:\gcc\bin
|
||||
build_script:
|
||||
- cmd: make all
|
||||
|
|
|
@ -296,6 +296,7 @@ function file_check(file_name)
|
|||
if file_found==nil then
|
||||
return false
|
||||
else
|
||||
file_found:close()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
@ -339,15 +340,14 @@ end
|
|||
function getInputBytes(infile)
|
||||
local line
|
||||
local bytes = {}
|
||||
local fhi,err = io.open(infile)
|
||||
local fhi,err = io.open(infile,"rb")
|
||||
if err then oops("faild to read from file ".. infile); return false; end
|
||||
while true do
|
||||
line = fhi:read()
|
||||
if line == nil then break end
|
||||
for byte in line:gmatch("%w+") do
|
||||
table.insert(bytes, byte)
|
||||
end
|
||||
end
|
||||
|
||||
file_data = fhi:read("*a");
|
||||
for i = 1, #file_data
|
||||
do
|
||||
bytes[i] = string.format("%x",file_data:byte(i))
|
||||
end
|
||||
fhi:close()
|
||||
if (bytes[7]=='00') then return false end
|
||||
print(#bytes .. " bytes from "..infile.." loaded")
|
||||
|
@ -507,8 +507,8 @@ function readFromPM3()
|
|||
local tag, bytes, infile
|
||||
infile="legic.temp"
|
||||
core.console("hf legic reader")
|
||||
core.console("hf legic save "..infile)
|
||||
tag=readFile(infile)
|
||||
core.console("hf legic esave "..infile)
|
||||
tag=readFile(infile..".bin")
|
||||
return tag
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue