//This plugin was written by //under GPLv2 license // //PC-Anywhere authentication protocol test on Symantec PC-Anywhere 10.5 // #include "hydra-mod.h" extern char *HYDRA_EXIT; int pcadebug=0; int send_cstring(int s, char *crypted_string) { char buffer2[100],*bptr = buffer2; char clientcryptheader[]="\x06"; memset(buffer2, 0, sizeof(clientcryptheader)); bptr=buffer2; buffer2[0]=6; bptr++; buffer2[1]=strlen(crypted_string); bptr++; strcpy(bptr, crypted_string); return hydra_send(s, buffer2, 2+strlen(crypted_string) , 0); } void show_buffer (char *buffer, int size) { int i; printf("size: %d, buffer:\n",size); for (i=0;i126) { // . char buf[i]=46; } } } void print_encrypted_str(char* str) { int i; printf("encode string: "); for (i=0;i0) { passwd[0]= (passwd[0] ^ 0xab); for (i=1;i0) { cleartext[0]=password[0] ^ 0xab; for (i=1;i= 0) sock = hydra_disconnect(sock); usleep(275000); if ((options & OPTION_SSL) == 0) { if (port != 0) myport = port; sock = hydra_connect_tcp(ip, myport); port = myport; } else { if (port != 0) mysslport = port; sock = hydra_connect_ssl(ip, mysslport); port = mysslport; } if (sock < 0) { fprintf(stderr, "Error: Child with pid %d terminating, can not connect\n", (int) getpid()); hydra_child_exit(1); } next_run = 2; break; case 2: next_run = start_pcanywhere(sock, ip, port, options, miscptr, fp); break; case 3: if (sock >= 0) sock = hydra_disconnect(sock); hydra_child_exit(0); return; default: fprintf(stderr, "Caught unknown return code, exiting!\n"); hydra_child_exit(0); exit(-1); } run = next_run; } }