Skip to content

Commit 8930736

Browse files
Merge branch 'ITAYC0HEN-feature/betterSnippets'
2 parents c681272 + 796702e commit 8930736

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

yara/snippets/yara.json

+14-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
"Rule": {
33
"prefix": "rule",
44
"body": [
5-
"rule ${TM_FILENAME_BASE}",
5+
"rule ${1:$TM_FILENAME_BASE}",
66
"{",
77
"\tmeta:",
8+
"\t\tdescription = \"${description}\"",
9+
"\t\tauthor = \"${author}\"",
810
"\t\tdate = \"${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}\"",
11+
"\t\treference = \"${reference}\"",
12+
"\t\thash = \"${hash}\"",
913
"\tstrings:",
10-
"\t\t${1:strings}",
14+
"\t\t$${name} = \"${string}\"",
1115
"\tcondition:",
12-
"\t\t${2:condition}",
16+
"\t\t${condition}",
1317
"}"
1418
],
1519
"description": "Generate a rule skeleton"
@@ -18,16 +22,19 @@
1822
"prefix": "meta",
1923
"body": [
2024
"meta:",
21-
"\t\tdate = \"${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}\"",
22-
"\t${metadata}"
25+
"\tdescription = \"${description}\"",
26+
"\tauthor = \"${author}\"",
27+
"\tdate = \"${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}\"",
28+
"\treference = \"${reference}\"",
29+
"\thash = \"${hash}\""
2330
],
2431
"description": "Generate a 'meta' section"
2532
},
2633
"Strings": {
2734
"prefix": "strings",
2835
"body": [
2936
"strings:",
30-
"\t${strings}"
37+
"\t$${name} = \"${string}\""
3138
],
3239
"description": "Generate a 'strings' section"
3340
},
@@ -59,4 +66,4 @@
5966
"body": "all of ${them}",
6067
"description": "String set keyword: all"
6168
}
62-
}
69+
}

0 commit comments

Comments
 (0)