Skip to content

Commit 26898f0

Browse files
kali tips
1 parent 66f0283 commit 26898f0

File tree

2 files changed

+37
-11
lines changed

2 files changed

+37
-11
lines changed

bin/macosx/heartleech

0 Bytes
Binary file not shown.

heartleech.c

+37-11
Original file line numberDiff line numberDiff line change
@@ -2635,6 +2635,28 @@ target_add(struct TargetList *targets, const char *hostname)
26352635
}
26362636

26372637

2638+
/******************************************************************************
2639+
* Called by the configuration-reading function for processing options
2640+
* specified on the command-line, in configuration files, in environmental
2641+
* variables, and so forth.
2642+
******************************************************************************/
2643+
static void
2644+
print_usage()
2645+
{
2646+
printf("\n");
2647+
printf("usage:\n");
2648+
printf(" heartleech --scanlist <file> [--threads <n>]\n");
2649+
printf(" scans the listed targets for heartbleed vulnerability\n");
2650+
printf(" heartleech <hostname> --dump <file> [--threads <n>]\n");
2651+
printf(" aggressively dumps heartbleed info to file for later processing\n");
2652+
printf(" heartleech --cert <cert> --read <file>\n");
2653+
printf(" looks for matching private key in dump file\n");
2654+
printf(" heartleech <hostname> --autopwn [--threads <n>]\n");
2655+
printf(" automatically scans vulnerable host for private key\n");
2656+
printf("use '-d' option to debug what's going wrong\n");
2657+
exit(1);
2658+
}
2659+
26382660
/******************************************************************************
26392661
* Called by the configuration-reading function for processing options
26402662
* specified on the command-line, in configuration files, in environmental
@@ -2666,6 +2688,9 @@ heartleech_set_parameter(struct DumpArgs *args,
26662688
memcpy(args->dump_filename, value, strlen(value)+1);
26672689
args->op = Op_Dump;
26682690
return 1;
2691+
} else if (EQUALS("help", name)) {
2692+
print_usage();
2693+
return 0;
26692694
} else if (EQUALS("ipv4", name)) {
26702695
args->ip_ver = 4;
26712696
return 0;
@@ -2844,7 +2869,7 @@ read_configuration(struct DumpArgs *args, int argc, char *argv[])
28442869
* -t www.google.com
28452870
*/
28462871
c = argv[i][1];
2847-
if (c == 'd' || c == 'a' || c == 'S')
2872+
if (c == 'd' || c == 'a' || c == 'S' || c == 'h' || c == '?')
28482873
;
28492874
else if (argv[i][2] == '\0') {
28502875
arg = argv[++i];
@@ -2869,6 +2894,9 @@ read_configuration(struct DumpArgs *args, int argc, char *argv[])
28692894
case 'p': heartleech_set_parameter(args, "port", arg); break;
28702895
case 'S': heartleech_set_parameter(args, "rand", arg); break;
28712896
case 'v': heartleech_set_parameter(args, "ipver", arg); break;
2897+
case '?': heartleech_set_parameter(args, "help", arg); break;
2898+
case 'h': heartleech_set_parameter(args, "help", arg); break;
2899+
case 'H': heartleech_set_parameter(args, "help", arg); break;
28722900
default:
28732901
fprintf(stderr, "[-] -%c: unknown argument\n", c);
28742902
exit(1);
@@ -3079,11 +3107,15 @@ main(int argc, char *argv[])
30793107
args.cfg_loopcount = 1000000;
30803108
args.timeout = 6;
30813109

3082-
fprintf(stderr, "\n--- heartleech/1.0.0h ---\n");
3110+
fprintf(stderr, "\n--- heartleech/1.0.0i ---\n");
30833111
fprintf(stderr, "https://github.com/robertdavidgraham/heartleech\n");
30843112

3085-
load_pcre();
3086-
3113+
/*
3114+
* NOT HERE YET
3115+
* In the future, I'm going to load PCRE and search the dumped data for
3116+
* patterns, such as as Cookies and passwords
3117+
*/
3118+
//load_pcre();
30873119
//pattern_add(&args.patterns, "[a-zA-Z]*[sS][eE][sS][sS][iI][oO][nN][a-zA-Z0-9=]*;");
30883120
//pattern_add(&args.patterns, "ASPSESSION[A-Z]*=[A-Z]*;");
30893121

@@ -3093,13 +3125,7 @@ main(int argc, char *argv[])
30933125
*/
30943126
if (argc <= 1 ) {
30953127
usage:
3096-
printf("\n");
3097-
printf("usage:\n heartleech <hostname> -f<filename>"
3098-
" [-p<port>] ...\n");
3099-
printf(" <hostname> is a DNS name or IP address of the target\n");
3100-
printf(" <filename> is where the heartbleed information is stored\n");
3101-
printf(" <port> is the port number, defaulting to 443\n");
3102-
return 1;
3128+
print_usage();
31033129
}
31043130

31053131
/*

0 commit comments

Comments
 (0)