mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
work directory supported.
This commit is contained in:
parent
12e942febc
commit
1a90fa90d6
1 changed files with 18 additions and 10 deletions
|
@ -53,6 +53,14 @@ const char *get_my_executable_path(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *get_my_executable_directory(void) {
|
const char *get_my_executable_directory(void) {
|
||||||
|
if (my_executable_directory != NULL) free(my_executable_directory);
|
||||||
|
char buf[1024];
|
||||||
|
// get current work directory
|
||||||
|
getcwd(buf, sizeof(buf));
|
||||||
|
// add / to end.
|
||||||
|
sprintf(buf, "%s%s", buf, PATHSEP);
|
||||||
|
// create on global
|
||||||
|
my_executable_directory = strdup(buf);
|
||||||
return my_executable_directory;
|
return my_executable_directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +103,7 @@ jint sendCMD(JNIEnv *env, jobject instance, jstring cmd_) {
|
||||||
}
|
}
|
||||||
// display on new line
|
// display on new line
|
||||||
PrintAndLogEx(NORMAL, "\n");
|
PrintAndLogEx(NORMAL, "\n");
|
||||||
char *cmd = (char *)((*env)->GetStringUTFChars(env, cmd_, 0));
|
char *cmd = (char *) ((*env)->GetStringUTFChars(env, cmd_, 0));
|
||||||
int ret = CommandReceived(cmd);
|
int ret = CommandReceived(cmd);
|
||||||
if (ret == 99) {
|
if (ret == 99) {
|
||||||
// exit / quit
|
// exit / quit
|
||||||
|
@ -110,7 +118,7 @@ jint sendCMD(JNIEnv *env, jobject instance, jstring cmd_) {
|
||||||
* Is client running!
|
* Is client running!
|
||||||
* */
|
* */
|
||||||
jboolean isExecuting(JNIEnv *env, jobject instance) {
|
jboolean isExecuting(JNIEnv *env, jobject instance) {
|
||||||
return (jboolean)((jboolean) conn.run);
|
return (jboolean) ((jboolean) conn.run);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -123,7 +131,7 @@ jboolean testPm3(JNIEnv *env, jobject instance) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool ret2 = TestProxmark() == PM3_SUCCESS;
|
bool ret2 = TestProxmark() == PM3_SUCCESS;
|
||||||
return (jboolean)(ret1 && ret2);
|
return (jboolean) (ret1 && ret2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue