Skip to content

Update thor.vim #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions syntax/thor.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ syn match ThorIp /\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)
syn match ThorHash '\s[a-f0-9]\{64}'

" advanced RegExes
" - zero-width lookup matches to avoid conflicts with the matches of FILE: and
" - @<= is zero-width lookup matches to avoid conflicts with the matches of FILE: and
" SCORE: because normally only one match per string is allowed.
" - \n\? to work after F7 split lines
" - [A-Z]\{3,10}... is the following EXT:, REASON:, ...

" highlight filenames
syn match ThorFilename '\(FILE_\?\d\{0,3}_\?\d\{0,3}:\)\@<= .\{-1,1000} \n\?\([A-Z]\{3,10}_\?[A-Z]\{0,10}_\?\d\{0,3}_\?\d\{0,3}: \)\@='
syn match ThorFilename '\(ARCHIVE_\?\d\{0,3}_\?\d\{0,3}:\)\@<= .\{-1,1000} \n\?\([A-Z]\{3,10}_\?[A-Z]\{0,10}_\?\d\{0,3}_\?\d\{0,3}: \)\@='
" highlight scores from 200 to 999
syn match ThorHighScore '\(SCORE:\)\@<= \(2\|3\|4\|5\|6\|7\|8\|9\)\d\d \n\?\([A-Z]\{3,10}_\?\d\{0,3}: \)\@='
" highlight scores from 80 to 100 (according to https://github.com/Neo23x0/YARA-Style-Guide#score)
syn match ThorHighScore '\(SCORE:\)\@<= \(\(8\|9\)\d\|100\) \n\?\([A-Z]\{3,10}_\?\d\{0,3}: \)\@='

" modules
syn match ThorModule 'MODULE: .* \zeMESSAGE'
Expand Down