Permalink
Browse files

add support for npm and bower so folks can use the payload data progr…

…amatically
  • Loading branch information...
jimmyhchan committed Mar 28, 2014
1 parent 835a948 commit e0f37b5933a864cf4c9ece4a1bc9c8bd5b6c1b12
Showing with 93 additions and 8 deletions.
  1. +9 −0 bower.json
  2. +16 −2 categories.js
  3. +18 −3 items.js
  4. +11 −0 lib/index.js
  5. +22 −0 package.json
  6. +17 −3 payloads.js
View
@@ -0,0 +1,9 @@
+{
+ "name": "h5sc",
+ "version": "0.0.0",
+ "main": [
+ "items.js",
+ "payloads.js",
+ "categories.js"
+ ]
+}
View
@@ -1,6 +1,19 @@
/* Categories - the available categories */
-var categories =
-{
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define([], factory);
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals (root is window)
+ root.categories = factory();
+ }
+}(this, function () {
+return {
'html5' : {
'en' : 'Vectors making use of HTML5 features',
'ja' : 'HTML5\u306e\u6a5f\u80fd\u3092\u4f7f\u3063\u305f\u624b\u6cd5',
@@ -119,3 +132,4 @@ var categories =
'zh' : 'Clickjacking和UI Redressing的向量'
}
}
+}));
View
@@ -1,6 +1,20 @@
/* Items - the set of available items and vectors */
-var items =
-[
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define([], factory);
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals (root is window)
+ root.items = factory();
+ }
+}(this, function () {
+return [
{ /* ID 1 - XSS via formaction - requiring user interaction (1) */
'id' : 1,
'category' : 'html5',
@@ -4857,4 +4871,5 @@ var items =
'tags' : ['html5', 'svg', 'from', 'inline', 'xss', 'passive'],
'reporter' : '.mario'
}
-]
+]
+}));
View
@@ -0,0 +1,11 @@
+var items = require('../items'),
+ payloads = require('../payload'),
+ categories = require('../categories');
+
+var h5sc = {};
+
+h5sc.items = items;
+h5sc.payloads = payloads;
+h5sc.categories = categories;
+
+module.exports = h5sc;
View
@@ -0,0 +1,22 @@
+{
+ "name": "H5SC",
+ "version": "0.0.0",
+ "description": "HTML5 Security Cheatsheet",
+ "main": "lib/index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:cure53/H5SC.git"
+ },
+ "keywords": [
+ "security"
+ ],
+ "author": "cure53",
+ "license": "Mozilla Public License, version 2.0",
+ "bugs": {
+ "url": "https://github.com/cure53/H5SC/issues"
+ },
+ "homepage": "https://github.com/cure53/H5SC"
+}
View
@@ -1,6 +1,19 @@
/* Payload - the generic payload templates */
-var payloads =
-{
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define([], factory);
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals (root is window)
+ root.payloads = factory();
+ }
+}(this, function () {
+return {
'js_uri_alert' : 'javascript:alert(1)',
'js_uri_alert_2' : 'javascript:alert(2)',
'js_uri_alert_3' : 'javascript:alert(3)',
@@ -33,4 +46,5 @@ var payloads =
'swf_path' : 'test.swf',
'jar_path' : 'test.jar',
'event_path' : 'event.php'
-}
+}
+}));

0 comments on commit e0f37b5

Please sign in to comment.