mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
SWIG experiments
Squash of the following commits (a full rebase was too hard :( ) *ef309cfdfN - SWIG: create pm3.c (5 months ago) <Philippe Teuwen> *05ba6a73fN - swig pm3_device -> pm3 (5 months ago) <Philippe Teuwen> *d59630183N - swig: move pm3.i (5 months ago) <Philippe Teuwen> *6adcfad75N - Fix historic make & cmake (5 months ago) <Philippe Teuwen> *bcbef2edfN - Fix typo with script_embedded (5 months ago) <slurdge> *538ee4dabN - Better SWIG integration: autogen func & attributes (5 months ago) <slurdge> *756b62466N - SWIG: few helper scripts (5 months ago) <Philippe Teuwen> *47ba4acd0N - SWIG %extend (5 months ago) <Philippe Teuwen> *21841cb9dN - simplify scripts (5 months ago) <Philippe Teuwen> *78c4f7929N - Revert "SWIG experiments: introduce context" (5 months ago) <Philippe Teuwen> *1562b75fcN - SWIG experiments: introduce context (5 months ago) <Philippe Teuwen> *a503dfcd9N - SWIG experiments (5 months ago) <Philippe Teuwen>
This commit is contained in:
@@ -289,6 +289,7 @@ set (TARGET_SOURCES
|
||||
${PM3_ROOT}/client/src/graph.c
|
||||
${PM3_ROOT}/client/src/jansson_path.c
|
||||
${PM3_ROOT}/client/src/preferences.c
|
||||
${PM3_ROOT}/client/src/pm3.c
|
||||
${PM3_ROOT}/client/src/pm3_binlib.c
|
||||
${PM3_ROOT}/client/src/pm3_bitlib.c
|
||||
${PM3_ROOT}/client/src/prng.c
|
||||
@@ -361,7 +362,7 @@ if (NOT SKIPPYTHON EQUAL 1)
|
||||
add_definitions(-DHAVE_PYTHON)
|
||||
set(ADDITIONAL_DIRS ${PYTHON3_INCLUDE_DIRS} ${ADDITIONAL_DIRS})
|
||||
set(ADDITIONAL_LNK ${PYTHON3_LIBRARIES} ${ADDITIONAL_LNK})
|
||||
set(ADDITIONAL_LNKDIRS ${PYTHON3_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
|
||||
set(ADDITIONAL_LNKDIRS ${PYTHON3_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
|
||||
endif (PYTHON3EMBED_FOUND)
|
||||
endif (NOT SKIPPYTHON EQUAL 1)
|
||||
|
||||
|
||||
+3
-2
@@ -289,7 +289,7 @@ endif
|
||||
CFLAGS ?= $(DEFCFLAGS)
|
||||
# We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
|
||||
PM3CFLAGS = $(CFLAGS)
|
||||
PM3CFLAGS += -I./src -I../include -I../common -I../common_fpga $(INCLUDES)
|
||||
PM3CFLAGS += -I./src -I./include -I../include -I../common -I../common_fpga $(INCLUDES)
|
||||
# WIP Testing
|
||||
#PM3CFLAGS += -std=c11 -pedantic
|
||||
|
||||
@@ -318,7 +318,7 @@ endif
|
||||
|
||||
CXXFLAGS ?= -Wall -Werror -O3
|
||||
PM3CXXFLAGS = $(CXXFLAGS)
|
||||
PM3CXXFLAGS += -I../include
|
||||
PM3CXXFLAGS += -I../include -I./include
|
||||
|
||||
ifeq ($(QT_FOUND),1)
|
||||
PM3CFLAGS += -DHAVE_GUI
|
||||
@@ -540,6 +540,7 @@ SRCS = aiddesfire.c \
|
||||
mifare/mifaredefault.c \
|
||||
mifare/mifarehost.c \
|
||||
mifare/ndef.c \
|
||||
pm3.c \
|
||||
pm3_binlib.c \
|
||||
pm3_bitlib.c \
|
||||
preferences.c \
|
||||
|
||||
@@ -64,7 +64,7 @@ int push_cmdscriptfile(char *path, bool stayafter) { return PM3_SUCCESS; }
|
||||
static bool OpenPm3(void) {
|
||||
if (conn.run) { return true; }
|
||||
// Open with LocalSocket. Not a tcp connection!
|
||||
bool ret = OpenProxmark("socket:"PM3_LOCAL_SOCKET_SERVER, false, 1000, false, 115200);
|
||||
bool ret = OpenProxmark(session.current_device, "socket:"PM3_LOCAL_SOCKET_SERVER, false, 1000, false, 115200);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ set_property(TARGET pm3rrg_rdv4_hardnested PROPERTY POSITION_INDEPENDENT_CODE ON
|
||||
target_include_directories(pm3rrg_rdv4_hardnested PRIVATE
|
||||
../../common
|
||||
../../include
|
||||
../include
|
||||
../src
|
||||
jansson)
|
||||
target_include_directories(pm3rrg_rdv4_hardnested INTERFACE hardnested)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
MYSRCPATHS =
|
||||
MYINCLUDES = -I../../../common -I../../../include -I../../src -I../jansson
|
||||
MYINCLUDES = -I../../../common -I../../../include -I../../src -I../../include -I../jansson
|
||||
MYCFLAGS =
|
||||
MYDEFS =
|
||||
MYSRCS = hardnested_bruteforce.c
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
build/
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
swig -lua -o ../src/pm3_luawrap.c ../src/pm3.i
|
||||
swig -python -o ../src/pm3_pywrap.c ../src/pm3.i
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
(
|
||||
cd build
|
||||
cmake ..
|
||||
make -j
|
||||
)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
(
|
||||
cd build
|
||||
make -j
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
build/proxmark3 /dev/ttyACM0 -c "script run testembedded.lua"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#/usr/local/lib/python3/dist-packages/pm3.py
|
||||
#/usr/lib/python3/dist-packages/pm3.py
|
||||
|
||||
# need access to pm3.py
|
||||
PYTHONPATH=../src build/proxmark3 /dev/ttyACM0 -c "script run testembedded.py"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
local pm3 = require("pm3")
|
||||
p=pm3.pm3()
|
||||
p:console("hw status")
|
||||
print(p.name)
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import pm3
|
||||
p=pm3.pm3()
|
||||
p.console("hw status")
|
||||
print("Device:", p.name)
|
||||
@@ -0,0 +1 @@
|
||||
build/
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
swig -lua -o ../src/pm3_luawrap.c ../src/pm3.i
|
||||
swig -python -o ../src/pm3_pywrap.c ../src/pm3.i
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
(
|
||||
cd build
|
||||
make -j
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
gcc -o test test.c -I../../include -lpm3rrg_rdv4 -L../build -lpthread
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
LD_LIBRARY_PATH=../build ./test
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user