{"action":"created","comment":{"url":"https://api.github.com/repos/MISP/MISP/pulls/comments/75678706","id":75678706,"diff_hunk":"@@ -263,6 +263,53 @@ public function cachenids() {\n \t\t$this->Job->saveField('date_modified', date(\"y-m-d H:i:s\"));\n \t}\n \n+\tpublic function cachebro()\n+\t{\n+\t\t$broHeader = \"#fields indicator\\tindicator_type\\tmeta.source\\tmeta.url\\tmeta.do_notice\\tmeta.if_in\\n\";\n+\t\t$userId = $this->args[0];\n+\t\t$user = $this->User->getAuthUser($userId);\n+\t\t$id = $this->args[1];\n+\t\t$this->Job->id = $id;\n+\t\t$format = $this->args[2];\n+\t\t$this->Job->saveField('progress', 1);\n+\t\t$types = array('ip', 'email', 'domain', 'filename', 'filehash', 'certhash', 'software', 'url'); //Bro types\n+\t\t$typeCount = count($types);\n+\t\t$dir = new Folder(APP . DS . '/tmp/cached_exports/' . $format, true, 0750);\n+\n+\t\tif ($user['Role']['perm_site_admin']) {\n+\t\t\t$zipname = DS . 'misp.bro.ADMIN.intel.zip';\n+\t\t} else {\n+\t\t\t$zipname = DS . 'misp.bro.' . $user['Organisation']['name'] . '.intel.zip';","path":"app/Console/Command/EventShell.php","position":20,"original_position":20,"commit_id":"bc6b2d1ba8ab1d4df33e181d4c5e6dd41be56347","original_commit_id":"bc6b2d1ba8ab1d4df33e181d4c5e6dd41be56347","user":{"login":"ppanero","id":6756943,"avatar_url":"https://avatars.githubusercontent.com/u/6756943?v=3","gravatar_id":"","url":"https://api.github.com/users/ppanero","html_url":"https://github.com/ppanero","followers_url":"https://api.github.com/users/ppanero/followers","following_url":"https://api.github.com/users/ppanero/following{/other_user}","gists_url":"https://api.github.com/users/ppanero/gists{/gist_id}","starred_url":"https://api.github.com/users/ppanero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppanero/subscriptions","organizations_url":"https://api.github.com/users/ppanero/orgs","repos_url":"https://api.github.com/users/ppanero/repos","events_url":"https://api.github.com/users/ppanero/events{/privacy}","received_events_url":"https://api.github.com/users/ppanero/received_events","type":"User","site_admin":false},"body":"Yeah you'r right, anyhow that is the way it is done in every chace method in EventShell.php and I think also in AttributeController.php. So the escaping/controlling is needed in all of them.","created_at":"2016-08-22T13:41:01Z","updated_at":"2016-08-22T13:41:01Z","html_url":"https://github.com/MISP/MISP/pull/1455#discussion_r75678706","pull_request_url":"https://api.github.com/repos/MISP/MISP/pulls/1455","_links":{"self":{"href":"https://api.github.com/repos/MISP/MISP/pulls/comments/75678706"},"html":{"href":"https://github.com/MISP/MISP/pull/1455#discussion_r75678706"},"pull_request":{"href":"https://api.github.com/repos/MISP/MISP/pulls/1455"}}},"pull_request":{"url":"https://api.github.com/repos/MISP/MISP/pulls/1455","id":81991952,"html_url":"https://github.com/MISP/MISP/pull/1455","diff_url":"https://github.com/MISP/MISP/pull/1455.diff","patch_url":"https://github.com/MISP/MISP/pull/1455.patch","issue_url":"https://api.github.com/repos/MISP/MISP/issues/1455","number":1455,"state":"open","locked":false,"title":"Bro export","user":{"login":"ppanero","id":6756943,"avatar_url":"https://avatars.githubusercontent.com/u/6756943?v=3","gravatar_id":"","url":"https://api.github.com/users/ppanero","html_url":"https://github.com/ppanero","followers_url":"https://api.github.com/users/ppanero/followers","following_url":"https://api.github.com/users/ppanero/following{/other_user}","gists_url":"https://api.github.com/users/ppanero/gists{/gist_id}","starred_url":"https://api.github.com/users/ppanero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppanero/subscriptions","organizations_url":"https://api.github.com/users/ppanero/orgs","repos_url":"https://api.github.com/users/ppanero/repos","events_url":"https://api.github.com/users/ppanero/events{/privacy}","received_events_url":"https://api.github.com/users/ppanero/received_events","type":"User","site_admin":false},"body":"#### What does it do?\r\n\r\nMISP Bro Export implemented in MISPs PHP API. Login is in the Model/ and handlers in Controller/\r\n\r\n#### Questions\r\n\r\n- [ ] Does it require a DB change?\r\n- [ ] Are you using it in production?\r\n- [ ] Does it require a change in the API (PyMISP for example)?\r\n\r\n#### Release Type:\r\n- [ ] Major\r\n- [X] Minor\r\n- [] Patch\r\n","created_at":"2016-08-19T14:40:38Z","updated_at":"2016-08-22T13:41:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MISP/MISP/pulls/1455/commits","review_comments_url":"https://api.github.com/repos/MISP/MISP/pulls/1455/comments","review_comment_url":"https://api.github.com/repos/MISP/MISP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MISP/MISP/issues/1455/comments","statuses_url":"https://api.github.com/repos/MISP/MISP/statuses/bc6b2d1ba8ab1d4df33e181d4c5e6dd41be56347","head":{"label":"ppanero:bro_export","ref":"bro_export","sha":"bc6b2d1ba8ab1d4df33e181d4c5e6dd41be56347","user":{"login":"ppanero","id":6756943,"avatar_url":"https://avatars.githubusercontent.com/u/6756943?v=3","gravatar_id":"","url":"https://api.github.com/users/ppanero","html_url":"https://github.com/ppanero","followers_url":"https://api.github.com/users/ppanero/followers","following_url":"https://api.github.com/users/ppanero/following{/other_user}","gists_url":"https://api.github.com/users/ppanero/gists{/gist_id}","starred_url":"https://api.github.com/users/ppanero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppanero/subscriptions","organizations_url":"https://api.github.com/users/ppanero/orgs","repos_url":"https://api.github.com/users/ppanero/repos","events_url":"https://api.github.com/users/ppanero/events{/privacy}","received_events_url":"https://api.github.com/users/ppanero/received_events","type":"User","site_admin":false},"repo":{"id":63950352,"name":"MISP","full_name":"ppanero/MISP","owner":{"login":"ppanero","id":6756943,"avatar_url":"https://avatars.githubusercontent.com/u/6756943?v=3","gravatar_id":"","url":"https://api.github.com/users/ppanero","html_url":"https://github.com/ppanero","followers_url":"https://api.github.com/users/ppanero/followers","following_url":"https://api.github.com/users/ppanero/following{/other_user}","gists_url":"https://api.github.com/users/ppanero/gists{/gist_id}","starred_url":"https://api.github.com/users/ppanero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppanero/subscriptions","organizations_url":"https://api.github.com/users/ppanero/orgs","repos_url":"https://api.github.com/users/ppanero/repos","events_url":"https://api.github.com/users/ppanero/events{/privacy}","received_events_url":"https://api.github.com/users/ppanero/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ppanero/MISP","description":"MISP - Malware Information Sharing Platform & Threat Sharing","fork":true,"url":"https://api.github.com/repos/ppanero/MISP","forks_url":"https://api.github.com/repos/ppanero/MISP/forks","keys_url":"https://api.github.com/repos/ppanero/MISP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ppanero/MISP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ppanero/MISP/teams","hooks_url":"https://api.github.com/repos/ppanero/MISP/hooks","issue_events_url":"https://api.github.com/repos/ppanero/MISP/issues/events{/number}","events_url":"https://api.github.com/repos/ppanero/MISP/events","assignees_url":"https://api.github.com/repos/ppanero/MISP/assignees{/user}","branches_url":"https://api.github.com/repos/ppanero/MISP/branches{/branch}","tags_url":"https://api.github.com/repos/ppanero/MISP/tags","blobs_url":"https://api.github.com/repos/ppanero/MISP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ppanero/MISP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ppanero/MISP/git/refs{/sha}","trees_url":"https://api.github.com/repos/ppanero/MISP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ppanero/MISP/statuses/{sha}","languages_url":"https://api.github.com/repos/ppanero/MISP/languages","stargazers_url":"https://api.github.com/repos/ppanero/MISP/stargazers","contributors_url":"https://api.github.com/repos/ppanero/MISP/contributors","subscribers_url":"https://api.github.com/repos/ppanero/MISP/subscribers","subscription_url":"https://api.github.com/repos/ppanero/MISP/subscription","commits_url":"https://api.github.com/repos/ppanero/MISP/commits{/sha}","git_commits_url":"https://api.github.com/repos/ppanero/MISP/git/commits{/sha}","comments_url":"https://api.github.com/repos/ppanero/MISP/comments{/number}","issue_comment_url":"https://api.github.com/repos/ppanero/MISP/issues/comments{/number}","contents_url":"https://api.github.com/repos/ppanero/MISP/contents/{+path}","compare_url":"https://api.github.com/repos/ppanero/MISP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ppanero/MISP/merges","archive_url":"https://api.github.com/repos/ppanero/MISP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ppanero/MISP/downloads","issues_url":"https://api.github.com/repos/ppanero/MISP/issues{/number}","pulls_url":"https://api.github.com/repos/ppanero/MISP/pulls{/number}","milestones_url":"https://api.github.com/repos/ppanero/MISP/milestones{/number}","notifications_url":"https://api.github.com/repos/ppanero/MISP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ppanero/MISP/labels{/name}","releases_url":"https://api.github.com/repos/ppanero/MISP/releases{/id}","deployments_url":"https://api.github.com/repos/ppanero/MISP/deployments","created_at":"2016-07-22T12:05:44Z","updated_at":"2016-07-22T12:05:46Z","pushed_at":"2016-08-22T09:42:48Z","git_url":"git://github.com/ppanero/MISP.git","ssh_url":"git@github.com:ppanero/MISP.git","clone_url":"https://github.com/ppanero/MISP.git","svn_url":"https://github.com/ppanero/MISP","homepage":"","size":31783,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.4"}},"base":{"label":"MISP:2.4","ref":"2.4","sha":"5ae656800e9f691bdfaa5c4aad1adaa2cc6c56be","user":{"login":"MISP","id":4134875,"avatar_url":"https://avatars.githubusercontent.com/u/4134875?v=3","gravatar_id":"","url":"https://api.github.com/users/MISP","html_url":"https://github.com/MISP","followers_url":"https://api.github.com/users/MISP/followers","following_url":"https://api.github.com/users/MISP/following{/other_user}","gists_url":"https://api.github.com/users/MISP/gists{/gist_id}","starred_url":"https://api.github.com/users/MISP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MISP/subscriptions","organizations_url":"https://api.github.com/users/MISP/orgs","repos_url":"https://api.github.com/users/MISP/repos","events_url":"https://api.github.com/users/MISP/events{/privacy}","received_events_url":"https://api.github.com/users/MISP/received_events","type":"Organization","site_admin":false},"repo":{"id":8077402,"name":"MISP","full_name":"MISP/MISP","owner":{"login":"MISP","id":4134875,"avatar_url":"https://avatars.githubusercontent.com/u/4134875?v=3","gravatar_id":"","url":"https://api.github.com/users/MISP","html_url":"https://github.com/MISP","followers_url":"https://api.github.com/users/MISP/followers","following_url":"https://api.github.com/users/MISP/following{/other_user}","gists_url":"https://api.github.com/users/MISP/gists{/gist_id}","starred_url":"https://api.github.com/users/MISP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MISP/subscriptions","organizations_url":"https://api.github.com/users/MISP/orgs","repos_url":"https://api.github.com/users/MISP/repos","events_url":"https://api.github.com/users/MISP/events{/privacy}","received_events_url":"https://api.github.com/users/MISP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MISP/MISP","description":"MISP - Malware Information Sharing Platform & Threat Sharing","fork":false,"url":"https://api.github.com/repos/MISP/MISP","forks_url":"https://api.github.com/repos/MISP/MISP/forks","keys_url":"https://api.github.com/repos/MISP/MISP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MISP/MISP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MISP/MISP/teams","hooks_url":"https://api.github.com/repos/MISP/MISP/hooks","issue_events_url":"https://api.github.com/repos/MISP/MISP/issues/events{/number}","events_url":"https://api.github.com/repos/MISP/MISP/events","assignees_url":"https://api.github.com/repos/MISP/MISP/assignees{/user}","branches_url":"https://api.github.com/repos/MISP/MISP/branches{/branch}","tags_url":"https://api.github.com/repos/MISP/MISP/tags","blobs_url":"https://api.github.com/repos/MISP/MISP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MISP/MISP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MISP/MISP/git/refs{/sha}","trees_url":"https://api.github.com/repos/MISP/MISP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MISP/MISP/statuses/{sha}","languages_url":"https://api.github.com/repos/MISP/MISP/languages","stargazers_url":"https://api.github.com/repos/MISP/MISP/stargazers","contributors_url":"https://api.github.com/repos/MISP/MISP/contributors","subscribers_url":"https://api.github.com/repos/MISP/MISP/subscribers","subscription_url":"https://api.github.com/repos/MISP/MISP/subscription","commits_url":"https://api.github.com/repos/MISP/MISP/commits{/sha}","git_commits_url":"https://api.github.com/repos/MISP/MISP/git/commits{/sha}","comments_url":"https://api.github.com/repos/MISP/MISP/comments{/number}","issue_comment_url":"https://api.github.com/repos/MISP/MISP/issues/comments{/number}","contents_url":"https://api.github.com/repos/MISP/MISP/contents/{+path}","compare_url":"https://api.github.com/repos/MISP/MISP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MISP/MISP/merges","archive_url":"https://api.github.com/repos/MISP/MISP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MISP/MISP/downloads","issues_url":"https://api.github.com/repos/MISP/MISP/issues{/number}","pulls_url":"https://api.github.com/repos/MISP/MISP/pulls{/number}","milestones_url":"https://api.github.com/repos/MISP/MISP/milestones{/number}","notifications_url":"https://api.github.com/repos/MISP/MISP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MISP/MISP/labels{/name}","releases_url":"https://api.github.com/repos/MISP/MISP/releases{/id}","deployments_url":"https://api.github.com/repos/MISP/MISP/deployments","created_at":"2013-02-07T17:10:34Z","updated_at":"2016-08-22T08:26:23Z","pushed_at":"2016-08-22T09:42:48Z","git_url":"git://github.com/MISP/MISP.git","ssh_url":"git@github.com:MISP/MISP.git","clone_url":"https://github.com/MISP/MISP.git","svn_url":"https://github.com/MISP/MISP","homepage":"","size":35778,"stargazers_count":703,"watchers_count":703,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":182,"mirror_url":null,"open_issues_count":397,"forks":182,"open_issues":397,"watchers":703,"default_branch":"2.4"}},"_links":{"self":{"href":"https://api.github.com/repos/MISP/MISP/pulls/1455"},"html":{"href":"https://github.com/MISP/MISP/pull/1455"},"issue":{"href":"https://api.github.com/repos/MISP/MISP/issues/1455"},"comments":{"href":"https://api.github.com/repos/MISP/MISP/issues/1455/comments"},"review_comments":{"href":"https://api.github.com/repos/MISP/MISP/pulls/1455/comments"},"review_comment":{"href":"https://api.github.com/repos/MISP/MISP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MISP/MISP/pulls/1455/commits"},"statuses":{"href":"https://api.github.com/repos/MISP/MISP/statuses/bc6b2d1ba8ab1d4df33e181d4c5e6dd41be56347"}}}}
{"actor":{"display_login":"ppanero"}}