\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{DonPromillo} \pdfinfo{ /Title (lr-web-console-display-name-lucene-syntax.pdf) /Creator (Cheatography) /Author (DonPromillo) /Subject ({[}LR{]} Web Console Display Name - Lucene Syntax Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{0278A3} \definecolor{LightBackground}{HTML}{EFF6F9} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{{[}LR{]} Web Console Display Name - Lucene Syntax Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{DonPromillo} via \textcolor{DarkBackground}{\uline{cheatography.com/40290/cs/12396/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}DonPromillo \\ \uline{cheatography.com/donpromillo} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 4th August, 2017.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Examples}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{To escape a special character that is part of the query syntax, use a backslash before the character. Characters that require this treatment are: + - \&\& || ! ( ) \{ \} {[} {]} \textasciicircum{} " \textasciitilde{} * ? : \textbackslash{}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Operators:{\bf{ || OR AND \&\& NOT !}}} \tn % Row Count 5 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{If you wanted to run a query for all impacted users whose account ends with Smith, you would use: {\bf{login:/.*Smith/}}} \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{If you wanted to run a query for impacted users whose names are similar to Jon, such as Ron or John, you would use:{\bf{ login:Jon\textasciitilde{}}}} \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{If you wanted to run a query for all activity that falls under the Malware or Attack classifications, you would use:{\bf{ \seqsplit{classificationName:("Malware"} "Attack")}}} \tn % Row Count 15 (+ 4) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{If you wanted to run a query for the host from which a log activity originated, INCLUSIVE of the first and last IP address, you would use: {\bf{originHost: {[}106.194.190.210 TO 106.194.190.250{]}}}} \tn % Row Count 19 (+ 4) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{If you wanted to run a query for the host from which a log activity originated, EXCLUSIVE of the first and last IP address, you would use: {\bf{originHost: \{106.194.190.210 TO 106.194.190.250\}}}} \tn % Row Count 23 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.88 cm} x{3.12 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Network}} \tn % Row 0 \SetRowColor{LightBackground} Domain (Impacted) & \seqsplit{`domainImpacted`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Domain (Origin) & `domainOrigin` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} NAT TCP/UDP Port (Impacted) & \seqsplit{`impactedNatPort`} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} NAT TCP/UDP Port (Origin) & \seqsplit{`originNatPort`} \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} Network (Impacted) & \seqsplit{`impactedNetwork`} \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} Network (Origin) & \seqsplit{`originNetwork`} \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} Protocol & `protocolName` \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} Session & `session` \tn % Row Count 12 (+ 1) % Row 8 \SetRowColor{LightBackground} Session Type & `sessionType` \tn % Row Count 13 (+ 1) % Row 9 \SetRowColor{white} TCP/UDP Port (Origin) & `originPort` \tn % Row Count 14 (+ 1) % Row 10 \SetRowColor{LightBackground} TCP/UDP Port (Impacted) & `impactedPort` \tn % Row Count 15 (+ 1) % Row 11 \SetRowColor{white} URL & `url` \tn % Row Count 16 (+ 1) % Row 12 \SetRowColor{LightBackground} User Agent & `userAgent` \tn % Row Count 17 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.68 cm} x{4.32 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Classification}} \tn % Row 0 \SetRowColor{LightBackground} Classification & `classificationName` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Common Event & `commonEventName` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} CVE & `cve` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Direction & `directionName` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} MPE Rule Name & `mpeRuleName` \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Policy & `policy` \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} Reason & `reason` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} Response Code & `esponseCode` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} Result & `result` \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} Severity & `severity` \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} Status & `status` \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} Threat Name & `threatName` \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} Vendor Info & `vendorInfo` \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} Vendor Message ID & `vendorMessageId` \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Applications}} \tn % Row 0 \SetRowColor{LightBackground} Action & `action` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Amount & `amount` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Command & `command` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Duration & `duration` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Hash & `hash` \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Known Appliaction & `serviceName` \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} Object & `object` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} Object Name & `objectName` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} Object Type & `objectType` \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} Parent Process ID & `parentProcessId` \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} Parent Process Path & `parentProcessPath` \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} Process Name & `process` \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} Process ID & `processId` \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} Quantity & `quantity` \tn % Row Count 14 (+ 1) % Row 14 \SetRowColor{LightBackground} Rate & `rate` \tn % Row Count 15 (+ 1) % Row 15 \SetRowColor{white} Size & `size` \tn % Row Count 16 (+ 1) % Row 16 \SetRowColor{LightBackground} Subject & `subject` \tn % Row Count 17 (+ 1) % Row 17 \SetRowColor{white} Thread ID & `threatid` \tn % Row Count 18 (+ 1) % Row 18 \SetRowColor{LightBackground} Version & `version` \tn % Row Count 19 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.56 cm} x{3.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Host}} \tn % Row 0 \SetRowColor{LightBackground} Host (Impacted) & `impactedHost` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Host (Origin) & `originHost` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Hostname (Impacted) & `impactedName` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Hostname (Origin) & `originName` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Interface (Impacted) & \seqsplit{`impactedInterface`} \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} Interface (Origin) & \seqsplit{`originInterface`} \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} IP Address (Impacted) & `impactedIp` \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} IP Address (Origin) & `originIp` \tn % Row Count 9 (+ 1) % Row 8 \SetRowColor{LightBackground} Known Host (Impacted) & \seqsplit{`impactedHostName`} \tn % Row Count 11 (+ 2) % Row 9 \SetRowColor{white} Known Host (Origin) & `originHostName` \tn % Row Count 12 (+ 1) % Row 10 \SetRowColor{LightBackground} Mac Address (Impacted) & `impactedMac` \tn % Row Count 13 (+ 1) % Row 11 \SetRowColor{white} Mac Address (Origin) & `originMac` \tn % Row Count 14 (+ 1) % Row 12 \SetRowColor{LightBackground} NAT IP Address (Impacted) & `impactedNatIp` \tn % Row Count 16 (+ 2) % Row 13 \SetRowColor{white} NAT IP Address (Origin) & `originNatIp` \tn % Row Count 18 (+ 2) % Row 14 \SetRowColor{LightBackground} Serial Number & `serialNumber` \tn % Row Count 19 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Log}} \tn % Row 0 \SetRowColor{LightBackground} First Log Date & `normalMsgDate` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Last Log Date & `normalDateMax` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Log Count & `count` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Log Date & `normalDate` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Log Message & `logMessage` \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Log Source & `logSourceName` \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} Log Source Entity & `entityName` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} Log Source Host & `logSourceHostName` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} Log Source Type & `logSourceTypeName` \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} Log Sequence Number & `sequenceNumber` \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.92 cm} x{4.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Location}} \tn % Row 0 \SetRowColor{LightBackground} Country (Impacted) & `impactedCountry` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Country (Origin) & `originCountry` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Entity (Impacted) & \seqsplit{`impactedEntityName`} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Entity (Origin) & `originEntityName` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Location (Impacted) & `impactedLocation` \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Location (Origin) & `originLocation` \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} Region (Impacted) & `impactedRegion` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} Region (Origin) & `originRegion` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} Zone (Impacted) & `impactedZoneName` \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} Zone (Origin) & `originZoneName` \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.24 cm} x{3.76 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Traffic}} \tn % Row 0 \SetRowColor{LightBackground} Host (Impacted) KBytes Rcvd & `kBytesIn` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Host (Impacted) KBytes Sent & `kBytesOut` \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Host (Impacted) KBytes Total & \seqsplit{`impactedHostTotalKBytes`} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} Host (Impacted) Packets Rcvd & `itemsPacketsIn` \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} Host (Impacted) Packets Sent & `itemsPacketsOut` \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} Host (Impacted) Packets Total & \seqsplit{`impactedHostTotalPackets`} \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} KBytes Inbound & `kBytes` \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} KBytes Outbound & `outboundKBytes` \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.64 cm} x{3.36 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Identity}} \tn % Row 0 \SetRowColor{LightBackground} Group & `group` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Recipient & `recipient` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Sender & `sender` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} User (Origin) & `login` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} User (Impacted) & `account` \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}