1.75b: iPhone U-A support added.
This commit is contained in:
parent
514ec354db
commit
088136e95e
|
@ -1,3 +1,8 @@
|
||||||
|
Version 1.75b:
|
||||||
|
--------------
|
||||||
|
|
||||||
|
- iPhone U-A support added.
|
||||||
|
|
||||||
Version 1.74b:
|
Version 1.74b:
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
|
3
README
3
README
|
@ -312,7 +312,8 @@ parameters...
|
||||||
By default, skipfish sends minimalistic HTTP headers to reduce the amount of
|
By default, skipfish sends minimalistic HTTP headers to reduce the amount of
|
||||||
data exchanged over the wire; some sites examine User-Agent strings or header
|
data exchanged over the wire; some sites examine User-Agent strings or header
|
||||||
ordering to reject unsupported clients, however. In such a case, you can use
|
ordering to reject unsupported clients, however. In such a case, you can use
|
||||||
-b ie or -b ffox to mimic one of the two popular browsers.
|
-b ie, -b ffox, or -b phone to mimic one of the two popular browsers (or
|
||||||
|
iPhone).
|
||||||
|
|
||||||
When it comes to customizing your HTTP requests, you can also use the -H
|
When it comes to customizing your HTTP requests, you can also use the -H
|
||||||
option to insert any additional, non-standard headers; or -F to define a
|
option to insert any additional, non-standard headers; or -F to define a
|
||||||
|
|
|
@ -893,7 +893,7 @@ u8* build_request_data(struct http_request* req) {
|
||||||
ASD("Keep-Alive: 300\r\n");
|
ASD("Keep-Alive: 300\r\n");
|
||||||
ASD("Connection: keep-alive\r\n");
|
ASD("Connection: keep-alive\r\n");
|
||||||
|
|
||||||
} else /* MSIE */ {
|
} else if (browser_type == BROWSER_MSIE) {
|
||||||
|
|
||||||
ASD("Accept: */*\r\n");
|
ASD("Accept: */*\r\n");
|
||||||
|
|
||||||
|
@ -909,6 +909,22 @@ u8* build_request_data(struct http_request* req) {
|
||||||
ASD("Accept-Encoding: gzip, deflate\r\n");
|
ASD("Accept-Encoding: gzip, deflate\r\n");
|
||||||
ASD("Connection: Keep-Alive\r\n");
|
ASD("Connection: Keep-Alive\r\n");
|
||||||
|
|
||||||
|
} else /* iPhone */ {
|
||||||
|
|
||||||
|
if (!GET_HDR((u8*)"User-Agent", &req->par))
|
||||||
|
ASD("User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS "
|
||||||
|
"X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 "
|
||||||
|
"Mobile/8B117 Safari/6531.22.7 SF/" VERSION "\r\n");
|
||||||
|
|
||||||
|
ASD("Accept: application/xml,application/xhtml+xml,text/html;q=0.9,"
|
||||||
|
"text/plain;q=0.8,image/png,*/*;q=0.5\r\n");
|
||||||
|
|
||||||
|
if (!GET_HDR((u8*)"Accept-Language", &req->par))
|
||||||
|
ASD("Accept-Language: en-us\r\n");
|
||||||
|
|
||||||
|
ASD("Accept-Encoding: gzip, deflate\r\n");
|
||||||
|
ASD("Connection: keep-alive\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -391,6 +391,7 @@ extern u8 ignore_cookies;
|
||||||
#define BROWSER_FAST 0 /* Minimimal HTTP headers */
|
#define BROWSER_FAST 0 /* Minimimal HTTP headers */
|
||||||
#define BROWSER_MSIE 1 /* Try to mimic MSIE */
|
#define BROWSER_MSIE 1 /* Try to mimic MSIE */
|
||||||
#define BROWSER_FFOX 2 /* Try to mimic Firefox */
|
#define BROWSER_FFOX 2 /* Try to mimic Firefox */
|
||||||
|
#define BROWSER_PHONE 3 /* Try to mimic iPhone */
|
||||||
|
|
||||||
extern u8 browser_type;
|
extern u8 browser_type;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ The final report generated by the tool is meant to serve as a foundation for pro
|
||||||
.B \-A user:pass
|
.B \-A user:pass
|
||||||
use specified HTTP authentication credentials
|
use specified HTTP authentication credentials
|
||||||
.TP
|
.TP
|
||||||
.B \-F host:IP
|
.B \-F host=IP
|
||||||
pretend that 'host' resolves to 'IP'
|
pretend that 'host' resolves to 'IP'
|
||||||
.TP
|
.TP
|
||||||
.B \-C name=val
|
.B \-C name=val
|
||||||
|
@ -28,8 +28,8 @@ append a custom cookie to all requests
|
||||||
.B \-H name=val
|
.B \-H name=val
|
||||||
append a custom HTTP header to all requests
|
append a custom HTTP header to all requests
|
||||||
.TP
|
.TP
|
||||||
.B \-b (i|f)
|
.B \-b (i|f|p)
|
||||||
use headers consistent with MSIE / Firefox
|
use headers consistent with MSIE / Firefox / iPhone
|
||||||
.TP
|
.TP
|
||||||
.B \-N
|
.B \-N
|
||||||
do not accept any new cookies
|
do not accept any new cookies
|
||||||
|
@ -91,7 +91,7 @@ be less noisy about MIME / charset mismatches on probably
|
||||||
static content
|
static content
|
||||||
.TP
|
.TP
|
||||||
.B \-M
|
.B \-M
|
||||||
log warnings about mixed content
|
log warnings about mixed content or non-SSL password forms
|
||||||
.TP
|
.TP
|
||||||
.B \-E
|
.B \-E
|
||||||
log all HTTP/1.0 / HTTP/1.1 caching intent mismatches
|
log all HTTP/1.0 / HTTP/1.1 caching intent mismatches
|
||||||
|
|
|
@ -73,10 +73,10 @@ static void usage(char* argv0) {
|
||||||
"Authentication and access options:\n\n"
|
"Authentication and access options:\n\n"
|
||||||
|
|
||||||
" -A user:pass - use specified HTTP authentication credentials\n"
|
" -A user:pass - use specified HTTP authentication credentials\n"
|
||||||
" -F host:IP - pretend that 'host' resolves to 'IP'\n"
|
" -F host=IP - pretend that 'host' resolves to 'IP'\n"
|
||||||
" -C name=val - append a custom cookie to all requests\n"
|
" -C name=val - append a custom cookie to all requests\n"
|
||||||
" -H name=val - append a custom HTTP header to all requests\n"
|
" -H name=val - append a custom HTTP header to all requests\n"
|
||||||
" -b (i|f) - use headers consistent with MSIE / Firefox\n"
|
" -b (i|f|p) - use headers consistent with MSIE / Firefox / iPhone\n"
|
||||||
" -N - do not accept any new cookies\n\n"
|
" -N - do not accept any new cookies\n\n"
|
||||||
|
|
||||||
"Crawl scope options:\n\n"
|
"Crawl scope options:\n\n"
|
||||||
|
@ -372,6 +372,7 @@ int main(int argc, char** argv) {
|
||||||
case 'b':
|
case 'b':
|
||||||
if (optarg[0] == 'i') browser_type = BROWSER_MSIE; else
|
if (optarg[0] == 'i') browser_type = BROWSER_MSIE; else
|
||||||
if (optarg[0] == 'f') browser_type = BROWSER_FFOX; else
|
if (optarg[0] == 'f') browser_type = BROWSER_FFOX; else
|
||||||
|
if (optarg[0] == 'p') browser_type = BROWSER_PHONE; else
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue