From 28804449df1f28067b9eba8475452b5c97b2a1ac Mon Sep 17 00:00:00 2001 From: Luke Stuart Date: Wed, 10 Aug 2011 15:03:33 +0000 Subject: Weblog Updates including Squark support and revamped analysis. --- weblog-viewweblog-html.lsp | 300 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 299 insertions(+), 1 deletion(-) mode change 120000 => 100644 weblog-viewweblog-html.lsp (limited to 'weblog-viewweblog-html.lsp') diff --git a/weblog-viewweblog-html.lsp b/weblog-viewweblog-html.lsp deleted file mode 120000 index 4ec32bc..0000000 --- a/weblog-viewweblog-html.lsp +++ /dev/null @@ -1 +0,0 @@ -weblog-viewblocklog-html.lsp \ No newline at end of file diff --git a/weblog-viewweblog-html.lsp b/weblog-viewweblog-html.lsp new file mode 100644 index 0000000..a03c3e6 --- /dev/null +++ b/weblog-viewweblog-html.lsp @@ -0,0 +1,299 @@ +<% local data, viewlibrary, page_info, session = ... %> +<% require("viewfunctions")%> +<% require("weblogviewfunctions")%> +<% if data.value.focus.value ~= "" then %> + + +<% end %> + + + + + +<% local subdata, pagedata = paginate(data.value.log.value, page_info.clientdata, 200) %> + + +

Search Parameters

+
+<% if data.errtxt then %>

<%= html.html_escape(data.errtxt) %>

<% end %> +
" method="POST"> +
Active Weblog
+
+
+
Start Time
+
+

<%= html.html_escape(data.value.starttime.value) %>

+<% if data.value.starttime.errtxt then %>

<%= html.html_escape(data.value.starttime.errtxt) %>

<% end %> +
+
User ID
+
+

<%= html.html_escape(data.value.clientuserid.value) %>

+<% if data.value.clientuserid.errtxt then %>

<%= html.html_escape(data.value.clientuserid.errtxt) %>

<% end %> +
+
Client IP
+
+

<%= html.html_escape(data.value.clientip.value) %>

+<% if data.value.clientip.errtxt then %>

<%= html.html_escape(data.value.clientip.errtxt) %>

<% end %> +
+
End Time
+
+

<%= html.html_escape(data.value.endtime.value) %>

+<% if data.value.endtime.errtxt then %>

<%= html.html_escape(data.value.endtime.errtxt) %>

<% end %> +
+
URI Contains
+
+

Retrieve records where the URI contains this word

+

<%= html.html_escape(data.value.urisearch.value) %>

+<% if data.value.urisearch.errtxt then %>

<%= html.html_escape(data.value.urisearch.errtxt) %>

<% end %> +
+
Minimum Score
+
+

Minimum score to search on

+<% if data.value.score.errtxt then %>

<%= html.html_escape(data.value.score.errtxt) %>

<% end %> +
+
Sort By
+
+
+
Show Suspect Records
+
+ checked <% end %>> +

Show only URIs containing flagged words

+<% if data.value.badyesno.errtxt then %>

<%= html.html_escape(data.value.badyesno.errtxt) %>

<% end %> +
+
Show Denied URIs
+
+checked<% end %>> +<% if data.value.deniedyesno.errtxt then %>

<%= html.html_escape(data.value.deniedyesno.errtxt) %>

<% end %> +

Show only Denied URIs

+
+
Show Bypass Attempts
+
+checked <% end %>> +<% if data.value.bypassyesno.errtxt then %>

<%= html.html_escape(data.value.bypassyesno.errtxt) %>

<% end %> +

Show only Bypass attempts

+
+
Show Selected Records
+
+checked <% end %>> +<% if data.value.selected.errtxt then %>

<%= html.html_escape(data.value.selected.errtxt) %>

<% end %> +

Show only records that have been selected

+
+
+
+
+ +<% +local clientinfo = "" +if data.value.clientuserid.value ~= "" then + clientinfo = clientinfo .. "clientuserid="..data.value.clientuserid.value.."&" +end +if data.value.clientip.value ~= "" then + clientinfo = clientinfo .. "clientip="..data.value.clientip.value.."&" +end +%> + +<% displaypagination(pagedata, page_info) %> +

<%= html.html_escape(data.label) %>

+
+ + + + + + + + + + + + + + + + + + + +" name="markselected" onsubmit="return false" method="POST"> + +<% for i,watch in ipairs(subdata) do + local a,b = math.modf((i/2)) + local mark = '' + if (b == 0) and watch.selected ~= "t" then mark=' class="mark"' end + if watch.selected == "t" then mark=' class="selected"' end + local time = {} + time.year, time.month, time.day, time.hour, time.min, time.sec = + string.match(watch.logdatetime, "(%d+)%-(%d+)-(%d+)%s+(%d+):(%d+):(%d+)") + time = os.time(time) %> +> + + + + + + + + + + + + + + +<% end %> + +
TimestampClient IPUser IDSizeSusDenBypScoreReasonURLBad Words
checked <% end %>><%= html.html_escape(watch.id) %> style="font-weight:bold;" id="focus" <% end %> ><%= html.link{value = "viewweblog?"..clientinfo.. + "starttime="..os.date("%Y-%m-%d %H:%M:%S", time - 60*(tonumber(data.value.window.value))).. + "&endtime="..os.date("%Y-%m-%d %H:%M:%S", time + 60*(tonumber(data.value.window.value))).. + "&focus="..watch.logdatetime, + label=watch.logdatetime} %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientip) %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientuserid) %><%= html.html_escape(watch.bytes) %><% if watch.badyesno == "1" then %><% end %><% if watch.deniedyesno ~= "0" then %> <% end %><% if watch.bypassyesno ~= "0" then %> <% end %><%= html.html_escape(watch.score) %><%= html.html_escape(watch.reason) %><% highlight_uri=html.html_escape(watch.uri) + if watch.wordloc ~= nil then + if string.find(watch.wordloc,"|") then + badwords = split(watch.wordloc,"|") + for key,wrd in pairs(badwords) do + highlight_uri = string.highlight(highlight_uri, wrd, "yellow","red") + end + else + highlight_uri = string.highlight(highlight_uri, watch.wordloc, "yellow","red") + end + end %> + <%= highlight_uri %><%= watch.wordloc %>
+<% displaypagination(pagedata, page_info) %> + +<% if data.errtxt then %> +

<%= html.html_escape(data.errtxt) %>

+<% end %> +<% if #data.value.log.value == 0 then %> +

No results, try adjusting search parameters

+<% end %> +
Download Options
+<% if page_info.action == "viewweblog" then %> +
" method="POST"> + + + + + + + + + + + + +
+
+<% end %> + + + + +
-- cgit v1.2.3