|
@@ -2,6 +2,7 @@
|
|
|
#include <vector>
|
|
|
#include <map>
|
|
|
#include <stack>
|
|
|
+#include <set>
|
|
|
#include <stdio.h>
|
|
|
#include <stdlib.h>
|
|
|
#include <string.h>
|
|
@@ -79,6 +80,7 @@ int direct_dat = 0;
|
|
|
int fool_janestyle = 0;
|
|
|
int talk_to_5ch = 0;
|
|
|
int subject_to_lastmodify = 0;
|
|
|
+std::set<std::string> subject_to_lastmodify_hosts;
|
|
|
static pthread_mutex_t lockarray[NUM_LOCKS];
|
|
|
|
|
|
void log_printf(int level, const char *format ...)
|
|
@@ -379,7 +381,7 @@ int main(int argc, char *argv[])
|
|
|
{"fool-janestyle", 0, NULL, 0},
|
|
|
{"keystore", 1, NULL, 0},
|
|
|
{"talk-to-5ch", 0, NULL, 0},
|
|
|
- {"subject-to-lastmodify", 0, NULL, 0},
|
|
|
+ {"subject-to-lastmodify", 2, NULL, 0},
|
|
|
#ifdef USE_MITM
|
|
|
{"mitm", 1, NULL, 0},
|
|
|
{"mitm-ca-cert", 1, NULL, 0},
|
|
@@ -625,7 +627,20 @@ int main(int argc, char *argv[])
|
|
|
talk_to_5ch = 1;
|
|
|
}
|
|
|
else if(!strcmp(options[option_index].name, "subject-to-lastmodify")) {
|
|
|
- subject_to_lastmodify = 1;
|
|
|
+ if (optarg) {
|
|
|
+ for (char *ptr = optarg; *ptr;) {
|
|
|
+ char *next = strchr(ptr, ',');
|
|
|
+ if (!next) {
|
|
|
+ subject_to_lastmodify_hosts.insert(std::string(ptr));
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ if (next > ptr) subject_to_lastmodify_hosts.insert(std::string(ptr, next-ptr));
|
|
|
+ ptr = next + 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ subject_to_lastmodify = 2;
|
|
|
+ }
|
|
|
+ else subject_to_lastmodify = 1;
|
|
|
}
|
|
|
break;
|
|
|
case 'p':
|