mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add YARA language (#3877)
* Add YARA language grammars * Add YARA to languages.yml * Add YARA samples * Add YARA to README
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -868,6 +868,9 @@ | |||||||
| [submodule "vendor/grammars/language-ballerina"] | [submodule "vendor/grammars/language-ballerina"] | ||||||
| 	path = vendor/grammars/language-ballerina | 	path = vendor/grammars/language-ballerina | ||||||
| 	url = https://github.com/ballerinalang/plugin-vscode | 	url = https://github.com/ballerinalang/plugin-vscode | ||||||
|  | [submodule "vendor/grammars/language-yara"] | ||||||
|  | 	path = vendor/grammars/language-yara | ||||||
|  | 	url = https://github.com/blacktop/language-yara | ||||||
| [submodule "vendor/grammars/language-ruby"] | [submodule "vendor/grammars/language-ruby"] | ||||||
| 	path = vendor/grammars/language-ruby | 	path = vendor/grammars/language-ruby | ||||||
| 	url = https://github.com/atom/language-ruby | 	url = https://github.com/atom/language-ruby | ||||||
|   | |||||||
| @@ -503,6 +503,8 @@ vendor/grammars/language-yaml: | |||||||
| - source.yaml | - source.yaml | ||||||
| vendor/grammars/language-yang: | vendor/grammars/language-yang: | ||||||
| - source.yang | - source.yang | ||||||
|  | vendor/grammars/language-yara: | ||||||
|  | - source.yara | ||||||
| vendor/grammars/latex.tmbundle: | vendor/grammars/latex.tmbundle: | ||||||
| - text.bibtex | - text.bibtex | ||||||
| - text.log.latex | - text.log.latex | ||||||
|   | |||||||
| @@ -5133,6 +5133,14 @@ YANG: | |||||||
|   tm_scope: source.yang |   tm_scope: source.yang | ||||||
|   ace_mode: text |   ace_mode: text | ||||||
|   language_id: 408 |   language_id: 408 | ||||||
|  | YARA: | ||||||
|  |   type: data | ||||||
|  |   ace_mode: text | ||||||
|  |   extensions: | ||||||
|  |   - ".yar" | ||||||
|  |   - ".yara" | ||||||
|  |   tm_scope: source.yara | ||||||
|  |   language_id: 805122868 | ||||||
| Yacc: | Yacc: | ||||||
|   type: programming |   type: programming | ||||||
|   extensions: |   extensions: | ||||||
|   | |||||||
							
								
								
									
										23
									
								
								samples/YARA/OfExample.yar
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								samples/YARA/OfExample.yar
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  | rule OfExample2 | ||||||
|  | { | ||||||
|  |     strings: | ||||||
|  |         $foo1 = "foo1" | ||||||
|  |         $foo2 = "foo2" | ||||||
|  |         $foo3 = "foo3" | ||||||
|  |  | ||||||
|  |     condition: | ||||||
|  |         2 of ($foo*)  // equivalent to 2 of ($foo1,$foo2,$foo3) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | rule OfExample3 | ||||||
|  | { | ||||||
|  |     strings: | ||||||
|  |         $foo1 = "foo1" | ||||||
|  |         $foo2 = "foo2" | ||||||
|  |  | ||||||
|  |         $bar1 = "bar1" | ||||||
|  |         $bar2 = "bar2" | ||||||
|  |  | ||||||
|  |     condition: | ||||||
|  |         3 of ($foo*,$bar1,$bar2) | ||||||
|  | } | ||||||
							
								
								
									
										13
									
								
								samples/YARA/example.yara
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								samples/YARA/example.yara
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | rule silent_banker : banker | ||||||
|  | { | ||||||
|  |     meta: | ||||||
|  |         description = "This is just an example" | ||||||
|  |         thread_level = 3 | ||||||
|  |         in_the_wild = true | ||||||
|  |     strings: | ||||||
|  |         $a = {6A 40 68 00 30 00 00 6A 14 8D 91} | ||||||
|  |         $b = {8D 4D B0 2B C1 83 C0 27 99 6A 4E 59 F7 F9} | ||||||
|  |         $c = "UVODFRYSIHLNWPEJXQZAKCBGMT" | ||||||
|  |     condition: | ||||||
|  |         $a or $b or $c | ||||||
|  | } | ||||||
							
								
								
									
										1
									
								
								samples/YARA/true.yar
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								samples/YARA/true.yar
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | rule test { condition: true } | ||||||
							
								
								
									
										1
									
								
								vendor/README.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/README.md
									
									
									
									
										vendored
									
									
								
							| @@ -406,4 +406,5 @@ This is a list of grammars that Linguist selects to provide syntax highlighting | |||||||
| - **Yacc:** [textmate/bison.tmbundle](https://github.com/textmate/bison.tmbundle) | - **Yacc:** [textmate/bison.tmbundle](https://github.com/textmate/bison.tmbundle) | ||||||
| - **YAML:** [atom/language-yaml](https://github.com/atom/language-yaml) | - **YAML:** [atom/language-yaml](https://github.com/atom/language-yaml) | ||||||
| - **YANG:** [DzonyKalafut/language-yang](https://github.com/DzonyKalafut/language-yang) | - **YANG:** [DzonyKalafut/language-yang](https://github.com/DzonyKalafut/language-yang) | ||||||
|  | - **YARA:** [blacktop/language-yara](https://github.com/blacktop/language-yara) | ||||||
| - **Zephir:** [phalcon/zephir-sublime](https://github.com/phalcon/zephir-sublime) | - **Zephir:** [phalcon/zephir-sublime](https://github.com/phalcon/zephir-sublime) | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								vendor/grammars/language-yara
									
									
									
									
										vendored
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/grammars/language-yara
									
									
									
									
										vendored
									
									
										Submodule
									
								
							 Submodule vendor/grammars/language-yara added at f08eec461a
									
								
							
							
								
								
									
										26
									
								
								vendor/licenses/grammar/language-yara.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								vendor/licenses/grammar/language-yara.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | --- | ||||||
|  | type: grammar | ||||||
|  | name: language-yara | ||||||
|  | license: mit | ||||||
|  | --- | ||||||
|  | The MIT License (MIT) | ||||||
|  |  | ||||||
|  | Copyright (c) 2014-2016 Blacktop | ||||||
|  |  | ||||||
|  | Permission is hereby granted, free of charge, to any person obtaining a copy | ||||||
|  | of this software and associated documentation files (the "Software"), to deal | ||||||
|  | in the Software without restriction, including without limitation the rights | ||||||
|  | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||||
|  | copies of the Software, and to permit persons to whom the Software is | ||||||
|  | furnished to do so, subject to the following conditions: | ||||||
|  |  | ||||||
|  | The above copyright notice and this permission notice shall be included in all | ||||||
|  | copies or substantial portions of the Software. | ||||||
|  |  | ||||||
|  | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||
|  | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||
|  | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||
|  | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||
|  | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||
|  | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||||
|  | SOFTWARE. | ||||||
		Reference in New Issue
	
	Block a user