mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-19 21:03:52 -07:00
added -I option
This commit is contained in:
parent
333713288c
commit
ac2dd7817d
2 changed files with 14 additions and 6 deletions
4
CHANGES
4
CHANGES
|
@ -7,7 +7,9 @@ Release 8.4-dev
|
||||||
- HYDRA_PROXY_AUTH was deprecated, set login/password in HTTP_PROXY[_HTTP]
|
- HYDRA_PROXY_AUTH was deprecated, set login/password in HTTP_PROXY[_HTTP]
|
||||||
* New protocol: adam6500 - this one is work in progress, please test and report
|
* New protocol: adam6500 - this one is work in progress, please test and report
|
||||||
* New protocol: rpcap! thanks to Petar Kaleychev <petar.kaleychev@gmail.com>
|
* New protocol: rpcap! thanks to Petar Kaleychev <petar.kaleychev@gmail.com>
|
||||||
* New command line option -y which disables -x 1aA interpretation, thanks to crondaemon for the patch
|
* New command line options:
|
||||||
|
-y : disables -x 1aA interpretation, thanks to crondaemon for the patch
|
||||||
|
-I : ignore an existing hydra.restore file (dont wait for 10 seconds)
|
||||||
* The protocols vnc, xmpp, telnet, imap, nntp and pcanywhere got accidentially long sleep commands due a patch in 8.2, fixed
|
* The protocols vnc, xmpp, telnet, imap, nntp and pcanywhere got accidentially long sleep commands due a patch in 8.2, fixed
|
||||||
* Added special error message for clueless users :)
|
* Added special error message for clueless users :)
|
||||||
|
|
||||||
|
|
16
hydra.c
16
hydra.c
|
@ -327,12 +327,14 @@ void help(int ext) {
|
||||||
#ifdef HAVE_MATH_H
|
#ifdef HAVE_MATH_H
|
||||||
" [-x MIN:MAX:CHARSET]"
|
" [-x MIN:MAX:CHARSET]"
|
||||||
#endif
|
#endif
|
||||||
" [-SOuvVd46] "
|
" [-ISOuvVd46] "
|
||||||
//"[server service [OPT]]|"
|
//"[server service [OPT]]|"
|
||||||
"[service://server[:PORT][/OPT]]\n");
|
"[service://server[:PORT][/OPT]]\n");
|
||||||
printf("\nOptions:\n");
|
printf("\nOptions:\n");
|
||||||
if (ext)
|
if (ext)
|
||||||
printf(" -R restore a previous aborted/crashed session\n");
|
printf(" -R restore a previous aborted/crashed session\n");
|
||||||
|
if (ext)
|
||||||
|
printf(" -I ignore an existing restore file (dont wait 10 seconds)\n");
|
||||||
#ifdef LIBOPENSSL
|
#ifdef LIBOPENSSL
|
||||||
if (ext)
|
if (ext)
|
||||||
printf(" -S perform an SSL connect\n");
|
printf(" -S perform an SSL connect\n");
|
||||||
|
@ -2340,7 +2342,7 @@ int main(int argc, char *argv[]) {
|
||||||
FILE *lfp = NULL, *pfp = NULL, *cfp = NULL, *ifp = NULL, *rfp = NULL, *proxyfp;
|
FILE *lfp = NULL, *pfp = NULL, *cfp = NULL, *ifp = NULL, *rfp = NULL, *proxyfp;
|
||||||
size_t countinfile = 1, sizeinfile = 0;
|
size_t countinfile = 1, sizeinfile = 0;
|
||||||
unsigned long int math2;
|
unsigned long int math2;
|
||||||
int i = 0, j = 0, k, error = 0, modusage = 0;
|
int i = 0, j = 0, k, error = 0, modusage = 0, ignore_restore = 0;
|
||||||
int head_no = 0, target_no = 0, exit_condition = 0, readres;
|
int head_no = 0, target_no = 0, exit_condition = 0, readres;
|
||||||
time_t starttime, elapsed_status, elapsed_restore, status_print = 59, tmp_time;
|
time_t starttime, elapsed_status, elapsed_restore, status_print = 59, tmp_time;
|
||||||
char *tmpptr, *tmpptr2;
|
char *tmpptr, *tmpptr2;
|
||||||
|
@ -2462,7 +2464,7 @@ int main(int argc, char *argv[]) {
|
||||||
help(1);
|
help(1);
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
help(0);
|
help(0);
|
||||||
while ((i = getopt(argc, argv, "hq64Rde:vVl:fFg:L:p:OP:o:M:C:t:T:m:w:W:s:SUux:y")) >= 0) {
|
while ((i = getopt(argc, argv, "hIq64Rde:vVl:fFg:L:p:OP:o:M:C:t:T:m:w:W:s:SUux:y")) >= 0) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 'h':
|
case 'h':
|
||||||
help(1);
|
help(1);
|
||||||
|
@ -2485,6 +2487,9 @@ int main(int argc, char *argv[]) {
|
||||||
case 'R':
|
case 'R':
|
||||||
hydra_options.restore = 1;
|
hydra_options.restore = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'I':
|
||||||
|
ignore_restore = 1; // this is not to be saved in hydra_options!
|
||||||
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
hydra_options.debug = ++debug;
|
hydra_options.debug = ++debug;
|
||||||
++verbose;
|
++verbose;
|
||||||
|
@ -3457,8 +3462,9 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
free(memcheck);
|
free(memcheck);
|
||||||
if ((rfp = fopen(RESTOREFILE, "r")) != NULL) {
|
if ((rfp = fopen(RESTOREFILE, "r")) != NULL) {
|
||||||
fprintf(stderr, "[WARNING] Restorefile (%s) from a previous session found, to prevent overwriting, you have 10 seconds to abort...\n", RESTOREFILE);
|
fprintf(stderr, "[WARNING] Restorefile (%s) from a previous session found, to prevent overwriting, %s\n", ignore_restore == 1 ? "ignored ..." : "you have 10 seconds to abort...", RESTOREFILE);
|
||||||
sleep(10);
|
if (ignore_restore != 1)
|
||||||
|
sleep(10);
|
||||||
fclose(rfp);
|
fclose(rfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue