Changeset 413
- Timestamp:
- 05/11/2010 06:43:26 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/plugins/nikto_core.plugin (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/nikto_core.plugin
r412 r413 1930 1930 ####################################################################### 1931 1931 sub cache_add { 1932 unless (defined $CLI{'nocache'}) {1932 if ((!defined $CLI{'nocache'}) && (!defined $flags->{'nocache'})) { 1933 1933 my $method = shift; 1934 1934 my $code = shift; … … 1939 1939 1940 1940 my $key = 1941 LW2::md5( $mark->{'ip'} .1942 $mark->{'hostname'} .1943 $mark->{'port'} .1944 $mark->{'ssl'} .1945 $method .1946 $uri .1947 $postdata);1941 LW2::md5( $mark->{'ip'} 1942 . $mark->{'hostname'} 1943 . $mark->{'port'} 1944 . $mark->{'ssl'} 1945 . $method 1946 . $uri 1947 . $postdata); 1948 1948 1949 1949 $CACHE{$key}{'method'} = $method; … … 1955 1955 ####################################################################### 1956 1956 sub cache_fetch { 1957 1958 # quick exit if cache is disabled 1959 if ((defined $CLI{'nocache'}) || (defined $flags->{'nocache'})) { 1960 return 0; 1961 } 1962 1957 1963 my $method = shift; 1958 1964 my $uri = shift; … … 1960 1966 my ($mark) = @_; 1961 1967 my $key = 1962 LW2::md5( $mark->{'ip'} .1963 $mark->{'hostname'} .1964 $mark->{'port'} .1965 $mark->{'ssl'} .1966 $method .1967 $uri .1968 $postdata);1968 LW2::md5( $mark->{'ip'} 1969 . $mark->{'hostname'} 1970 . $mark->{'port'} 1971 . $mark->{'ssl'} 1972 . $method 1973 . $uri 1974 . $postdata); 1969 1975 1970 1976 if ($CACHE{$key}{'code'} ne '') { … … 2009 2015 # Check cache 2010 2016 my $incache = 0; 2011 if ((!defined $CLI{'nocache'}) && (!defined $flags->{'nocache'})) { 2012 nprint("- Retrieving $uri from cache.", "v"); 2013 ($incache, my $code, my $content) = 2014 cache_fetch($request{'whisker'}->{'method'}, $uri, $data, $mark); 2015 if ($incache) { 2016 $result{'whisker'}->{'code'} = $code; 2017 $result{'whisker'}->{'data'} = $content; 2018 } 2017 nprint("- Checking $uri in cache.", "d"); 2018 ($incache, my $code, my $content) = 2019 cache_fetch($request{'whisker'}->{'method'}, $uri, $data, $mark); 2020 if ($incache) { 2021 $result{'whisker'}->{'code'} = $code; 2022 $result{'whisker'}->{'data'} = $content; 2019 2023 } 2020 2024
Note: See TracChangeset
for help on using the changeset viewer.