@@ -584,6 +584,8 @@ int main(int argc, char* argv[])
584584 if (device )
585585 debug ("Connected to %s, model %s, cpid 0x%04x, bdid 0x%02x\n" , device -> product_type , device -> hardware_model , device -> chip_id , device -> board_id );
586586
587+ const struct irecv_device_info * devinfo = irecv_get_device_info (client );
588+
587589 switch (action ) {
588590 case kResetDevice :
589591 irecv_reset (client );
@@ -596,6 +598,10 @@ int main(int argc, char* argv[])
596598 break ;
597599
598600 case kSendCommand :
601+ if (devinfo -> pid == 0x1881 ) {
602+ printf ("Shell is not available in Debug USB (KIS) mode.\n" );
603+ break ;
604+ }
599605 if (_is_breq_command (argument )) {
600606 error = irecv_send_command_breq (client , argument , 1 );
601607 } else {
@@ -605,6 +611,10 @@ int main(int argc, char* argv[])
605611 break ;
606612
607613 case kSendExploit :
614+ if (devinfo -> pid == 0x1881 ) {
615+ printf ("Shell is not available in Debug USB (KIS) mode.\n" );
616+ break ;
617+ }
608618 if (argument != NULL ) {
609619 irecv_event_subscribe (client , IRECV_PROGRESS , & progress_cb , NULL );
610620 error = irecv_send_file (client , argument , 0 );
@@ -618,10 +628,18 @@ int main(int argc, char* argv[])
618628 break ;
619629
620630 case kStartShell :
631+ if (devinfo -> pid == 0x1881 ) {
632+ printf ("This feature is not supported in Debug USB (KIS) mode.\n" );
633+ break ;
634+ }
621635 init_shell (client );
622636 break ;
623637
624638 case kSendScript :
639+ if (devinfo -> pid == 0x1881 ) {
640+ printf ("This feature is not supported in Debug USB (KIS) mode.\n" );
641+ break ;
642+ }
625643 buffer_read_from_filename (argument , & buffer , & buffer_length );
626644 if (buffer ) {
627645 buffer [buffer_length ] = '\0' ;
@@ -638,7 +656,6 @@ int main(int argc, char* argv[])
638656 break ;
639657
640658 case kShowMode : {
641- const struct irecv_device_info * devinfo = irecv_get_device_info (client );
642659 irecv_get_mode (client , & mode );
643660 printf ("%s Mode" , mode_to_str (mode ));
644661 if (devinfo -> pid == 0x1881 ) {
@@ -648,6 +665,10 @@ int main(int argc, char* argv[])
648665 break ;
649666 }
650667 case kRebootToNormalMode :
668+ if (devinfo -> pid == 0x1881 ) {
669+ printf ("This feature is not supported in Debug USB (KIS) mode.\n" );
670+ break ;
671+ }
651672 error = irecv_setenv (client , "auto-boot" , "true" );
652673 if (error != IRECV_E_SUCCESS ) {
653674 debug ("%s\n" , irecv_strerror (error ));
0 commit comments