Skip to content

Instantly share code, notes, and snippets.

@limhoff-r7
Created January 14, 2014 22:12
Show Gist options
  • Save limhoff-r7/8426903 to your computer and use it in GitHub Desktop.
Save limhoff-r7/8426903 to your computer and use it in GitHub Desktop.
Combinations of architecture and platform for all non-generic payloads (generic payloads support all combinations, so they need to be excluded)
SELECT COUNT(module_classes.full_name),
architectures.abbreviation,
platforms.fully_qualified_name
FROM module_instances
INNER JOIN module_classes
ON module_classes.id = module_instances.module_class_id
INNER JOIN module_architectures
ON module_architectures.module_instance_id = module_instances.id
INNER JOIN architectures
ON architectures.id = module_architectures.architecture_id
INNER JOIN module_platforms
ON module_platforms.module_instance_id = module_instances.id
INNER JOIN platforms
ON platforms.id = module_platforms.platform_id
WHERE module_classes.module_type = 'payload' AND
module_classes.full_name NOT ILIKE '%/generic/%'
GROUP BY architectures.abbreviation,
platforms.fully_qualified_name
ORDER BY architectures.abbreviation,
platforms.fully_qualified_name
count abbreviation fully_qualified_name
6 armle Linux
7 armle OSX
3 cbea Linux
3 cbea64 Linux
1 cmd Python
27 cmd UNIX
8 cmd Windows
2 dalvik Android
7 java Java
2 java Linux
2 java OSX
2 java Solaris
2 java UNIX
2 java Windows
1 mipsbe Linux
2 mipsle Linux
13 php PHP
4 ppc AIX
3 ppc Linux
5 ppc OSX
3 ppc64 Linux
2 python Python
4 ruby Ruby
2 sparc BSD
3 sparc Solaris
1 tty UNIX
14 x86 BSD
5 x86 BSDi
26 x86 Linux
1 x86 Netware
12 x86 OSX
3 x86 Solaris
116 x86 Windows
6 x86_64 Linux
7 x86_64 OSX
13 x86_64 Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment