Permalink
Browse files

Little helper search scripts

  • Loading branch information...
1 parent 75378e7 commit d6cfe46f1aac99410dd56b9e6f6e30c261a777cf decoder committed Apr 2, 2012
Showing with 231 additions and 0 deletions.
  1. +56 −0 ionmonkey.py
  2. +57 −0 langfuzz.py
  3. +56 −0 marked.py
  4. +62 −0 secbugfixed.py
View
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# The Original Code is ADBFuzz.
+#
+# The Initial Developer of the Original Code is Christian Holler (decoder).
+#
+# Contributors:
+# Christian Holler <decoder@mozilla.com> (Original Developer)
+#
+# ***** END LICENSE BLOCK *****
+
+import sys
+import os
+
+from bugzilla.agents import BMOAgent
+from bugzilla.utils import get_credentials
+
+# We can use "None" for both instead to not authenticate
+username, password = get_credentials()
+
+# Load our agent for BMO
+bmo = BMOAgent(username, password)
+
+# Search for all open IonMonkey fuzz bugs
+options = {
+ 'resolution': '---',
+ 'query_format': 'advanced',
+ 'field0-0-0': 'blocked',
+ 'type0-0-0': 'equals',
+ 'value0-0-0': '724444',
+ 'include_fields': '_default',
+}
+
+# Get the bugs from the api
+buglist = bmo.get_bug_list(options)
+
+print "Found %s bugs" % (len(buglist))
+
+# Basic arguments
+cmd = ['python', os.path.join(sys.path[0], 'bugmon.py'), '-r', os.path.join(sys.path[0], 'repos/'), "-C", "-G" ]
+
+# Propagate all extra arguments
+cmd.extend(sys.argv[1:])
+
+# Append bug numbers
+for bug in buglist:
+ cmd.append(str(bug.id))
+
+# Print command
+print " ".join(cmd)
View
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# The Original Code is ADBFuzz.
+#
+# The Initial Developer of the Original Code is Christian Holler (decoder).
+#
+# Contributors:
+# Christian Holler <decoder@mozilla.com> (Original Developer)
+#
+# ***** END LICENSE BLOCK *****
+
+import sys
+import os
+
+from bugzilla.agents import BMOAgent
+from bugzilla.utils import get_credentials
+
+# We can use "None" for both instead to not authenticate
+username, password = get_credentials()
+
+# Load our agent for BMO
+bmo = BMOAgent(username, password)
+
+# Search for all open IonMonkey fuzz bugs
+options = {
+ 'resolution': '---',
+ 'status': 'NEW',
+ 'query_format': 'advanced',
+ 'field0-0-0': 'blocked',
+ 'type0-0-0': 'equals',
+ 'value0-0-0': '676763',
+ 'include_fields': '_default',
+}
+
+# Get the bugs from the api
+buglist = bmo.get_bug_list(options)
+
+print "Found %s bugs" % (len(buglist))
+
+# Basic arguments
+cmd = ['python', os.path.join(sys.path[0], 'bugmon.py'), '-r', os.path.join(sys.path[0], 'repos/'), "-C", "-G" ]
+
+# Propagate all extra arguments
+cmd.extend(sys.argv[1:])
+
+# Append bug numbers
+for bug in buglist:
+ cmd.append(str(bug.id))
+
+# Print command
+print " ".join(cmd)
View
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# The Original Code is ADBFuzz.
+#
+# The Initial Developer of the Original Code is Christian Holler (decoder).
+#
+# Contributors:
+# Christian Holler <decoder@mozilla.com> (Original Developer)
+#
+# ***** END LICENSE BLOCK *****
+
+import sys
+import os
+
+from bugzilla.agents import BMOAgent
+from bugzilla.utils import get_credentials
+
+# We can use "None" for both instead to not authenticate
+username, password = get_credentials()
+
+# Load our agent for BMO
+bmo = BMOAgent(username, password)
+
+# Search for all open IonMonkey fuzz bugs
+options = {
+ 'resolution': '---',
+ 'query_format': 'advanced',
+ 'field0-0-0': 'status_whiteboard',
+ 'type0-0-0': 'substring',
+ 'value0-0-0': '[jsbugmon:',
+ 'include_fields': '_default',
+}
+
+# Get the bugs from the api
+buglist = bmo.get_bug_list(options)
+
+print "Found %s bugs" % (len(buglist))
+
+# Basic arguments
+cmd = ['python', os.path.join(sys.path[0], 'bugmon.py'), '-r', os.path.join(sys.path[0], 'repos/'), "-C", "-G" ]
+
+# Propagate all extra arguments
+cmd.extend(sys.argv[1:])
+
+# Append bug numbers
+for bug in buglist:
+ cmd.append(str(bug.id))
+
+# Print command
+print " ".join(cmd)
View
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# The Original Code is ADBFuzz.
+#
+# The Initial Developer of the Original Code is Christian Holler (decoder).
+#
+# Contributors:
+# Christian Holler <decoder@mozilla.com> (Original Developer)
+#
+# ***** END LICENSE BLOCK *****
+
+import sys
+import os
+
+from bugzilla.agents import BMOAgent
+from bugzilla.utils import get_credentials
+
+# We can use "None" for both instead to not authenticate
+username, password = get_credentials()
+
+# Load our agent for BMO
+bmo = BMOAgent(username, password)
+
+# Search for all fixed JS engine bugs that have a security impact
+options = {
+ 'component': 'JavaScript Engine',
+ 'product': 'Core',
+ 'bug_status': 'RESOLVED',
+ 'resolution': 'FIXED',
+ 'query_format': 'advanced',
+ 'field0-0-0': 'bug_group',
+ 'type0-0-0': 'substring',
+ 'value0-0-0': 'core-security',
+ 'type0-0-1': 'regexp',
+ 'field0-0-1': 'status_whiteboard',
+ 'value0-0-1': '\[sg:(critical|high|moderate|low)',
+ 'include_fields': '_default',
+}
+
+# Get the bugs from the api
+buglist = bmo.get_bug_list(options)
+
+print "Found %s bugs" % (len(buglist))
+
+# Basic arguments
+cmd = ['python', os.path.join(sys.path[0], 'bugmon.py'), '-r', os.path.join(sys.path[0], 'repos/'), "-V", "-G" ]
+
+# Propagate all extra arguments
+cmd.extend(sys.argv[1:])
+
+# Append bug numbers
+for bug in buglist:
+ cmd.append(str(bug.id))
+
+# Print command
+print " ".join(cmd)

0 comments on commit d6cfe46

Please sign in to comment.