{"action":"created","issue":{"url":"https://api.github.com/repos/VirusTotal/yara/issues/356","repository_url":"https://api.github.com/repos/VirusTotal/yara","labels_url":"https://api.github.com/repos/VirusTotal/yara/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/VirusTotal/yara/issues/356/comments","events_url":"https://api.github.com/repos/VirusTotal/yara/issues/356/events","html_url":"https://github.com/VirusTotal/yara/pull/356","id":111491457,"number":356,"title":"Add support for CLI parsing.","user":{"login":"wxsBSD","id":1394879,"avatar_url":"https://avatars.githubusercontent.com/u/1394879?v=3","gravatar_id":"","url":"https://api.github.com/users/wxsBSD","html_url":"https://github.com/wxsBSD","followers_url":"https://api.github.com/users/wxsBSD/followers","following_url":"https://api.github.com/users/wxsBSD/following{/other_user}","gists_url":"https://api.github.com/users/wxsBSD/gists{/gist_id}","starred_url":"https://api.github.com/users/wxsBSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxsBSD/subscriptions","organizations_url":"https://api.github.com/users/wxsBSD/orgs","repos_url":"https://api.github.com/users/wxsBSD/repos","events_url":"https://api.github.com/users/wxsBSD/events{/privacy}","received_events_url":"https://api.github.com/users/wxsBSD/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2015-10-14T20:55:31Z","updated_at":"2016-08-03T17:08:15Z","closed_at":"2016-08-03T14:58:08Z","pull_request":{"url":"https://api.github.com/repos/VirusTotal/yara/pulls/356","html_url":"https://github.com/VirusTotal/yara/pull/356","diff_url":"https://github.com/VirusTotal/yara/pull/356.diff","patch_url":"https://github.com/VirusTotal/yara/pull/356.patch"},"body":"This commit adds support for parsing the COM Runtime descriptor\r\ndirectory entry, which is only the start of the rabbit hole. ;)\r\n\r\nUltimately this leads us to parsing the CLI MetaData streams, including\r\nGUIDs and a convoluted table structure containing various information\r\nrelevant to the CLI.\r\n\r\nIn particular, here are the things we parse out:\r\n\r\n```\r\n+  declare_string(\"dotnet_version\");\r\n+  declare_string(\"dotnet_module_name\");\r\n+  begin_struct_array(\"dotnet_streams\");\r\n+    declare_string(\"name\");\r\n+    declare_integer(\"offset\");\r\n+    declare_integer(\"size\");\r\n+  end_struct_array(\"dotnet_streams\");\r\n+  declare_integer(\"number_of_dotnet_streams\");\r\n+  declare_string_array(\"dotnet_guids\");\r\n+  begin_struct_array(\"dotnet_resources\");\r\n+    declare_integer(\"offset\");\r\n+    declare_integer(\"length\");\r\n+    declare_string(\"name\");\r\n+  end_struct_array(\"dotnet_resources\");\r\n+  declare_integer(\"number_of_dotnet_resources\");\r\n+  begin_struct(\"dotnet_assembly\");\r\n+    begin_struct(\"version\");\r\n+      declare_integer(\"major\");\r\n+      declare_integer(\"minor\");\r\n+      declare_integer(\"build_number\");\r\n+      declare_integer(\"revision_number\");\r\n+    end_struct(\"version\");\r\n+    declare_string(\"name\");\r\n+    declare_string(\"culture\");\r\n+  end_struct(\"dotnet_assembly\");\r\n+  declare_string_array(\"dotnet_modulerefs\");\r\n+  declare_integer(\"number_of_dotnet_modulerefs\");\r\n```\r\n\r\nUnfortunately there are a lot of manual table walking because the tables\r\ncontain variable size columns, which depend upon the number of rows in\r\nother tables. This makes the table walking code more messy than I would\r\nlike.\r\n\r\nAnd since I'm here and noticed it was unused, remove the unused\r\nRICH_DATA structure."},"comment":{"url":"https://api.github.com/repos/VirusTotal/yara/issues/comments/237301123","html_url":"https://github.com/VirusTotal/yara/pull/356#issuecomment-237301123","issue_url":"https://api.github.com/repos/VirusTotal/yara/issues/356","id":237301123,"user":{"login":"wxsBSD","id":1394879,"avatar_url":"https://avatars.githubusercontent.com/u/1394879?v=3","gravatar_id":"","url":"https://api.github.com/users/wxsBSD","html_url":"https://github.com/wxsBSD","followers_url":"https://api.github.com/users/wxsBSD/followers","following_url":"https://api.github.com/users/wxsBSD/following{/other_user}","gists_url":"https://api.github.com/users/wxsBSD/gists{/gist_id}","starred_url":"https://api.github.com/users/wxsBSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxsBSD/subscriptions","organizations_url":"https://api.github.com/users/wxsBSD/orgs","repos_url":"https://api.github.com/users/wxsBSD/repos","events_url":"https://api.github.com/users/wxsBSD/events{/privacy}","received_events_url":"https://api.github.com/users/wxsBSD/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T17:08:15Z","updated_at":"2016-08-03T17:08:15Z","body":"Also, thanks for the merge!"}}
{"actor":{"display_login":"wxsBSD"}}