mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
chg: not showing banner when executing direct from shell
This commit is contained in:
parent
d2dd6eed6a
commit
2aa17c0ddc
1 changed files with 13 additions and 10 deletions
|
@ -355,11 +355,6 @@ int main(int argc, char* argv[]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || (__APPLE__)
|
|
||||||
// ascii art doesn't work well on mingw :(
|
|
||||||
showBanner();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// lets copy the comport string.
|
// lets copy the comport string.
|
||||||
memset(comport, 0, sizeof(comport));
|
memset(comport, 0, sizeof(comport));
|
||||||
memcpy(comport, argv[1], strlen(argv[1]));
|
memcpy(comport, argv[1], strlen(argv[1]));
|
||||||
|
@ -367,7 +362,7 @@ int main(int argc, char* argv[]) {
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
|
|
||||||
// helptext
|
// helptext
|
||||||
if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i],"-help") == 0) {
|
if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0) {
|
||||||
show_help(false, argv[0]);
|
show_help(false, argv[0]);
|
||||||
dumpAllHelp(0);
|
dumpAllHelp(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -380,23 +375,23 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// flush output
|
// flush output
|
||||||
if(strcmp(argv[i],"-f") == 0 || strcmp(argv[i],"-flush") == 0){
|
if(strcmp(argv[i], "-f") == 0 || strcmp(argv[i], "-flush") == 0){
|
||||||
printf("Output will be flushed after every print.\n");
|
printf("Output will be flushed after every print.\n");
|
||||||
flushAfterWrite = 1;
|
flushAfterWrite = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for comport
|
// wait for comport
|
||||||
if(strcmp(argv[i],"-w") == 0 || strcmp(argv[i],"-wait") == 0){
|
if(strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "-wait") == 0){
|
||||||
waitCOMPort = true;
|
waitCOMPort = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// execute pm3 command
|
// execute pm3 command
|
||||||
if(strcmp(argv[i],"-c") == 0 || strcmp(argv[i],"-command") == 0){
|
if(strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "-command") == 0){
|
||||||
executeCommand = true;
|
executeCommand = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// execute lua script
|
// execute lua script
|
||||||
if(strcmp(argv[i],"-l") == 0 || strcmp(argv[i],"-lua") == 0){
|
if(strcmp(argv[i], "-l") == 0 || strcmp(argv[i], "-lua") == 0){
|
||||||
executeCommand = true;
|
executeCommand = true;
|
||||||
addLuaExec = true;
|
addLuaExec = true;
|
||||||
}
|
}
|
||||||
|
@ -438,6 +433,14 @@ int main(int argc, char* argv[]) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__linux__) || (__APPLE__)
|
||||||
|
// ascii art doesn't work well on mingw :(
|
||||||
|
|
||||||
|
bool stdinOnPipe = !isatty(STDIN_FILENO);
|
||||||
|
if ( executeCommand || script_cmds_file || stdinOnPipe )
|
||||||
|
showBanner();
|
||||||
|
#endif
|
||||||
|
|
||||||
// set global variables
|
// set global variables
|
||||||
set_my_executable_path();
|
set_my_executable_path();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue