├── features
└── test.txt
├── old hack 2
├── updates.json
├── survivIoAimChromeExtension
│ ├── images
│ │ ├── goal128.png
│ │ ├── goal16.png
│ │ ├── goal32.png
│ │ └── goal48.png
│ ├── smokeAlphaManager.js
│ ├── autoOpeningDoors.js
│ ├── bigMapManager.js
│ ├── manifest.json
│ ├── gernadeTimer.js
│ ├── zoomRadiusManager.js
│ ├── autoHeal.js
│ ├── autoLoot.js
│ ├── laserPointer.js
│ ├── autoAim.js
│ ├── init.js
│ ├── menu.js
│ └── background.js
├── survivIoAimChromeExtensionManager
│ ├── images
│ │ ├── goal128.png
│ │ ├── goal16.png
│ │ ├── goal32.png
│ │ └── goal48.png
│ ├── manifest.json
│ └── background.js
├── fileList.json
├── README.md
└── LICENSE
├── crab.png
├── finish2.png
├── screenshot.png
├── resource-override.png
├── old hack 1
├── ChromeExtension
│ ├── images
│ │ ├── goal128.png
│ │ ├── goal16.png
│ │ ├── goal32.png
│ │ ├── goal48.png
│ │ ├── heal.svg
│ │ └── reload.svg
│ ├── manifest.json
│ └── background.js
├── update
│ ├── update-linux.sh
│ ├── update-mac.sh
│ └── update-windows.ps1
├── CONTRIBUTING.md
├── README.md
└── LICENSE
└── README.md
/features/test.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/old hack 2/updates.json:
--------------------------------------------------------------------------------
1 | {"version": "1.0.41"}
--------------------------------------------------------------------------------
/crab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/crab.png
--------------------------------------------------------------------------------
/finish2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/finish2.png
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/screenshot.png
--------------------------------------------------------------------------------
/resource-override.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/resource-override.png
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/images/goal128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 1/ChromeExtension/images/goal128.png
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/images/goal16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 1/ChromeExtension/images/goal16.png
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/images/goal32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 1/ChromeExtension/images/goal32.png
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/images/goal48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 1/ChromeExtension/images/goal48.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/images/goal128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtension/images/goal128.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/images/goal16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtension/images/goal16.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/images/goal32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtension/images/goal32.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/images/goal48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtension/images/goal48.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtensionManager/images/goal128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtensionManager/images/goal128.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtensionManager/images/goal16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtensionManager/images/goal16.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtensionManager/images/goal32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtensionManager/images/goal32.png
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtensionManager/images/goal48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/u1qqlv/SURVIV.IO-PRO-HACK/HEAD/old hack 2/survivIoAimChromeExtensionManager/images/goal48.png
--------------------------------------------------------------------------------
/old hack 1/update/update-linux.sh:
--------------------------------------------------------------------------------
1 | echo Updating
2 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
3 | wget -O $DIR/../ChromeExtension/init.js https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/init.js
4 | wget -O $DIR/../ChromeExtension/background.js https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/background.js
5 | wget -O $DIR/../ChromeExtension/manifest.json https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/manifest.json
6 |
--------------------------------------------------------------------------------
/old hack 1/update/update-mac.sh:
--------------------------------------------------------------------------------
1 | echo Updating
2 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
3 | curl -o $DIR/../ChromeExtension/init.js https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/init.js
4 | curl -o $DIR/../ChromeExtension/background.js https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/background.js
5 | curl -o $DIR/../ChromeExtension/manifest.json https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/manifest.json
6 |
--------------------------------------------------------------------------------
/old hack 1/update/update-windows.ps1:
--------------------------------------------------------------------------------
1 | new-item cache -ItemType directory
2 | Invoke-WebRequest https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/init.js -OutFile cache\init.js
3 | Invoke-WebRequest https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/background.js -OutFile cache\background.js
4 | Invoke-WebRequest https://raw.githubusercontent.com/ALiangLiang/SurvivHacks/master/ChromeExtension/manifest.json -OutFile cache\manifest.json
5 | robocopy cache ..\ChromeExtension /mov
6 | Remove-Item .\cache -Force -Recurse
7 |
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/smokeAlphaManager.js:
--------------------------------------------------------------------------------
1 | window.smokeAlphaManager = function(game, smokeAlpha) {
2 |
3 | var binded = false;
4 |
5 | var bind = function(opt) {
6 | smokeAlpha.scope = opt.smokeAlpha;
7 | binded = true;
8 | }
9 |
10 | var unbind = function() {
11 | smokeAlpha.scope = 1;
12 | binded = false;
13 | }
14 |
15 | var isBinded = function() {
16 | return binded;
17 | }
18 |
19 | var setSmokeAlpha = function(alpha) {
20 | smokeAlpha.scope = alpha;
21 | }
22 |
23 | return {
24 | bind: bind,
25 | unbind: unbind,
26 | isBinded: isBinded,
27 |
28 | setSmokeAlpha: setSmokeAlpha
29 | }
30 | }
--------------------------------------------------------------------------------
/old hack 1/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Guide
2 | It is really important that you know how to navigate a file system and how to code in JavaScript. If not, it will be very difficult for you to contribute.
3 | ## How Do I fix the hack after an update?
4 |
5 | 1. Fork the Reopsitory
6 | 2. Clone your fork to your computer
7 | 4. Open the hack in the IDE of your choice. Note that Notepad and TextEdit are **not** IDEs
8 | 5. Find the text ```Exports```. It should be around line 820
9 | https://docs.google.com/document/d/1idtE-KksJlafgGp97jggGjSGZmRAGgVEYAATAugfE2g/edit
10 | (ill add more to this. for now read this ^)
11 |
12 | UPDATE: This method is not relevant any more becuase it is outdated.
13 |
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtensionManager/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SurvivIoAim",
3 | "version": "1.0",
4 | "description": "survivIoAim chrome extension with autoupdate",
5 | "homepage_url": "https://github.com/w3x731/survivIoAim/",
6 | "manifest_version": 2,
7 | "permissions": [
8 | "tabs",
9 | "storage",
10 | "*://*/*",
11 | "declarativeContent",
12 | "webRequest",
13 | "webRequestBlocking"
14 | ],
15 |
16 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
17 |
18 | "background": {
19 | "scripts": [
20 | "background.js"
21 | ],
22 | "persistent": true
23 | },
24 | "page_action": {
25 | "default_icon": {
26 | "16": "images/goal16.png",
27 | "32": "images/goal32.png",
28 | "48": "images/goal48.png",
29 | "128": "images/goal128.png"
30 | }
31 | },
32 | "icons": {
33 | "16": "images/goal16.png",
34 | "32": "images/goal32.png",
35 | "48": "images/goal48.png",
36 | "128": "images/goal128.png"
37 | }
38 | }
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/autoOpeningDoors.js:
--------------------------------------------------------------------------------
1 | window.autoOpeningDoors = function(game, emitActionCb, interactionEmitter) {
2 |
3 | var binded = false;
4 |
5 | var pressF = function() {
6 | if(!game.scope.be.keys["70"]) {
7 | setTimeout(function() {
8 | game.scope.be.keys["70"] = true;
9 | setTimeout(function() {
10 | delete game.scope.be.keys["70"]
11 | }, 50);
12 | }, 50);
13 | }
14 | };
15 |
16 | var interactionTypes = {
17 | Obstacle: 2,
18 | Loot: 3
19 | };
20 |
21 | var bind = function() {
22 | emitActionCb.scope = function() {
23 | if(interactionEmitter.scope) {
24 | switch(interactionEmitter.scope.__type) {
25 | case interactionTypes.Obstacle:
26 | if( interactionEmitter.scope.hasOwnProperty('door') &&
27 | !interactionEmitter.scope.door.open) {
28 | pressF();
29 | }
30 | break;
31 | }
32 | }
33 | };
34 | binded = true;
35 | };
36 |
37 | var unbind = function() {
38 | emitActionCb.scope = function() {};
39 | binded = false;
40 | };
41 |
42 | var isBinded = function() {
43 | return binded;
44 | }
45 |
46 | return {
47 | bind: bind,
48 | unbind: unbind,
49 | isBinded: isBinded
50 | }
51 | }
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Surviv.io-Cheats",
3 | "version": "1.1.10",
4 | "author": "https://github.com/zbot473/SurvivHacks",
5 | "description": "Surviv.io Cheats Chrome Extension maintained by ALiangLiang",
6 | "manifest_version": 2,
7 | "permissions": [
8 | "tabs",
9 | "storage",
10 | "*://*/*",
11 | "declarativeContent",
12 | "webRequest",
13 | "webRequestBlocking"
14 | ],
15 |
16 | "externally_connectable": {
17 | "matches": [
18 | "*://*.surviv.io/",
19 | "*://*.surviv2.io/",
20 | "*://*.2dbattleroyale.com/",
21 | "*://*.2dbattleroyale.com/"
22 | ]
23 | },
24 |
25 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
26 |
27 | "background": {
28 | "scripts": [
29 | "init.js",
30 | "background.js"
31 | ],
32 | "persistent": true
33 | },
34 | "page_action": {
35 | "default_icon": {
36 | "16": "images/goal16.png",
37 | "32": "images/goal32.png",
38 | "48": "images/goal48.png",
39 | "128": "images/goal128.png"
40 | }
41 | },
42 | "icons": {
43 | "16": "images/goal16.png",
44 | "32": "images/goal32.png",
45 | "48": "images/goal48.png",
46 | "128": "images/goal128.png"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/bigMapManager.js:
--------------------------------------------------------------------------------
1 | window.bigMapManager = function(game) {
2 |
3 | var binded = false;
4 |
5 | var options = {
6 | bigMapTransparency: 0.9
7 | }
8 |
9 | var qKeyListener = {
10 | keyup: function(event) {
11 | if(event.which == 81) {
12 | game.scope.Ye.displayMapLarge(game.scope.Ye.bigmapDisplayed);
13 | game.scope.Ye.container.alpha = options.bigMapTransparency;
14 | }
15 | }
16 | }
17 |
18 | var addQKeyListener = function() {
19 | window.addEventListener("keyup", qKeyListener.keyup);
20 | }
21 |
22 | var removeQKeyListener = function() {
23 | window.removeEventListener("keyup", qKeyListener.keyup);
24 | }
25 |
26 | var bind = function(opt) {
27 | options.bigMapTransparency = opt.bigMapTransparency;
28 |
29 | removeQKeyListener();
30 | addQKeyListener();
31 |
32 | binded = true;
33 | }
34 |
35 | var unbind = function() {
36 | removeQKeyListener();
37 |
38 | binded = false;
39 | }
40 |
41 | var isBinded = function() {
42 | return binded;
43 | }
44 |
45 | var setBigMapTransparency = function(alpha) {
46 | options.bigMapTransparency = alpha;
47 | }
48 |
49 | return {
50 | bind: bind,
51 | unbind: unbind,
52 | isBinded: isBinded,
53 |
54 | setBigMapTransparency: setBigMapTransparency
55 | }
56 | }
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SurvivIoAim",
3 | "version": "1.0.41",
4 | "description": "survivIoAim chrome extension",
5 | "homepage_url": "https://github.com/w3x731/survivIoAim/",
6 | "manifest_version": 2,
7 | "permissions": [
8 | "tabs",
9 | "storage",
10 | "*://*/*",
11 | "declarativeContent",
12 | "webRequest",
13 | "webRequestBlocking"
14 | ],
15 |
16 | "externally_connectable": {
17 | "matches": [
18 | "*://*.surviv.io/",
19 | "*://*.surviv2.io/",
20 | "*://*.2dbattleroyale.com/",
21 | "*://*.2dbattleroyale.org/"
22 | ]
23 | },
24 |
25 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
26 |
27 | "background": {
28 | "scripts": [
29 | "init.js",
30 | "autoAim.js",
31 | "autoHeal.js",
32 | "autoLoot.js",
33 | "autoOpeningDoors.js",
34 | "bigMapManager.js",
35 | "gernadeTimer.js",
36 | "laserPointer.js",
37 | "zoomRadiusManager.js",
38 | "smokeAlphaManager.js",
39 | "menu.js",
40 | "background.js"
41 | ],
42 | "persistent": true
43 | },
44 | "page_action": {
45 | "default_icon": {
46 | "16": "images/goal16.png",
47 | "32": "images/goal32.png",
48 | "48": "images/goal48.png",
49 | "128": "images/goal128.png"
50 | }
51 | },
52 | "icons": {
53 | "16": "images/goal16.png",
54 | "32": "images/goal32.png",
55 | "48": "images/goal48.png",
56 | "128": "images/goal128.png"
57 | }
58 | }
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/gernadeTimer.js:
--------------------------------------------------------------------------------
1 | window.gernadeTimer = function(game) {
2 |
3 | var binded = false;
4 |
5 | var timerHidden = true;
6 | var duration = 4.2; // sec
7 | var period = 0.1; // sec
8 | var dead = true;
9 |
10 | var updateTimerState = function() {
11 | if( game.scope.mt.curWeapIdx === 3 &&
12 | game.scope.mt.weapType === "frag" &&
13 | !dead) {
14 |
15 | setTimeout(updateTimerState, period);
16 | } else {
17 | freeTimer();
18 | }
19 | }
20 |
21 | var initTimer = function() {
22 | game.scope.Ke.a(function onElapsed() {
23 | freeTimer();
24 | }, duration, "Grenade", true);
25 | dead = false;
26 |
27 | updateTimerState();
28 | }
29 |
30 | var freeTimer = function() {
31 | game.scope.Ke.o(true);
32 | dead = true;
33 | }
34 |
35 | var mouseListener = {
36 | mousedown: function(event) {
37 | if( game.scope.mt.curWeapIdx === 3 &&
38 | game.scope.mt.weapType === "frag" &&
39 | dead &&
40 | event.button === 0) {
41 |
42 | initTimer();
43 | }
44 | },
45 | mouseup: function(event) {
46 | if( event.button === 0 &&
47 | !dead) {
48 |
49 | freeTimer();
50 | }
51 | }
52 | }
53 |
54 | var addMouseListener = function() {
55 | window.addEventListener("mousedown", mouseListener.mousedown);
56 | window.addEventListener("mouseup", mouseListener.mouseup);
57 | }
58 |
59 | var removeMouseListener = function() {
60 | window.removeEventListener("mousedown", mouseListener.mousedown);
61 | window.addEventListener("mouseup", mouseListener.mouseup);
62 | }
63 |
64 | var bind = function(opt) {
65 | addMouseListener();
66 | binded = true;
67 | }
68 |
69 | var unbind = function() {
70 | removeMouseListener();
71 | binded = false;
72 | }
73 |
74 | var isBinded = function() {
75 | return binded;
76 | }
77 |
78 | return {
79 | bind: bind,
80 | unbind: unbind,
81 | isBinded: isBinded
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/old hack 2/fileList.json:
--------------------------------------------------------------------------------
1 | {
2 | "autoAim": {
3 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoAim.js",
4 | "priority": 1
5 | },
6 | "autoLoot": {
7 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoLoot.js",
8 | "priority": 1
9 | },
10 | "autoHeal": {
11 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoHeal.js",
12 | "priority": 1
13 | },
14 | "autoOpeningDoors": {
15 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoOpeningDoors.js",
16 | "priority": 1
17 | },
18 | "background": {
19 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/background.js",
20 | "priority": 0
21 | },
22 | "bigMapManager": {
23 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/bigMapManager.js",
24 | "priority": 1
25 | },
26 | "gernadeTimer": {
27 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/gernadeTimer.js",
28 | "priority": 1
29 | },
30 | "init": {
31 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/init.js",
32 | "priority": 1
33 | },
34 | "gernadeTimer": {
35 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/gernadeTimer.js",
36 | "priority": 1
37 | },
38 | "manifest": {
39 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/manifest.json",
40 | "priority": -1
41 | },
42 | "menu": {
43 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/menu.js",
44 | "priority": 1
45 | },
46 | "smokeAlphaManager": {
47 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/smokeAlphaManager.js",
48 | "priority": 1
49 | },
50 | "zoomRadiusManager": {
51 | "url": "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/zoomRadiusManager.js",
52 | "priority": 1
53 | }
54 | }
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/images/heal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/zoomRadiusManager.js:
--------------------------------------------------------------------------------
1 | window.zoomRadiusManager = function(game, variables) {
2 |
3 | var scopeZoomRadius = variables.scopeZoomRadius;
4 | var defaultZoomRadius = Object.assign({}, scopeZoomRadius);
5 |
6 | var binded = false;
7 |
8 | if(!!!scopeZoomRadius) {
9 | console.log("Cannot init zoom radius manager");
10 | return;
11 | }
12 |
13 | var setZoomRadius = function(radius) {
14 | if(scopeZoomRadius) {
15 | scopeZoomRadius["1xscope"] = radius;
16 | scopeZoomRadius["2xscope"] = radius;
17 | scopeZoomRadius["4xscope"] = radius;
18 | scopeZoomRadius["8xscope"] = radius;
19 | scopeZoomRadius["15xscope"] = radius;
20 | } else {
21 | console.log("Scope zoom and radius not patched");
22 | }
23 | };
24 |
25 | var resetZoomRadius = function() {
26 | if(scopeZoomRadius) {
27 | scopeZoomRadius["1xscope"] = defaultZoomRadius["1xscope"];
28 | scopeZoomRadius["2xscope"] = defaultZoomRadius["2xscope"];
29 | scopeZoomRadius["4xscope"] = defaultZoomRadius["4xscope"];
30 | scopeZoomRadius["8xscope"] = defaultZoomRadius["8xscope"];
31 | scopeZoomRadius["15xscope"] = defaultZoomRadius["15xscope"];
32 | } else {
33 | console.log("Scope zoom and radius not patched");
34 | }
35 | }
36 |
37 | var zoomRadius = 68;
38 |
39 | var defaultBOnMouseWheel = function(e) {};
40 |
41 | var mouseListener = {
42 | wheel: function(e) {
43 | if(e.shiftKey) {
44 | var delta = e.deltaY || e.detail || e.wheelDelta;
45 | zoomRadius += Math.sign(delta) * 10;
46 | if(zoomRadius < 10) zoomRadius = 10;
47 | if(zoomRadius > 1000) zoomRadius = 1000;
48 | setZoomRadius(zoomRadius)
49 | } else {
50 | defaultBOnMouseWheel(e);
51 | }
52 | }
53 | }
54 |
55 | var addMouseListener = function(e) {
56 | window.addEventListener('wheel', mouseListener.wheel);
57 | }
58 |
59 | var removeMouseListener = function(e) {
60 | window.removeEventListener('wheel', mouseListener.wheel);
61 | }
62 |
63 | var bind = function() {
64 | defaultBOnMouseWheel = game.scope.be.bOnMouseWheel;
65 | window.removeEventListener('wheel', game.scope.be.bOnMouseWheel);
66 |
67 | removeMouseListener();
68 | addMouseListener();
69 |
70 | setZoomRadius(zoomRadius);
71 | binded = true;
72 | }
73 |
74 | var unbind = function() {
75 | removeMouseListener();
76 |
77 | window.removeEventListener('wheel', defaultBOnMouseWheel);
78 | window.addEventListener('wheel', defaultBOnMouseWheel);
79 |
80 | resetZoomRadius();
81 | binded = false;
82 | }
83 |
84 | var isBinded = function() {
85 | return binded;
86 | }
87 |
88 | return {
89 | bind: bind,
90 | unbind: unbind,
91 | isBinded: isBinded
92 | }
93 | }
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/autoHeal.js:
--------------------------------------------------------------------------------
1 | window.autoHeal = function(game, variables) {
2 |
3 | var key = variables.key;
4 | var binded = false;
5 | var timer = null;
6 |
7 | var pressKey = function(key) {
8 | if(!game.scope.be.keys[key]) {
9 | setTimeout(function() {
10 | game.scope.be.keys[key] = true;
11 | setTimeout(function() {
12 | delete game.scope.be.keys[key]
13 | }, 90);
14 | }, 0);
15 | }
16 | }
17 |
18 | var isNoEnemy = function() {
19 | if(!game.scope.Pe.St[game.scope.ce]) return false;
20 |
21 | var selfTeamId = game.scope.Pe.St[game.scope.ce].teamId;
22 | var selfId = game.scope.ce;
23 | var playerIds = Object.keys(game.scope.Pe.St);
24 |
25 | for(var i = 0; i < playerIds.length; i++) {
26 | if( game.scope.st.idToObj[playerIds[i]] &&
27 | (!game.scope.st.idToObj[playerIds[i]].N.dead) &&
28 | (!game.scope.st.idToObj[playerIds[i]].N.downed) &&
29 | game.scope.Pe.St[playerIds[i]].teamId != selfTeamId) {
30 |
31 | return false;
32 | }
33 | }
34 |
35 | return true;
36 | }
37 |
38 | var isNoMotion = function() {
39 | if( game.scope.be.keys[key.W] ||
40 | game.scope.be.keys[key.D] ||
41 | game.scope.be.keys[key.S] ||
42 | game.scope.be.keys[key.A]) {
43 |
44 | return false;
45 | }
46 |
47 | return true;
48 | }
49 |
50 | var heal = function() {
51 | if(isNoEnemy() && isNoMotion()) {
52 | if(game.scope.mt.U.health < 30) {
53 | if(game.scope.mt.U.inventory["healthkit"] > 0 ) {
54 | pressKey(key.Eight);
55 | return;
56 | }
57 | }
58 |
59 | if(game.scope.mt.U.health < 70 && game.scope.mt.U.boost < 40) {
60 | if(game.scope.mt.U.inventory["bandage"] > 0 ) {
61 | pressKey(key.Seven);
62 | return;
63 | }
64 | }
65 |
66 | if(game.scope.mt.U.boost < 50) {
67 | if(game.scope.mt.U.inventory["painkiller"] > 0 ) {
68 | pressKey(key.Zero);
69 | return;
70 | }
71 | }
72 |
73 | if(game.scope.mt.U.boost < 75) {
74 | if(game.scope.mt.U.inventory["soda"] > 0 ) {
75 | pressKey(key.Nine);
76 | return;
77 | }
78 | }
79 | }
80 | }
81 |
82 | var runHeal = function() {
83 | heal();
84 | timer = setTimeout(runHeal, 1000);
85 | }
86 |
87 | var stopHeal = function() {
88 | clearTimeout(timer);
89 | timer = null;
90 | }
91 |
92 | var bind = function() {
93 | runHeal();
94 | binded = true;
95 | }
96 |
97 | var unbind = function() {
98 | stopHeal();
99 | binded = false;
100 | }
101 |
102 | var isBinded = function() {
103 | return binded;
104 | }
105 |
106 | return {
107 | bind: bind,
108 | unbind: unbind,
109 | isBinded: isBinded
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/old hack 1/README.md:
--------------------------------------------------------------------------------
1 | 
2 | # Welcome to Surviv.io-Cheats (Working on all modes for client version: 0.6.95 as of January 10, 2019)!
3 | This is a Surviv.io cheat loaded as a Chrome extension. It was originally developed by w3x731 and I've decided to continue the development of the code.
4 |
5 | ### Future of this hack
6 | Just maintain. I have no time on feature updating.
7 |
8 | ### 💪 Features
9 |
10 | * Aimbot
11 | * Aimbot with collision detection [beta]
12 | * Continuous Fire (hold click button)
13 | * Custom zooming control with scroll wheel
14 | * Autoloot
15 | * Transparent buildings, ceilings, obstacles, and trees
16 | * Lasersight (shot range)
17 | * Displays enemy lines
18 | * Frag grenade timer
19 | * Auto opening doors
20 | * Fast weapon changing (right click)
21 | * Auto heal
22 | * FPS Counter
23 | * Planes tracking + visibility of air drop on minimap has been extended (not working)
24 | * AutoDodge [beta]
25 | * AutoSwitch
26 | * Multiboxing [beta] Use the multibox branch
27 | * Triggerbot
28 | * Color explosive barrels in red
29 | * Bigger and more vibrant bullets
30 | * New Default Cursor
31 |
32 |
33 | ### :information_source: Instructions
34 |
35 | - You can shoot on space key.
36 | - Auto loot and auto opening door added.
37 | - Zoom radius regulation by Left shift + Mouse wheel
38 | - Game menu added. Press Z key to enable the cheat and ESC to show menu.
39 | - Fast weapon changing, just click right mouse key.
40 | - Emotes are available after pressing the B key(instead right mouse key).
41 | - If you need to temporary disable auto aim, just hold Left shift key.
42 | - Now the auto aim will aim for enemy, closest to mouse pointer
43 |
44 | ## 🔨 Installation
45 |
46 | 1. Download [this repo as a ZIP file](https://github.com/ALiangLiang/SurvivHacks/archive/master.zip).
47 | 2. Extract the ZIP file you just downloaded.
48 | 3. Go to `chrome://extensions` in your browser. *Make sure you have Developer Mode activated.*
49 | 4. Click "Load Unpacked" and select the subfolder named `ChromeExtension` which is in the extracted (called `Surviv.io-Cheats-master.`)
50 | 5. Open [Surviv.io](http://Surviv.io).
51 | 6. Have fun!
52 |
53 | ## 🔄 Update
54 | Mac/Linux:
55 | 1. Open terminal
56 | 2. Copy this text: ```chmod +x ```
57 | 3. If there isn't a space after the x, add a space.
58 | 4. Drag the update-mac.sh (or update-linux.sh) script into the terminal window, then press enter.
59 | 5. Whenever you get a blue popup saying "New version available," just double click on the .sh file
60 |
61 | Windows:
62 | 1. Whenever you get a blue popup saying "New version available," just double click on the update-windows.ps1 file
63 |
64 | ## :video_game: Discord
65 | https://discord.gg/bpNrDQz
66 |
67 | ## Warning!
68 | All actions you take at your own risk. The author is not responsible for the consequences of your actions.
69 |
70 | Hippity hoppity it's your own responsibility!
71 |
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/images/reload.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Welcome to SURVIV.IO PRO RELOADED HACK!
4 | Are you looking for surviv.io hacks? I can help you!
5 |
6 | This is a custom Surviv.io cheat made from scratch to improve your game score.
7 |
8 |
9 | ## Note: Auto AIM will ignore mouse position, it will shoot to the nearest enemy!
10 | ## Note: This is not a Chrome Extension - read installation instruction!
11 |
12 | ## :gift: Features
13 |
14 | - [x] New Default Cursor
15 | - [x] Continuous Fire (hold click button)
16 | - [x] Transparent buildings, ceilings
17 | - [x] Custom zooming control with scroll wheel
18 | - [x] Display Enemy lines
19 | - [x] Display Required Equipment lines
20 | - [x] More detailed and bigger minimap
21 | - [x] Make smoke smaller
22 | - [x] Aimbot with collision detection
23 | - [x] More vibrant bullets (more colored)
24 | - [x] Make frags and mirvs bigger and recolor in red
25 | - [X] Show enemy name
26 | - [ ] ~~Show enemy LVL (LVL means "Level" - from 0 to 7 (Armor Level + Helmet Level)) + GUN TYPE~~
27 | - [ ] ~~Increase size of specific loot items: guns, scopes and equipment~~
28 | - [ ] ~~Recolor hidden crates in green: barrel crate, stone crate and tree crate~~
29 | - [ ] ~~Keep kill feed forever~~
30 | - [ ] ~~Recolor barrels in red~~
31 | - [ ] ~~Make bushes and trees transparent~~
32 |
33 | ## :information_source: Using hack instruction
34 |
35 | - No menu / You can not change settings
36 | - Zoom radius regulation by Left shift + Mouse wheel
37 | - Emotes are available right click
38 | - The auto aim will aim for closest enemy
39 | - Just hold click mouse button for bumpfire
40 |
41 |
42 | ## :video_camera: Video Demos
43 | Fan Video #1 - https://www.youtube.com/watch?v=5IYZ6akAWhM
44 |
45 |
46 | ## :wrench: Installation instruction (Injection)
47 |
48 | 1. Install "Resource Override" extension for Chrome Browser (search in Google!)
49 | 2. Go to extension page (click extension button)
50 | 3. Add new rule for the hack (Add New -> URL to URL)
51 | 1. Fill "Tab URL:" input with "\*surviv.io\*" website (IMPORTANT! add \* before and after surviv.io)
52 | 2. "From" input with surviv.io current file: "\*surviv.io/js/app.*.js" (IMPORTANT! add \* before URL (maybe this is the last time we need to change URL LOL))
53 | 3. "To" input with our hack JS File URL: "https://rawcdn.githack.com/u1qqlv/SURVIV.IO-PRO-HACK/9200d1260b960b6f96006587e6578e64cc2e9594/default/app.e35f7ad3.js"
54 | 4. Press Switch ON extension button
55 | 
56 | 4. Go to surviv.io website and press CTRL + F5 to force refresh
57 | 5. Have fun!
58 |
59 | ## :bulb: Installation instruction video (Injection)
60 |
61 | Need a video instruction? Here you go!
62 |
63 | https://www.youtube.com/watch?v=VqnDO610Jsc
64 |
65 | ## :angry: Hack not working?!
66 | Make an issue (if it is not already), notify me, but before that,
67 | be sure the links to be the same as above! (look carefully if the links are the same!)
68 |
69 | The cheat is updating regularly so you need to change values too...
70 |
71 | And don't forget to press ctrl + f5 when going to surviv.io website
72 |
73 | ## :rage: Hack Freezing?!
74 | Surviv.io has an anti-cheat system that sometimes makes the game freeze (stop), so I need time to investigate this and fix.
75 |
76 | ## Other Hack:
77 | Guys go check other hack: https://github.com/IceHacks/SurvivCheatInjector
78 |
79 | ## :warning: Warning!
80 | All actions you take at your own risk. The author is not responsible for the consequences of your actions.
81 | Hippity hoppity it's your own responsibility!
82 |
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/autoLoot.js:
--------------------------------------------------------------------------------
1 | window.autoLoot = function(game, variables) {
2 |
3 | var lootBarn = variables.lootBarn;
4 | var bagSizes = variables.bagSizes;
5 | var binded = false;
6 |
7 | if(!!!lootBarn || !!!bagSizes) {
8 | console.log("Cannot init autoloot");
9 | return;
10 | }
11 |
12 | /*
13 | var bagSizes = {
14 | "9mm": [120, 240, 330, 420],
15 | "762mm": [90, 180, 240, 300],
16 | "556mm": [90, 180, 240, 300],
17 | "12gauge": [15, 30, 60, 90],
18 | "50AE": [49, 98, 147, 196],
19 | "308sub": [10, 20, 30, 40],
20 | flare: [2, 4, 6, 8],
21 | frag: [3, 6, 9, 12],
22 | smoke: [3, 6, 9, 12],
23 | bandage: [5, 10, 15, 30],
24 | healthkit: [1, 2, 3, 4],
25 | soda: [2, 5, 10, 15],
26 | painkiller: [1, 2, 3, 4],
27 | }
28 | */
29 |
30 | var pressF = function() {
31 | if(!game.scope.be.keys["70"]) {
32 | setTimeout(function() {
33 | game.scope.be.keys["70"] = true;
34 | setTimeout(function() {
35 | delete game.scope.be.keys["70"]
36 | }, 90);
37 | }, 0);
38 | }
39 | }
40 |
41 | var pickupLoot = function() {
42 | if(game.scope.Ue.vt() && game.scope.Ue.vt().active) {
43 | if( /mm/.test(game.scope.Ue.vt().name) ||
44 | /12gauge/.test(game.scope.Ue.vt().name) ||
45 | /50AE/.test(game.scope.Ue.vt().name) ||
46 | /308sub/.test(game.scope.Ue.vt().name) ||
47 | "flare" === game.scope.Ue.vt().name ||
48 | /bandage/.test(game.scope.Ue.vt().name) ||
49 | /soda/.test(game.scope.Ue.vt().name) ||
50 | /painkiller/.test(game.scope.Ue.vt().name) ||
51 | /smoke/.test(game.scope.Ue.vt().name) ||
52 | /frag/.test(game.scope.Ue.vt().name) ||
53 | /healthkit/.test(game.scope.Ue.vt().name)) {
54 |
55 | var ownBagIndex = !!game.scope.mt.N.backpack ? parseInt(game.scope.mt.N.backpack.slice(-2), 10) : 0;
56 | var bagSize = bagSizes[game.scope.Ue.vt().name][ownBagIndex];
57 |
58 | if(game.scope.mt.U.inventory[game.scope.Ue.vt().name] !== bagSize) {
59 | pressF();
60 | }
61 | return;
62 | }
63 |
64 | if(/scope/.test(game.scope.Ue.vt().name)) {
65 | var scopeLevel = parseInt(game.scope.Ue.vt().name.slice(0, -6), 10);
66 | if(!game.scope.mt.U.inventory[game.scope.Ue.vt().name]) {
67 | pressF();
68 | }
69 | return;
70 | };
71 |
72 | /*
73 | helmet01
74 | chest01
75 | backpack01
76 | */
77 | if( /helmet/.test(game.scope.Ue.vt().name) ||
78 | /chest/.test(game.scope.Ue.vt().name) ||
79 | /backpack/.test(game.scope.Ue.vt().name)) {
80 |
81 | var lootname = game.scope.Ue.vt().name.slice(0, -2);
82 | var lootLevel = parseInt(game.scope.Ue.vt().name.slice(-2), 10);
83 |
84 | if(!game.scope.mt.N[lootname]) {
85 | pressF();
86 | return;
87 | };
88 |
89 | var ownLootLevel = parseInt(game.scope.mt.N[lootname].slice(-2), 10);
90 | if( ownLootLevel < lootLevel) {
91 | pressF();
92 | }
93 | return;
94 | };
95 |
96 | /*
97 | Guns and skins
98 | */
99 | if(game.scope.mt.U.weapons[0].name == "" ||
100 | game.scope.mt.U.weapons[1].name == "") {
101 | pressF();
102 | return;
103 | }
104 | }
105 | }
106 |
107 | var defaultLootBarnUpdateFunction = function(e, t, a) {};
108 | var lootBarnUpdateContext = {};
109 |
110 | var bind = function() {
111 | defaultLootBarnUpdateFunction = lootBarn.prototype.l;
112 | lootBarn.prototype.l = function(e, t, a) {
113 | lootBarnUpdateContext = this;
114 | defaultLootBarnUpdateFunction.call(lootBarnUpdateContext, e, t, a);
115 |
116 | pickupLoot();
117 | }
118 | binded = true;
119 | }
120 |
121 | var unbind = function() {
122 | lootBarn.prototype.l = defaultLootBarnUpdateFunction;
123 | binded = false;
124 | }
125 |
126 | var isBinded = function() {
127 | return binded;
128 | }
129 |
130 | return {
131 | bind: bind,
132 | unbind: unbind,
133 | isBinded: isBinded
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/old hack 2/README.md:
--------------------------------------------------------------------------------
1 | ## How to install
2 | ### Installing Chrome/Chromium extension
3 | 1. [Download](https://github.com/w3x731/survivIoAim/archive/master.zip) this repo and extract it.
4 | 2. Open `chrome://extensions/` in chrome or chromium.
5 | 3. Drag and drop the [survivIoAimChromeExtension](https://github.com/w3x731/survivIoAim/tree/master/survivIoAimChromeExtension) folder or [survivIoAimChromeExtensionManager](https://github.com/w3x731/survivIoAim/tree/master/survivIoAimChromeExtensionManager) folder (no both!!) from the downloaded repo into opened extension window.
6 |
7 | When you start the game, just press `Z` key to enable/disable cheat. Your person must automatically turn to the closest enemy.
8 |
9 | Update: You can shoot on space key.
10 | Update: Auto loot and auto opening door added.
11 | Update: Zoom radius regulation by `Left shift` + `Mouse wheel`
12 | Update: Game menu added. Press `Z` key to enable the cheat and `B` to show menu.
13 | Update: Fast weapon changing, just click right mouse key.
14 | Update: Emotes available on mouse wheel click (instead right mouse key).
15 | Update: If you need to temporary disable auto aim, just hold `Left shift` key.
16 | Update: To throw out the loot, hold `Left shift` and then click right mouse key on loot.
17 | Update: Now the auto aim will aim for enemy, closest to mouse pointer [#19](https://github.com/w3x731/survivIoAim/issues/19).
18 | Update: Extension with autoupdating available! Now you dont need check updates manually. Just install [survivIoAimChromeExtensionManager](https://github.com/w3x731/survivIoAim/tree/master/survivIoAimChromeExtensionManager) instead. No Chrome web store with their 5 dollars.
19 |
20 | All actions you take at your own risk. The author is not responsible for the consequences of your actions.
21 |
22 | Follow me in tox: DD5149809F2320BC81215D2A363A95778D39A0BC260BE7DC90923A933552C765A21E305E722C
23 | https://qtox.github.io/
24 |
25 | Donate: BTC: 3EKypcfMxiSHdL8zGTCq9BBvAxaCtzqV4y
26 | Donate: LTC: MWaRYHWMcQquJ6zHkvwgoiEKPeBHut35Yz
27 | Donate: NMC: N57AAQ4Qy1sYtPDX6DgFujNc3CutgSip82
28 | Donate: NVC: 4FLCK697s3kPCwaPJQF4in1qnGExJeEn6J
29 |
30 | ---
31 | ## Руководство на русском языке
32 | ### Установка расширения для Chrome/Chromium
33 | 1. [Скачайте](https://github.com/w3x731/survivIoAim/archive/master.zip) этот репозиторий и распакуйте его.
34 | 1. Откройте окно расширений перейдя по ссылке `chrome://extensions/`.
35 | 2. Перетащите папку [survivIoAimChromeExtension](https://github.com/w3x731/survivIoAim/tree/master/survivIoAimChromeExtension) или папку [survivIoAimChromeExtensionManager](https://github.com/w3x731/survivIoAim/tree/master/survivIoAimChromeExtensionManager) (не две сразу!!) из скачанного репозитория в открытое окно расширений.
36 |
37 | Когда вы начнете игру, нажмите клавишу `Z` чтобы включить/отключить чит. Как проверить работу скрипта? Персонаж которым вы играете, должен автоматически поворачиваться в направлении противника как только он приблизится к вам (если вы используете аим).
38 |
39 | Обновление: Кроме кнопки мыши, стрелять можно нажав на пробел.
40 | Обновление: Автоматическое открытие дверей и сборка лута.
41 | Обновление: Для регулирования радиуса зума используйте клавиши `Left shift` + `Mouse wheel`
42 | Обновление: Добавлено игровое меню. Чтобы включить меню во время игры нажмите `Z` для включение чита, после чего нажмите `B`
43 | Обновление: Быстрая смена оружия нажатием правой кнопки мыши.
44 | Обновление: Эмоции доступны по нажатию колесика мыши (вместо правой кнопки мыши).
45 | Обновление: Чтобы временно отключить автоаим зажмите и удерживайте `Left shift`.
46 | Обновление: Чтобы выбросить лут, зажмите `Left shift` и затем нажмите правой кнопокй на иконку лута.
47 | Обновление: Теперь авто аим целится во врага, который расположен ближе всего к курсору [#19](https://github.com/w3x731/survivIoAim/issues/19).
48 | Обновление: Доступно расширение для хрома с автообновлением. Теперь вам не нужно устанавливать новые версии вручную. Достаточно установить [survivIoAimChromeExtensionManager](https://github.com/w3x731/survivIoAim/tree/master/survivIoAimChromeExtensionManager) вместо старого расширения. Никакого Chrome web store с их 5 долларами.
49 |
50 | Все действия описанные в этой инструкции вы выполняете на свой страх и риск. Автор не несет ответственности за последствия ваших действий.
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/laserPointer.js:
--------------------------------------------------------------------------------
1 | window.laserPointer = function(game, variables) {
2 |
3 | var bullets = variables.bullets;
4 | var items = variables.items;
5 | var binded = false;
6 | var Laser = {
7 | draw: null,
8 | range: 0.0,
9 | direction: 0.0,
10 | angle: 0.0,
11 | }
12 | var playerPosListCount = 4;
13 | var playerLastRelevantTime = 0.19;
14 |
15 | if(!!!bullets || !!!items) {
16 | console.log("Cannot init laserpointer");
17 | return;
18 | }
19 |
20 | var getDistance = function(p1, p2) {
21 | var dx = p2.x - p1.x, dy = p2.y - p1.y;
22 | return Math.sqrt(dx * dx + dy * dy);
23 | };
24 |
25 | var getSecondsElapsed = function(time) {
26 | return (window.performance.now() - time) / 1000;
27 | };
28 |
29 | var updateLaser = function() {
30 | var draw = Laser.draw;
31 |
32 | if(!draw) {
33 | draw = new window.PIXI.Graphics();
34 |
35 | Laser.draw = draw;
36 | game.scope.mt.container.addChild(draw);
37 | game.scope.mt.container.setChildIndex(draw, 0);
38 | }
39 |
40 | if(!draw.graphicsData)
41 | return;
42 |
43 | draw.clear();
44 |
45 | var center = {x: 0, y: 0};
46 | var radius = Laser.range;
47 | var angleFrom = Laser.direction - Laser.angle;
48 | var angleTo = Laser.direction + Laser.angle;
49 |
50 | angleFrom = angleFrom > Math.PI * 2 ? angleFrom - Math.PI * 2 : angleFrom < 0 ? angleFrom + Math.PI * 2 : angleFrom;
51 | angleTo = angleTo > Math.PI * 2 ? angleTo - Math.PI * 2 : angleTo < 0 ? angleTo + Math.PI * 2 : angleTo;
52 |
53 | draw.beginFill(0xff0000, 0.1);
54 | draw.moveTo(center.x, center.y);
55 | draw.arc(center.x, center.y, radius, angleFrom, angleTo);
56 | draw.lineTo(center.x, center.y);
57 | draw.endFill();
58 | }
59 |
60 | var processPlayerSpeed = function(player, inertia) {
61 | if(!player)return;
62 |
63 | var curPosData = {
64 | pos: player.pos,
65 | time: window.performance.now(),
66 | };
67 |
68 | if(!player.posData || getSecondsElapsed(player.posData[0].time) > playerLastRelevantTime) {
69 | player.posData = [curPosData];
70 | player.prediction = {x:0.0, y:0.0};
71 | player.speed = 0.0;
72 | player.distance = 0.0;
73 | player.direction = null;
74 |
75 | return;
76 | }
77 |
78 | var lastPosData = player.posData[0];
79 |
80 | var distance = getDistance(curPosData.pos, lastPosData.pos);
81 |
82 | if(distance > 0.0001)
83 | {
84 | player.direction = {
85 | x: (curPosData.pos.x - lastPosData.pos.x) / distance,
86 | y: (curPosData.pos.y - lastPosData.pos.y) / distance
87 | }
88 | } else {
89 | player.direction = null;
90 | }
91 |
92 | var speed = distance / getSecondsElapsed(lastPosData.time);
93 |
94 | if(player.speed)speed = (speed * (1.0 - inertia)) + (player.speed * inertia);
95 |
96 | player.speed = speed;
97 | player.distance = distance;
98 | player.posData.push(curPosData);
99 |
100 | while(player.posData.length > playerPosListCount) {
101 | player.posData.shift();
102 | }
103 | };
104 |
105 | var resetLaser = function() {
106 | if(Laser.draw && game.scope.initialized) {
107 | Laser.draw.clear();
108 | }
109 | }
110 |
111 | var draw = function() {
112 | if(game.scope.mt.weapType != null) {
113 | var curWeapon = items[game.scope.mt.weapType];
114 | var bullet = bullets[curWeapon.bulletType]
115 |
116 | if(typeof curWeapon.shotSpread != "undefined" && typeof bullet != "undefined") {
117 | processPlayerSpeed(game.scope.mt.N, 0.1);
118 |
119 | Laser.range = bullet.distance * game.scope.q.ppu;
120 | Laser.direction = Math.atan2(game.scope.mt.N.dir.x, game.scope.mt.N.dir.y) - Math.PI / 2;
121 | Laser.angle = (curWeapon.shotSpread + (game.scope.mt.N.speed > 0.01 ? curWeapon.moveSpread : 0.0)) * 0.01745329252 / 2;
122 |
123 | updateLaser();
124 | } else {
125 | resetLaser();
126 | }
127 | }
128 |
129 | if(binded) {
130 | setTimeout(draw);
131 | } else {
132 | resetLaser();
133 | }
134 | }
135 |
136 | var bind = function() {
137 | setTimeout(function() {
138 | Laser.draw = null;
139 | resetLaser();
140 | draw();
141 | });
142 |
143 | binded = true;
144 | }
145 |
146 | var unbind = function() {
147 | binded = false;
148 | }
149 |
150 | var isBinded = function() {
151 | return binded;
152 | }
153 |
154 | return {
155 | bind: bind,
156 | unbind: unbind,
157 | isBinded: isBinded
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtensionManager/background.js:
--------------------------------------------------------------------------------
1 |
2 | var sendXhrGETRequest = function(url, callback) {
3 | var xhr = new XMLHttpRequest();
4 | xhr.open("GET", url, true);
5 |
6 | xhr.onreadystatechange = function() {
7 | if (xhr.readyState == 4) {
8 | callback(xhr);
9 | }
10 | }
11 |
12 | xhr.send();
13 | console.log("Send");
14 | }
15 |
16 | /*
17 | v1 > v2 return 1
18 | v1 < v2 return -1
19 | v1 == v2 return 0
20 | */
21 | var compareVersions = function(v1str, v2str) {
22 | var v1 = [];
23 | var v2 = [];
24 |
25 | v1str.split('.').forEach(function(item) {
26 | v1.push(parseInt(item));
27 | });
28 |
29 | v2str.split('.').forEach(function(item) {
30 | v2.push(parseInt(item));
31 | });
32 |
33 | if(v1.length > v2.length) {
34 | var diff = v1.length - v2.length;
35 | for(var i = 0; i < diff; i++) {
36 | v2.push(0);
37 | }
38 | } else if(v2.length > v1.length) {
39 | var diff = v2.length - v1.length;
40 | for(var i = 0; i < diff; i++) {
41 | v1.push(0);
42 | }
43 | }
44 |
45 | for(var i = 0; i < v1.length; i++) {
46 | if(v1[i] > v2[i]) {
47 | return 1;
48 | } else if(v1[i] < v2[i]) {
49 | return -1;
50 | } else continue;
51 | }
52 |
53 | return 0;
54 | }
55 |
56 | var extensionManager = (function() {
57 | var versionCheckUrl = "https://raw.githubusercontent.com/w3x731/survivIoAim/master/updates.json";
58 | var extensionFilesListUrl = "https://raw.githubusercontent.com/w3x731/survivIoAim/master/fileList.json";
59 | var fileList = {
60 | autoAim: {
61 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoAim.js",
62 | priority: 1
63 | },
64 | autoHeal: {
65 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoHeal.js",
66 | priority: 1
67 | },
68 | autoLoot: {
69 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoLoot.js",
70 | priority: 1
71 | },
72 | autoOpeningDoors: {
73 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/autoOpeningDoors.js",
74 | priority: 1
75 | },
76 | background: {
77 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/background.js",
78 | priority: 0
79 | },
80 | bigMapManager: {
81 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/bigMapManager.js",
82 | priority: 1
83 | },
84 | gernadeTimer: {
85 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/gernadeTimer.js",
86 | priority: 1
87 | },
88 | init: {
89 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/init.js",
90 | priority: 1
91 | },
92 | manifest: {
93 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/manifest.json",
94 | priority: -1
95 | },
96 | menu: {
97 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/menu.js",
98 | priority: 1
99 | },
100 | smokeAlphaManager: {
101 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/smokeAlphaManager.js",
102 | priority: 1
103 | },
104 | zoomRadiusManager: {
105 | url: "https://raw.githubusercontent.com/w3x731/survivIoAim/master/survivIoAimChromeExtension/zoomRadiusManager.js",
106 | priority: 1
107 | }
108 | };
109 |
110 | var checkUpdateDelay = 60000; //msec
111 | var updateDelay = 60000;
112 |
113 | var allowCheckUpdate = true;
114 | var allowUpdate = true;
115 |
116 | var _getExtensionCodeFromChromeLocalStorage = function(callback) {
117 | chrome.storage.local.get(['extensionCode'], function(extensionCode) {
118 | extensionCode = extensionCode.extensionCode; // !!!
119 | callback(extensionCode);
120 | });
121 | }
122 |
123 | var _isVailidExtensionCodeObject = function(extensionCode) {
124 | if(extensionCode == undefined) return false;
125 |
126 | var keys = Object.keys(fileList);
127 |
128 | for(var i = 0; i < keys.length; i++) {
129 | if(!extensionCode[keys[i]]) return false;
130 | }
131 |
132 | return true;
133 | }
134 |
135 | /*
136 | callback(true) on succes or callback(false) on reject
137 | */
138 | var _tryToStoreCode = function(extensionCode, callback) {
139 | if(_isVailidExtensionCodeObject(extensionCode)) {
140 | chrome.storage.local.set({
141 | 'extensionCode': extensionCode
142 | }, function() {
143 | console.log("Code stored");
144 | callback(true);
145 | });
146 | } else {
147 | callback(false);
148 | }
149 | }
150 |
151 | /*
152 | callback(true) if need or callback(false)
153 | */
154 | var isUpdateNeeded = function(callback) {
155 | // Limit request freq
156 | console.log("Is update needed...");
157 | if(!allowCheckUpdate) {
158 | console.log("Check update not allowed, return...");
159 | return; // !!!
160 | } else {
161 | allowCheckUpdate = false;
162 | setTimeout(function() {
163 | allowCheckUpdate = true;
164 | }, checkUpdateDelay);
165 | console.log("Check update allowed");
166 | }
167 |
168 | _getExtensionCodeFromChromeLocalStorage(function(extensionCode) {
169 | if(_isVailidExtensionCodeObject(extensionCode)) {
170 | // Check on the latest version
171 | console.log("Checking latest version");
172 | sendXhrGETRequest(versionCheckUrl, function(xhr) {
173 | try {
174 | var updates = JSON.parse(xhr.responseText);
175 | var currentExtensionVersion = JSON.parse(extensionCode.manifest).version;
176 |
177 | if(compareVersions(updates.version, currentExtensionVersion) > 0) {
178 | callback(true);
179 | } else {
180 | callback(false);
181 | }
182 | } catch(e) {
183 | console.log("Error: xhr request failed: " + e);
184 | callback(false);
185 | }
186 | });
187 | } else {
188 | callback(true);
189 | }
190 | });
191 | }
192 |
193 | /*
194 | callback()
195 | */
196 | var updateExtension = function(callback) {
197 | // Limit request freq
198 | if(!allowUpdate) {
199 | return; // !!!
200 | } else {
201 | allowUpdate = false;
202 | setTimeout(function() {
203 | allowUpdate = true;
204 | }, updateDelay);
205 | }
206 |
207 |
208 | var extensionCode = {};
209 |
210 | sendXhrGETRequest(extensionFilesListUrl, function(xhr) {
211 | try {
212 | fileList = JSON.parse(xhr.responseText);
213 | } catch(e) {
214 | console.log("Error: extension file list not recieved.");
215 | }
216 |
217 | var fileNames = Object.keys(fileList);
218 |
219 | for(var i = 0; i < fileNames.length; i++) {
220 | sendXhrGETRequest(fileList[fileNames[i]].url, (function() {
221 | var index = i;
222 | return function(xhr) {
223 | extensionCode[fileNames[index]] = xhr.responseText;
224 | _tryToStoreCode(extensionCode, function(isStored) {
225 | if(isStored) {
226 | callback();
227 | }
228 | });
229 | };
230 | })());
231 | }
232 | });
233 | }
234 |
235 | /*
236 | callback(extensionCode)
237 | */
238 | var extension = function(callback) {
239 | _getExtensionCodeFromChromeLocalStorage(callback);
240 | }
241 |
242 | var install = function(extensionCode) {
243 | // Sort keys by priority
244 | var sortedKeys = Object.keys(fileList).sort(function(a,b){return fileList[b].priority-fileList[a].priority})
245 |
246 | // Remember that only rewrite variables allowed
247 | for(var i = 0; i < sortedKeys.length; i++) {
248 | if(fileList[sortedKeys[i]].priority < 0) continue;
249 | eval(extensionCode[sortedKeys[i]]);
250 | }
251 |
252 | console.log("Install");
253 | }
254 |
255 | return {
256 | isUpdateNeeded: isUpdateNeeded,
257 | updateExtension: updateExtension,
258 | extension: extension,
259 | install: install
260 | }
261 | })();
262 |
263 | extensionManager.isUpdateNeeded(function(isNeeded) {
264 | if(isNeeded) {
265 | extensionManager.updateExtension(function() {
266 | extensionManager.extension(function(extensionCode) {
267 | extensionManager.install(extensionCode);
268 | });
269 | });
270 | } else {
271 | extensionManager.extension(function(extensionCode) {
272 | extensionManager.install(extensionCode);
273 | });
274 | }
275 | });
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/autoAim.js:
--------------------------------------------------------------------------------
1 | window.autoAim = function(game, variables) {
2 |
3 | var bullets = variables.bullets;
4 | var items = variables.items;
5 | var playerBarn = variables.playerBarn;
6 | var binded = false;
7 | var state = null;
8 |
9 | if(!!!bullets || !!!items || !!! playerBarn) {
10 | console.log("Cannot init autoaim");
11 | return;
12 | }
13 |
14 | var options = {
15 | targetEnemyNicknameVisibility: true,
16 | forwardFiringCoeff: 1,
17 | aimSmoothLevel: 0
18 | };
19 |
20 | // Yeah i know that i can create single func with key arg
21 | var pressOne = function() {
22 | if(!game.scope.be.keys["49"]) {
23 | setTimeout(function() {
24 | game.scope.be.keys["49"] = true;
25 | setTimeout(function() {
26 | delete game.scope.be.keys["49"]
27 | }, 50);
28 | }, 0);
29 | }
30 | }
31 |
32 | var pressTwo = function() {
33 | if(!game.scope.be.keys["50"]) {
34 | setTimeout(function() {
35 | game.scope.be.keys["50"] = true;
36 | setTimeout(function() {
37 | delete game.scope.be.keys["50"]
38 | }, 50);
39 | }, 0);
40 | }
41 | }
42 |
43 | var calculateRadianAngle = function(cx, cy, ex, ey) {
44 | var dy = ey - cy;
45 | var dx = ex - cx;
46 | var theta = Math.atan2(dy, dx); // range (-PI, PI]
47 | // theta *= 180 / Math.PI; // rads to degs, range (-180, 180]
48 | // if (theta < 0) theta = 360 + theta; // range [0, 360)
49 | return theta;
50 | }
51 |
52 | var calculateDistance = function(cx, cy, ex, ey) {
53 | return Math.sqrt(Math.pow((cx - ex), 2) + Math.pow((cy - ey), 2));
54 | }
55 |
56 | var getSelfPos = function() {
57 | return game.scope.mt.pos;
58 | }
59 |
60 | var getMouseScreenPos = function() {
61 | return game.scope.be.mousePos;
62 | }
63 |
64 | var getMousePointPos = function() {
65 | return game.scope.q.screenToPoint(getMouseScreenPos());
66 | }
67 |
68 | // todo: not detect on different levels
69 | var detectEnemies = function() {
70 | var result = [];
71 | if(!game.scope.Pe.St[game.scope.ce]) return result;
72 |
73 | var selfTeamId = game.scope.Pe.St[game.scope.ce].teamId;
74 | var selfId = game.scope.ce;
75 | var playerIds = Object.keys(game.scope.Pe.St);
76 |
77 | for(var i = 0; i < playerIds.length; i++) {
78 | if( game.scope.st.idToObj[playerIds[i]] &&
79 | (!game.scope.st.idToObj[playerIds[i]].N.dead) &&
80 | (!game.scope.st.idToObj[playerIds[i]].N.downed) &&
81 | game.scope.Pe.St[playerIds[i]].teamId != selfTeamId) {
82 |
83 | if(playerIds[i] != selfId) {
84 | result[playerIds[i]] = game.scope.st.idToObj[playerIds[i]];
85 | }
86 | }
87 | }
88 |
89 | return result;
90 | }
91 |
92 | var getMinimalDistanceIndex = function(enemyDistances) {
93 | return enemyDistances.indexOf(Math.min.apply(null, enemyDistances));
94 | }
95 |
96 | var calculateTargetMousePosition = function(enemyPos, enemyPosTimestamp, prevEnemyPos, prevEnemyPosTimestamp, distance) {
97 | var bulletSpeed = 0;
98 | var bulletApproachTime = Infinity;
99 |
100 | if(items[game.scope.mt.weapType].bulletType) {
101 | bulletSpeed = bullets[items[game.scope.mt.weapType].bulletType].speed * options.forwardFiringCoeff;
102 | } else {
103 | bulletSpeed = 1000;
104 | };
105 |
106 | var selfPos = getSelfPos();
107 |
108 | var predictionEnemyPos = {
109 | x: enemyPos.x,
110 | y: enemyPos.y
111 | }
112 | var predictionEnemyDistance = calculateDistance(selfPos.x, selfPos.y, enemyPos.x, enemyPos.y);
113 |
114 | var enemySpeed = {
115 | x: (enemyPos.x - prevEnemyPos.x)/((enemyPosTimestamp - prevEnemyPosTimestamp + 1)/1000.0),
116 | y: (enemyPos.y - prevEnemyPos.y)/((enemyPosTimestamp - prevEnemyPosTimestamp + 1)/1000.0)
117 | }
118 |
119 | for(var i = 0; i < 10; i++) {
120 | bulletApproachTime = predictionEnemyDistance/bulletSpeed;
121 | predictionEnemyPos = {
122 | x: enemyPos.x + enemySpeed.x * bulletApproachTime,
123 | y: enemyPos.y + enemySpeed.y * bulletApproachTime
124 | };
125 | predictionEnemyDistance = calculateDistance(selfPos.x, selfPos.y, predictionEnemyPos.x, predictionEnemyPos.y);
126 | }
127 |
128 | var halfScreenWidth = game.scope.q.screenWidth/2;
129 | var halfScreenHeight = game.scope.q.screenHeight/2;
130 |
131 | var minScreenCircleRadius = halfScreenHeight > halfScreenWidth ? halfScreenWidth : halfScreenHeight;
132 | minScreenCircleRadius = Math.floor(minScreenCircleRadius - 1);
133 |
134 | // todo: remove angles
135 | var predictionRadianAngle = calculateRadianAngle(selfPos.x, selfPos.y, predictionEnemyPos.x, predictionEnemyPos.y);
136 |
137 | return {
138 | x: halfScreenWidth + minScreenCircleRadius * Math.cos(predictionRadianAngle),
139 | y: halfScreenHeight - minScreenCircleRadius * Math.sin(predictionRadianAngle),
140 | }
141 | }
142 |
143 | var getNewState = function() {
144 | var state = [];
145 | for(var i = 0; i < 3; i++) {
146 | state.push({
147 | distance: null,
148 | radianAngle: null,
149 | pos: getMouseScreenPos(),
150 | targetMousePosition: getMouseScreenPos(),
151 | timestamp: 0
152 | });
153 | }
154 | state.new = null;
155 | state.player = {
156 | nameText: {
157 | visible: false,
158 | style: {
159 | fontSize: 22,
160 | fill: "#00FFFF"
161 | }
162 | }
163 | }; // enemy
164 | state.averageTargetMousePosition = null;
165 | state.mouseRelPointPos = {
166 | x: 0,
167 | y: 0
168 | }
169 | return state;
170 | }
171 |
172 | var showTargetEnemyNick = function() {
173 | state.player.nameText.visible = true;
174 | state.player.nameText.style.fontSize = 100;
175 | state.player.nameText.style.fill = "#D50000";
176 | }
177 |
178 | var hideTargetEnemyNick = function() {
179 | state.player.nameText.visible = false;
180 | state.player.nameText.style.fontSize = 22;
181 | state.player.nameText.style.fill = "#00FFFF";
182 | }
183 |
184 | var stateNewTriggered = function(newStateNew) {
185 | // from true to false
186 | if(!newStateNew) {
187 | options.targetEnemyNicknameVisibility && hideTargetEnemyNick();
188 | }
189 | }
190 |
191 | var updateState = function(detectedEnemies) {
192 | var selfPos = getSelfPos();
193 | var mousePos = {
194 | x: selfPos.x + state.mouseRelPointPos.x,
195 | y: selfPos.y + state.mouseRelPointPos.y
196 | };
197 | var enemySelfDistances = [];
198 | var enemyMouseDistances = [];
199 | var enemySelfRadianAngles = [];
200 | var detectedEnemiesKeys = Object.keys(detectedEnemies);
201 |
202 | if(!detectedEnemiesKeys.length) {
203 | if(state.new) {
204 | state.new = false;
205 | stateNewTriggered(false);
206 | }
207 | return;
208 | } else {
209 | for(var i = 0; i < detectedEnemiesKeys.length; i++) {
210 | var enemyPos = detectedEnemies[detectedEnemiesKeys[i]].N.pos;
211 |
212 | var selfDistance = Math.sqrt(Math.pow(selfPos.x - enemyPos.x, 2) + Math.pow(selfPos.y - enemyPos.y, 2));
213 | var mouseDistance = Math.sqrt(Math.pow(mousePos.x - enemyPos.x, 2) + Math.pow(mousePos.y - enemyPos.y, 2));
214 | var selfRadianAngle = calculateRadianAngle(selfPos.x, selfPos.y, enemyPos.x, enemyPos.y);
215 |
216 | enemySelfDistances.push(selfDistance);
217 | enemyMouseDistances.push(mouseDistance);
218 | enemySelfRadianAngles.push(selfRadianAngle);
219 | }
220 |
221 | var targetEnemyIndex = getMinimalDistanceIndex(enemyMouseDistances);
222 |
223 | state.unshift({
224 | distance: enemySelfDistances[targetEnemyIndex],
225 | radianAngle: enemySelfRadianAngles[targetEnemyIndex],
226 | pos: detectedEnemies[detectedEnemiesKeys[targetEnemyIndex]].N.pos,
227 | timestamp: Date.now(),
228 | });
229 | state.pop();
230 | state[0].targetMousePosition = calculateTargetMousePosition(state[0].pos, state[0].timestamp, state[1].pos, state[1].timestamp, state.distance);
231 | state.averageTargetMousePosition = {
232 | x: 0,
233 | y: 0
234 | };
235 |
236 | for(var i = 0; i < state.length; i++) {
237 | state.averageTargetMousePosition.x += state[i].targetMousePosition.x;
238 | state.averageTargetMousePosition.y += state[i].targetMousePosition.y;
239 | }
240 |
241 | state.averageTargetMousePosition.x /= state.length;
242 | state.averageTargetMousePosition.y /= state.length;
243 |
244 | options.targetEnemyNicknameVisibility && hideTargetEnemyNick();
245 |
246 | state.player = detectedEnemies[detectedEnemiesKeys[targetEnemyIndex]];
247 |
248 | options.targetEnemyNicknameVisibility && showTargetEnemyNick();
249 |
250 | state.new = true;
251 | }
252 | }
253 |
254 | var aim = function(averageTargetMousePosition) {
255 | game.scope.be.mousePos = averageTargetMousePosition;
256 | }
257 |
258 | var defaultPlayerBarnRenderFunction = function(e) {};
259 | var playerBarnRenderContext = {};
260 |
261 | var defaultBOnMouseDown = function(event) {};
262 | var defaultBOnMouseMove = function(event) {};
263 |
264 | var mouseListener = {
265 | mousedown: function(event) {
266 | if(event.button === 2) {
267 | if(game.scope.mt.curWeapIdx) {
268 | pressOne();
269 | return;
270 | }
271 |
272 | if(!game.scope.mt.curWeapIdx) {
273 | pressTwo();
274 | return;
275 | }
276 | }
277 |
278 | if(((event.button === 0) || (event.button === 2)) && state.new) {
279 |
280 | game.scope.be.mousePos = state.averageTargetMousePosition;
281 | // ???
282 | game.scope.be.mouseButtonOld = false;
283 | game.scope.be.mouseButton = true;
284 | } else {
285 | defaultBOnMouseDown(event);
286 | }
287 | },
288 | mousemove: function(event) {
289 | var selfPos = getSelfPos();
290 | var eventPointPos = game.scope.q.screenToPoint({
291 | x: event.clientX,
292 | y: event.clientY
293 | });
294 |
295 | state.mouseRelPointPos = {
296 | x: eventPointPos.x - selfPos.x,
297 | y: eventPointPos.y - selfPos.y,
298 | };
299 |
300 | if(!state.new) {
301 | defaultBOnMouseMove(event);
302 | }
303 | }
304 | }
305 |
306 | var addMouseListener = function() {
307 | window.addEventListener("mousedown", mouseListener.mousedown);
308 | window.addEventListener("mousemove", mouseListener.mousemove);
309 | }
310 |
311 | var removeMouseListener = function() {
312 | window.removeEventListener("mousedown", mouseListener.mousedown);
313 | window.removeEventListener("mousemove", mouseListener.mousemove);
314 | }
315 |
316 | var spaceKeyListeners = {
317 | keydown: function(event) {
318 | if(event.which == 32) {
319 | game.scope.be.mouseButton = true;
320 | }
321 | },
322 | keyup: function(event) {
323 | if(event.which == 32) {
324 | game.scope.be.mouseButton = false;
325 | }
326 | }
327 | }
328 |
329 | var addSpaceKeyListener = function() {
330 | window.addEventListener("keydown", spaceKeyListeners.keydown);
331 | window.addEventListener("keyup", spaceKeyListeners.keyup);
332 | }
333 |
334 | var removeSpaceKeyListener = function() {
335 | window.removeEventListener("keydown", spaceKeyListeners.keydown);
336 | window.removeEventListener("keyup", spaceKeyListeners.keyup);
337 | }
338 |
339 | var bind = function(opt) {
340 | options.targetEnemyNicknameVisibility = opt.targetEnemyNicknameVisibility;
341 | options.forwardFiringCoeff = opt.forwardFiringCoeff;
342 |
343 | state = getNewState();
344 |
345 | defaultBOnMouseDown = game.scope.be.bOnMouseDown;
346 | defaultBOnMouseMove = game.scope.be.bOnMouseMove;
347 |
348 | defaultPlayerBarnRenderFunction = playerBarn.prototype.render;
349 | playerBarn.prototype.render = function(e) {
350 | var playerBarnRenderContext = this;
351 |
352 | updateState(detectEnemies());
353 |
354 | if(state.new) {
355 | aim(state.averageTargetMousePosition);
356 | }
357 |
358 | defaultPlayerBarnRenderFunction.call(playerBarnRenderContext, e);
359 | };
360 |
361 | window.removeEventListener("mousedown", game.scope.be.bOnMouseDown);
362 | window.removeEventListener("mousemove", game.scope.be.bOnMouseMove);
363 |
364 | removeMouseListener();
365 | removeSpaceKeyListener();
366 |
367 | addMouseListener();
368 | addSpaceKeyListener();
369 |
370 | binded = true;
371 | }
372 |
373 | var unbind = function() {
374 | removeMouseListener();
375 | removeSpaceKeyListener();
376 |
377 | window.removeEventListener("mousedown", defaultBOnMouseDown);
378 | window.removeEventListener("mousemove", defaultBOnMouseMove);
379 |
380 | window.addEventListener("mousedown", defaultBOnMouseDown);
381 | window.addEventListener("mousemove", defaultBOnMouseMove);
382 |
383 | playerBarn.prototype.render = defaultPlayerBarnRenderFunction;
384 |
385 | binded = false;
386 | }
387 |
388 | var isBinded = function() {
389 | return binded;
390 | }
391 |
392 | var setForwardFiringCoeff = function(coeff) {
393 | options.forwardFiringCoeff = coeff;
394 | }
395 |
396 | return {
397 | bind: bind,
398 | unbind: unbind,
399 | isBinded: isBinded,
400 |
401 | setForwardFiringCoeff: setForwardFiringCoeff
402 | }
403 | }
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/init.js:
--------------------------------------------------------------------------------
1 | window.init = function(game, exports, interactionEmitter, emitActionCb, smokeAlpha, modules, options, extensionId) {
2 | if(!exports) {
3 | console.log("Error: Exports not defined, return.");
4 | return;
5 | }
6 |
7 | function storeOptions(extensionId, optionsObj) {
8 | chrome.runtime.sendMessage(extensionId, JSON.stringify(optionsObj));
9 | console.log("Storing options...");
10 | }
11 |
12 | function getNewOptionsInstance() {
13 | return {
14 | particlesTransparency: 0.5,
15 | ceilingTransparency: 0.5,
16 | bigMapTransparency: 0.9,
17 | fragGernadeSize: 0.31,
18 | fragGernadeColor: 16711680,
19 | smokeGernadeAlpha: 0.1,
20 | defaultFragGernadeEnabled: false,
21 | autoAimEnabled: true,
22 | autoLootEnabled: true,
23 | autoHealEnabled: true,
24 | autoOpeningDoorsEnabled: true,
25 | gernadeTimerEnabled: true,
26 | laserPointerEnabled: true,
27 | zoomRadiusManagerEnabled: true,
28 | targetEnemyNicknameVisibility: true,
29 | forwardFiringCoeff: 1
30 | }
31 | }
32 |
33 | if(!options) {
34 | options = getNewOptionsInstance();
35 | storeOptions(extensionId, options);
36 | }
37 |
38 | smokeAlpha.scope = options.smokeGernadeAlpha;
39 | emitActionCb.scope = function(){};
40 |
41 | var defsParticles = exports['ceee80d9'].exports.Defs;
42 | var bullets = exports['989ad62a'].exports.bullets;
43 | var player = exports['989ad62a'].exports.player;
44 | var items = exports['989ad62a'].exports.items;
45 | var bagSizes = exports['989ad62a'].exports.bagSizes;
46 | var scopeZoomRadius = exports['989ad62a'].exports.scopeZoomRadius;
47 |
48 | var playerBarn = exports['a508b62a'].exports.Ce;
49 | var lootBarn = exports['a48f3bb2'].exports.Ve;
50 | var bulletBarn = exports['c73dee75'].exports.Ie;
51 | var inputHandler = exports['4b8d140f'].exports.oe;
52 |
53 | var key = exports['4b8d140f'].exports.Key;
54 |
55 | var particlesTransparencyCb = null;
56 | var ceilingTransparencyCb = null;
57 | var bigMapTransparencyCb = null;
58 | var gernadePropertiesCb = null;
59 | var defaultGernadePropertiesCb = null;
60 | var forwardFiringCoeffCb = null;
61 |
62 | // Default gernade properties
63 | var defaultFragGernadeTint = null;
64 | var defaultFragGernadeScale = null;
65 |
66 | if( !!defsParticles &&
67 | !!items &&
68 | !!bullets &&
69 | !!bagSizes &&
70 | !!playerBarn &&
71 | !!lootBarn &&
72 | !!scopeZoomRadius &&
73 | !!inputHandler) {
74 |
75 | var defaultInputHandlerFreeFunction = function() {};
76 | var inputHandlerFreeContext = {};
77 |
78 | defaultInputHandlerFreeFunction = inputHandler.prototype.o;
79 | inputHandler.prototype.o = function() {
80 | disableCheat();
81 | inputHandlerFreeContext = this;
82 | defaultInputHandlerFreeFunction.call(inputHandlerFreeContext);
83 | }
84 |
85 | // Gernade size and color
86 | defaultFragGernadeTint = items.frag.worldImg.tint;
87 | defaultFragGernadeScale = items.frag.worldImg.scale;
88 |
89 | items.frag.worldImg.tint = options.fragGernadeColor;
90 | items.frag.worldImg.scale = options.fragGernadeSize;
91 |
92 | // Ceiling alpha
93 | Object.keys(defsParticles).forEach(function(key) {
94 | if(defsParticles[key].ceiling) {
95 | defsParticles[key].ceiling.imgs.forEach(function(item) {
96 | item.alpha = options.ceilingTransparency;
97 | });
98 | }
99 | });
100 |
101 | defsParticles["bush_03"].img.alpha = options.particlesTransparency;
102 | defsParticles["bush_02"].img.alpha = options.particlesTransparency;
103 | defsParticles["bush_01"].img.alpha = options.particlesTransparency;
104 |
105 | defsParticles["tree_01"].img.alpha = options.particlesTransparency;
106 |
107 | defsParticles["table_02"].img.alpha = options.particlesTransparency;
108 | defsParticles["table_01"].img.alpha = options.particlesTransparency;
109 |
110 | particlesTransparencyCb = function(alpha) {
111 | // Particle alpha
112 | options.particlesTransparency = alpha;
113 |
114 | defsParticles["bush_01"].img.alpha = alpha;
115 | defsParticles["bush_02"].img.alpha = alpha;
116 | defsParticles["bush_03"].img.alpha = alpha;
117 |
118 | defsParticles["tree_01"].img.alpha = alpha;
119 |
120 | defsParticles["table_01"].img.alpha = alpha;
121 | defsParticles["table_02"].img.alpha = alpha;
122 | }
123 |
124 | ceilingTransparencyCb = function(alpha) {
125 | // Ceiling alpha
126 | options.ceilingTransparency = alpha;
127 |
128 | Object.keys(defsParticles).forEach(function(key) {
129 | if(defsParticles[key].ceiling) {
130 | defsParticles[key].ceiling.imgs.forEach(function(item) {
131 | item.alpha = alpha;
132 | });
133 | }
134 | });
135 | }
136 |
137 | bigMapTransparencyCb = function(alpha) {
138 | options.bigMapTransparency = alpha;
139 | bigMapManager.setBigMapTransparency(alpha);
140 | }
141 |
142 | gernadePropertiesCb = function(size, color) {
143 | options.fragGernadeSize = size;
144 | options.fragGernadeColor = color;
145 |
146 | items.frag.worldImg.tint = color;
147 | items.frag.worldImg.scale = size;
148 | }
149 |
150 | smokeGernadePropertiesCb = function(alpha) {
151 | options.smokeGernadeAlpha = parseFloat(alpha);
152 | smokeAlphaManager.setSmokeAlpha(options.smokeGernadeAlpha);
153 | }
154 |
155 | defaultGernadePropertiesCb = function() {
156 | options.fragGernadeSize = defaultFragGernadeScale;
157 | options.fragGernadeColor = defaultFragGernadeTint;
158 |
159 | items.frag.worldImg.scale = defaultFragGernadeScale;
160 | items.frag.worldImg.tint = defaultFragGernadeTint;
161 |
162 | return {
163 | defaultFragGernadeScale: defaultFragGernadeScale,
164 | defaultFragGernadeTint: defaultFragGernadeTint
165 | }
166 | }
167 |
168 | forwardFiringCoeffCb = function(coeff) {
169 | options.forwardFiringCoeff = parseFloat(coeff);
170 | autoAim.setForwardFiringCoeff(options.forwardFiringCoeff);
171 | }
172 | } else {
173 | console.log("Error: Variable not defined");
174 | }
175 |
176 | storeOptionsCb = function() {
177 | storeOptions(extensionId, options);
178 | }
179 |
180 | // setInterval(function(){if(game.scope && game.scope.st){
181 | // console.log(game.scope);console.log(exports);
182 | // }}, 2000);
183 |
184 | var bindAutoAim = function() {
185 | autoAim.bind({
186 | targetEnemyNicknameVisibility: options.targetEnemyNicknameVisibility,
187 | forwardFiringCoeff: options.forwardFiringCoeff
188 | });
189 | }
190 |
191 | var unbindAutoAim = function() {
192 | autoAim.unbind();
193 | }
194 |
195 | var autoAimEnableCb = function() {
196 | if(autoAim.isBinded() && options.autoAimEnabled) {
197 | unbindAutoAim();
198 | options.autoAimEnabled = false;
199 | } else if(!autoAim.isBinded() && !options.autoAimEnabled) {
200 | bindAutoAim();
201 | options.autoAimEnabled = true;
202 | }
203 | }
204 |
205 | var autoAimTargetEnemyVisibilityCb = function() {
206 | options.targetEnemyNicknameVisibility = !options.targetEnemyNicknameVisibility;
207 | if(autoAim.isBinded() && options.autoAimEnabled) {
208 | unbindAutoAim();
209 | bindAutoAim();
210 | }
211 | }
212 |
213 | var autoLootEnableCb = function() {
214 | if(autoLoot.isBinded() && options.autoLootEnabled) {
215 | autoLoot.unbind();
216 | options.autoLootEnabled = false;
217 | } else if(!autoLoot.isBinded() && !options.autoLootEnabled) {
218 | autoLoot.bind();
219 | options.autoLootEnabled = true;
220 | }
221 | }
222 |
223 | var autoHealEnableCb = function() {
224 | if(autoHeal.isBinded() && options.autoHealEnabled) {
225 | autoHeal.unbind();
226 | options.autoHealEnabled = false;
227 | } else if(!autoHeal.isBinded() && !options.autoHealEnabled) {
228 | autoHeal.bind();
229 | options.autoHealEnabled = true;
230 | }
231 | }
232 |
233 | var autoOpeningDoorsEnableCb = function() {
234 | if(autoOpeningDoors.isBinded() && options.autoOpeningDoorsEnabled) {
235 | autoOpeningDoors.unbind();
236 | options.autoOpeningDoorsEnabled = false;
237 | } else if(!autoOpeningDoors.isBinded() && !options.autoOpeningDoorsEnabled) {
238 | autoOpeningDoors.bind();
239 | options.autoOpeningDoorsEnabled = true;
240 | }
241 | }
242 |
243 | var gernadeTimerEnableCb = function() {
244 | if(gernadeTimer.isBinded() && options.gernadeTimerEnabled) {
245 | gernadeTimer.unbind();
246 | options.gernadeTimerEnabled = false;
247 | } else if(!gernadeTimer.isBinded() && !options.gernadeTimerEnabled) {
248 | gernadeTimer.bind();
249 | options.gernadeTimerEnabled = true;
250 | }
251 | }
252 |
253 | var laserPointerEnableCb = function() {
254 | if(laserPointer.isBinded() && options.laserPointerEnabled) {
255 | laserPointer.unbind();
256 | options.laserPointerEnabled = false;
257 | } else if(!laserPointer.isBinded() && !options.laserPointerEnabled) {
258 | laserPointer.bind();
259 | options.laserPointerEnabled = true;
260 | }
261 | }
262 |
263 | var zoomRadiusManagerEnableCb = function() {
264 | if(zoomRadiusManager.isBinded() && options.zoomRadiusManagerEnabled) {
265 | zoomRadiusManager.unbind();
266 | options.zoomRadiusManagerEnabled = false;
267 | } else if(!zoomRadiusManager.isBinded() && !options.zoomRadiusManagerEnabled) {
268 | zoomRadiusManager.bind();
269 | options.zoomRadiusManagerEnabled = true;
270 | }
271 | }
272 |
273 | var autoAim = modules.autoAim(game, {
274 | bullets: bullets,
275 | items: items,
276 | playerBarn: playerBarn
277 | });
278 |
279 | var autoLoot = modules.autoLoot(game, {
280 | lootBarn: lootBarn,
281 | bagSizes: bagSizes
282 | });
283 |
284 | var autoHeal = modules.autoHeal(game, {
285 | key: key
286 | });
287 |
288 | var autoOpeningDoors = modules.autoOpeningDoors(game, emitActionCb, interactionEmitter);
289 |
290 | var bigMapManager = modules.bigMapManager(game);
291 |
292 | var gernadeTimer = modules.gernadeTimer(game);
293 |
294 | var laserPointer = modules.laserPointer(game, {
295 | bullets: bullets,
296 | items: items
297 | });
298 |
299 | var zoomRadiusManager = modules.zoomRadiusManager(game, {
300 | scopeZoomRadius: scopeZoomRadius
301 | });
302 |
303 | var smokeAlphaManager = modules.smokeAlphaManager(game, smokeAlpha);
304 |
305 | var menu = modules.menu(options, {
306 | particlesTransparencyCb: particlesTransparencyCb,
307 | ceilingTransparencyCb: ceilingTransparencyCb,
308 | bigMapTransparencyCb: bigMapTransparencyCb,
309 |
310 | gernadePropertiesCb: gernadePropertiesCb,
311 | defaultGernadePropertiesCb: defaultGernadePropertiesCb,
312 | smokeGernadePropertiesCb: smokeGernadePropertiesCb,
313 |
314 | autoAimEnableCb: autoAimEnableCb,
315 | autoAimTargetEnemyVisibilityCb: autoAimTargetEnemyVisibilityCb,
316 | forwardFiringCoeffCb: forwardFiringCoeffCb,
317 | autoHealEnableCb: autoHealEnableCb,
318 | autoLootEnableCb: autoLootEnableCb,
319 | autoOpeningDoorsEnableCb: autoOpeningDoorsEnableCb,
320 | laserPointerEnableCb: laserPointerEnableCb,
321 | zoomRadiusManagerEnableCb: zoomRadiusManagerEnableCb,
322 | gernadeTimerEnableCb: gernadeTimerEnableCb,
323 |
324 | storeOptionsCb: storeOptionsCb
325 | });
326 |
327 | var lShiftKeyListener = {
328 | keydown: function(event) {
329 | if(event.which == 16) {
330 | if(autoAim.isBinded()) {
331 | unbindAutoAim();
332 | }
333 | if(autoLoot.isBinded()) {
334 | autoLoot.unbind();
335 | }
336 | if(autoHeal.isBinded()) {
337 | autoHeal.unbind();
338 | }
339 | }
340 | },
341 | keyup: function(event) {
342 | if(event.which == 16) {
343 | if(options.autoAimEnabled && !autoAim.isBinded()) {
344 | bindAutoAim();
345 | }
346 | if(options.autoLootEnabled && !autoLoot.isBinded()) {
347 | autoLoot.bind({
348 | targetEnemyNicknameVisibility: options.targetEnemyNicknameVisibility
349 | });
350 | }
351 | if(options.autoHealEnabled && !autoHeal.isBinded()) {
352 | autoHeal.bind();
353 | }
354 | }
355 | }
356 | }
357 |
358 | var addLShiftKeyListener = function() {
359 | window.addEventListener("keydown", lShiftKeyListener.keydown);
360 | window.addEventListener("keyup", lShiftKeyListener.keyup);
361 | }
362 |
363 | var removeLShiftKeyListener = function() {
364 | window.removeEventListener("keydown", lShiftKeyListener.keydown);
365 | window.removeEventListener("keyup", lShiftKeyListener.keyup);
366 | }
367 |
368 | var bindCheatListeners = function() {
369 | addLShiftKeyListener();
370 |
371 | if(options.autoAimEnabled && !autoAim.isBinded()) {
372 | bindAutoAim();
373 | }
374 |
375 | if(options.autoLootEnabled && !autoLoot.isBinded()) {
376 | autoLoot.bind();
377 | }
378 |
379 | if(options.autoHealEnabled && !autoHeal.isBinded()) {
380 | autoHeal.bind();
381 | }
382 |
383 | if(options.autoOpeningDoorsEnabled && !autoOpeningDoors.isBinded()) {
384 | autoOpeningDoors.bind();
385 | }
386 |
387 | if(!bigMapManager.isBinded()) {
388 | bigMapManager.bind({
389 | bigMapTransparency: options.bigMapTransparency
390 | });
391 | }
392 |
393 | if(options.gernadeTimerEnabled && !gernadeTimer.isBinded()) {
394 | gernadeTimer.bind();
395 | }
396 |
397 | if(options.laserPointerEnabled && !laserPointer.isBinded()) {
398 | laserPointer.bind();
399 | }
400 |
401 | if(options.zoomRadiusManagerEnabled && !zoomRadiusManager.isBinded()) {
402 | zoomRadiusManager.bind();
403 | }
404 |
405 | if(!smokeAlphaManager.isBinded()) {
406 | smokeAlphaManager.bind({
407 | smokeAlpha: options.smokeGernadeAlpha
408 | });
409 | }
410 |
411 | if(!menu.isBinded()) {
412 | menu.bind();
413 | }
414 | }
415 |
416 | var unbindCheatListeners = function() {
417 | removeLShiftKeyListener();
418 |
419 | if(menu.isBinded()) {
420 | menu.unbind();
421 | }
422 |
423 | if(autoAim.isBinded()) {
424 | unbindAutoAim();
425 | }
426 |
427 | if(autoLoot.isBinded()) {
428 | autoLoot.unbind();
429 | }
430 |
431 | if(autoHeal.isBinded()) {
432 | autoHeal.unbind();
433 | }
434 |
435 | if(autoOpeningDoors.isBinded()) {
436 | autoOpeningDoors.unbind();
437 | }
438 |
439 | if(bigMapManager.isBinded()) {
440 | bigMapManager.unbind();
441 | }
442 |
443 | if(gernadeTimer.isBinded()) {
444 | gernadeTimer.unbind();
445 | }
446 |
447 | if(laserPointer.isBinded()) {
448 | laserPointer.unbind();
449 | }
450 |
451 | if(zoomRadiusManager.isBinded()) {
452 | zoomRadiusManager.unbind();
453 | }
454 |
455 | if(smokeAlphaManager.isBinded()) {
456 | smokeAlphaManager.unbind();
457 | }
458 | }
459 |
460 | var gameOver = function() {
461 | if(game.scope) return !!game.scope.gameOver;
462 | return true;
463 | }
464 |
465 | var cheatEnabled = false;
466 | function enableCheat() {
467 | if(game.scope && !gameOver() && !cheatEnabled) {
468 | bindCheatListeners();
469 | cheatEnabled = true;
470 | }
471 | }
472 |
473 | function disableCheat() {
474 | if(cheatEnabled) {
475 | unbindCheatListeners();
476 | cheatEnabled = false;
477 | }
478 | }
479 |
480 | var zKeyListener = {
481 | keyup: function(event) {
482 | if(event.which == 90) {
483 | if(!gameOver()) {
484 | if(cheatEnabled) {
485 | disableCheat();
486 | } else {
487 | enableCheat();
488 | }
489 | }
490 | }
491 | }
492 | }
493 |
494 | var addZKeyListener = function() {
495 | window.addEventListener("keyup", zKeyListener.keyup);
496 | }
497 |
498 | var removeZKeyListener = function() {
499 | window.removeEventListener("keyup", zKeyListener.keyup);
500 | }
501 |
502 | removeZKeyListener();
503 | addZKeyListener();
504 | }
505 |
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/menu.js:
--------------------------------------------------------------------------------
1 | window.menu = function(options, callbacks) {
2 | var binded = false;
3 | var menuOpened = false;
4 |
5 | var showMenu = function() {
6 | var cheatMenuContainer = document.createElement('div');
7 | cheatMenuContainer.className = "modal-body";
8 | cheatMenuContainer.style = "display:block;z-index:10;pointer-events:all;position:absolute;max-height:500px;width:25%;overflow:auto;"
9 |
10 | var particlesTransparencySlider = document.createElement('div');
11 | var ceilingTransparencySlider = document.createElement('div');
12 |
13 | var fragGernadeColorSlider = document.createElement('div');
14 | var fragGernadeSizeSlider = document.createElement('div');
15 | var defaultFragGernadePropertiesButton = document.createElement('div');
16 | var smokeGernadeAlphaSlider = document.createElement('div');
17 |
18 | var bigMapTransparencySlider = document.createElement('div');
19 |
20 | var autoAimEnabledCheckbox = document.createElement('div');
21 | var autoAimTargetNameVisibilityCheckbox = document.createElement('div');
22 | var forwardFiringCoeffSlider = document.createElement('div');
23 |
24 | var autoLootEnabledCheckbox = document.createElement('div');
25 | var autoHealEnabledCheckbox = document.createElement('div');
26 | var autoOpeningDoorsEnabledCheckbox = document.createElement('div');
27 | var gernadeTimerEnabledCheckbox = document.createElement('div');
28 | var laserPointerEnabledCheckbox = document.createElement('div');
29 | var zoomRadiusManagerEnabledCheckbox = document.createElement('div');
30 |
31 | var storeOptionsButton = document.createElement('div');
32 |
33 | if(callbacks.particlesTransparencyCb) {
34 | particlesTransparencySlider.className = "modal-settings-item slider-container";
35 |
36 | var description = document.createElement('p');
37 | description.className = "slider-text";
38 | description.innerHTML = "Particles transparency level";
39 |
40 | var input = document.createElement('input');
41 | input.className = "slider";
42 | input.type = "range";
43 | input.min = "0";
44 | input.max = "1";
45 | input.step = "0.01";
46 | input.value = options.particlesTransparency;
47 |
48 | input.addEventListener("input", function() {
49 | callbacks.particlesTransparencyCb(this.value);
50 | }, false);
51 |
52 | particlesTransparencySlider.appendChild(description);
53 | particlesTransparencySlider.appendChild(input);
54 | }
55 |
56 | if(callbacks.ceilingTransparencyCb) {
57 | ceilingTransparencySlider.className = "modal-settings-item slider-container";
58 |
59 | var description = document.createElement('p');
60 | description.className = "slider-text";
61 | description.innerHTML = "Ceiling transparency level";
62 |
63 | var input = document.createElement('input');
64 | input.className = "slider";
65 | input.type = "range";
66 | input.min = "0";
67 | input.max = "1";
68 | input.step = "0.01";
69 | input.value = options.ceilingTransparency;
70 |
71 | input.addEventListener("input", function() {
72 | callbacks.ceilingTransparencyCb(this.value);
73 | }, false);
74 |
75 | ceilingTransparencySlider.appendChild(description);
76 | ceilingTransparencySlider.appendChild(input);
77 | }
78 |
79 | if(callbacks.bigMapTransparencyCb) {
80 | bigMapTransparencySlider.className = "modal-settings-item slider-container";
81 |
82 | var description = document.createElement('p');
83 | description.className = "slider-text";
84 | description.innerHTML = "Big map transparency level";
85 |
86 | var input = document.createElement('input');
87 | input.className = "slider";
88 | input.type = "range";
89 | input.min = "0";
90 | input.max = "1";
91 | input.step = "0.01";
92 | input.value = options.bigMapTransparency;
93 |
94 | input.addEventListener("input", function() {
95 | callbacks.bigMapTransparencyCb(this.value);
96 | }, false);
97 |
98 | bigMapTransparencySlider.appendChild(description);
99 | bigMapTransparencySlider.appendChild(input);
100 | }
101 |
102 | if(callbacks.gernadePropertiesCb && callbacks.defaultGernadePropertiesCb) {
103 | fragGernadeColorSlider.className = "modal-settings-item slider-container";
104 | fragGernadeSizeSlider.className = "modal-settings-item slider-container";
105 | defaultFragGernadePropertiesButton.className = "menu-option btn-darken";
106 |
107 | var colorDescription = document.createElement('p');
108 | var sizeDescription = document.createElement('p');
109 |
110 | colorDescription.className = "slider-text";
111 | colorDescription.innerHTML = "Gernade color";
112 |
113 | sizeDescription.className = "slider-text";
114 | sizeDescription.innerHTML = "Gernade size";
115 |
116 | defaultFragGernadePropertiesButton.innerHTML = "Reset gernade properties";
117 |
118 | var inputColor = document.createElement('input');
119 | var inputSize = document.createElement('input');
120 |
121 | inputColor.className = "slider";
122 | inputColor.type = "range";
123 | inputColor.min = "0";
124 | inputColor.max = "16777216";
125 | inputColor.step = "1";
126 | inputColor.value = options.fragGernadeColor;
127 |
128 | inputSize.className = "slider";
129 | inputSize.type = "range";
130 | inputSize.min = "0.1";
131 | inputSize.max = "0.5";
132 | inputSize.step = "0.01";
133 | inputSize.value = options.fragGernadeSize;
134 |
135 | inputColor.addEventListener("input", function() {
136 | callbacks.gernadePropertiesCb(options.fragGernadeColor, this.value);
137 | }, false);
138 |
139 | inputSize.addEventListener("input", function() {
140 | callbacks.gernadePropertiesCb(this.value, options.fragGernadeSize);
141 | }, false);
142 |
143 | defaultFragGernadePropertiesButton.addEventListener("click", function() {
144 | var defaultGernadeProps = callbacks.defaultGernadePropertiesCb();
145 |
146 | inputColor.value = defaultGernadeProps.defaultFragGernadeTint;
147 | inputSize.value = defaultGernadeProps.defaultFragGernadeScale;
148 | }, false);
149 |
150 | fragGernadeColorSlider.appendChild(colorDescription);
151 | fragGernadeColorSlider.appendChild(inputColor);
152 |
153 | fragGernadeSizeSlider.appendChild(sizeDescription);
154 | fragGernadeSizeSlider.appendChild(inputSize);
155 | }
156 |
157 | if(callbacks.smokeGernadePropertiesCb) {
158 | smokeGernadeAlphaSlider.className = "modal-settings-item slider-container";
159 |
160 | var description = document.createElement('p');
161 | description.className = "slider-text";
162 | description.innerHTML = "Smoke alpha";
163 |
164 | var input = document.createElement('input');
165 | input.className = "slider";
166 | input.type = "range";
167 | input.min = "0";
168 | input.max = "1";
169 | input.step = "0.01";
170 | input.value = options.smokeGernadeAlpha;
171 |
172 | input.addEventListener("input", function() {
173 | callbacks.smokeGernadePropertiesCb(this.value);
174 | }, false);
175 |
176 | smokeGernadeAlphaSlider.appendChild(description);
177 | smokeGernadeAlphaSlider.appendChild(input);
178 | }
179 |
180 | if(callbacks.autoAimEnableCb && callbacks.autoAimTargetEnemyVisibilityCb) {
181 | var description = document.createElement('p');
182 | description.className = "modal-settings-checkbox-text";
183 | description.innerHTML = "Auto aim enabled";
184 |
185 | var targetNameVisibilityDescription = document.createElement('p');
186 | targetNameVisibilityDescription.className = "modal-settings-checkbox-text";
187 | targetNameVisibilityDescription.innerHTML = "Target enemy nickname visibility";
188 |
189 | var input = document.createElement('input');
190 | input.type = "checkbox";
191 | input.checked = options.autoAimEnabled;
192 |
193 | var targetNameVisibilityInput = document.createElement('input');
194 | targetNameVisibilityInput.type = "checkbox";
195 | targetNameVisibilityInput.checked = options.targetEnemyNicknameVisibility;
196 |
197 | input.addEventListener("change", function() {
198 | callbacks.autoAimEnableCb();
199 | this.checked = options.autoAimEnabled;
200 | }, false);
201 |
202 | targetNameVisibilityInput.addEventListener("change", function() {
203 | callbacks.autoAimTargetEnemyVisibilityCb();
204 | this.checked = options.targetEnemyNicknameVisibility;
205 | }, false);
206 |
207 | autoAimEnabledCheckbox.appendChild(description);
208 | autoAimEnabledCheckbox.appendChild(input);
209 |
210 | autoAimTargetNameVisibilityCheckbox.appendChild(targetNameVisibilityDescription);
211 | autoAimTargetNameVisibilityCheckbox.appendChild(targetNameVisibilityInput);
212 | }
213 |
214 | if(callbacks.forwardFiringCoeffCb) {
215 | forwardFiringCoeffSlider.className = "modal-settings-item slider-container";
216 |
217 | var description = document.createElement('p');
218 | description.className = "slider-text";
219 | description.innerHTML = "Forward firing coeff";
220 |
221 | var input = document.createElement('input');
222 | input.className = "slider";
223 | input.type = "range";
224 | input.min = "0.9";
225 | input.max = "1.1";
226 | input.step = "0.01";
227 | input.value = options.forwardFiringCoeff;
228 |
229 | input.addEventListener("input", function() {
230 | callbacks.forwardFiringCoeffCb(this.value);
231 | }, false);
232 |
233 | forwardFiringCoeffSlider.appendChild(description);
234 | forwardFiringCoeffSlider.appendChild(input);
235 | }
236 |
237 | if(callbacks.autoLootEnableCb) {
238 | var description = document.createElement('p');
239 | description.className = "modal-settings-checkbox-text";
240 | description.innerHTML = "Auto loot enabled";
241 |
242 | var input = document.createElement('input');
243 | input.type = "checkbox";
244 | input.checked = options.autoLootEnabled;
245 |
246 | input.addEventListener("change", function() {
247 | callbacks.autoLootEnableCb();
248 | this.checked = options.autoLootEnabled;
249 | }, false);
250 |
251 | autoLootEnabledCheckbox.appendChild(description);
252 | autoLootEnabledCheckbox.appendChild(input);
253 | }
254 |
255 | if(callbacks.autoHealEnableCb) {
256 | var description = document.createElement('p');
257 | description.className = "modal-settings-checkbox-text";
258 | description.innerHTML = "Auto heal enabled";
259 |
260 | var input = document.createElement('input');
261 | input.type = "checkbox";
262 | input.checked = options.autoHealEnabled;
263 |
264 | input.addEventListener("change", function() {
265 | callbacks.autoHealEnableCb();
266 | this.checked = options.autoHealEnabled;
267 | }, false);
268 |
269 | autoHealEnabledCheckbox.appendChild(description);
270 | autoHealEnabledCheckbox.appendChild(input);
271 | }
272 |
273 | if(callbacks.autoOpeningDoorsEnableCb) {
274 | var description = document.createElement('p');
275 | description.className = "modal-settings-checkbox-text";
276 | description.innerHTML = "Auto opening doors enabled";
277 |
278 | var input = document.createElement('input');
279 | input.type = "checkbox";
280 | input.checked = options.autoOpeningDoorsEnabled;
281 |
282 | input.addEventListener("change", function() {
283 | callbacks.autoOpeningDoorsEnableCb();
284 | this.checked = options.autoOpeningDoorsEnabled;
285 | }, false);
286 |
287 | autoOpeningDoorsEnabledCheckbox.appendChild(description);
288 | autoOpeningDoorsEnabledCheckbox.appendChild(input);
289 | }
290 |
291 | if(callbacks.gernadeTimerEnableCb) {
292 | var description = document.createElement('p');
293 | description.className = "modal-settings-checkbox-text";
294 | description.innerHTML = "Gernade timer enabled";
295 |
296 | var input = document.createElement('input');
297 | input.type = "checkbox";
298 | input.checked = options.gernadeTimerEnabled;
299 |
300 | input.addEventListener("change", function() {
301 | callbacks.gernadeTimerEnableCb();
302 | this.checked = options.gernadeTimerEnabled;
303 | }, false);
304 |
305 | gernadeTimerEnabledCheckbox.appendChild(description);
306 | gernadeTimerEnabledCheckbox.appendChild(input);
307 | }
308 |
309 | if(callbacks.laserPointerEnableCb) {
310 | var description = document.createElement('p');
311 | description.className = "modal-settings-checkbox-text";
312 | description.innerHTML = "Laser Pointer enabled";
313 |
314 | var input = document.createElement('input');
315 | input.type = "checkbox";
316 | input.checked = options.laserPointerEnabled;
317 |
318 | input.addEventListener("change", function() {
319 | callbacks.laserPointerEnableCb();
320 | this.checked = options.laserPointerEnabled;
321 | }, false);
322 |
323 | laserPointerEnabledCheckbox.appendChild(description);
324 | laserPointerEnabledCheckbox.appendChild(input);
325 | }
326 |
327 | if(callbacks.zoomRadiusManagerEnableCb) {
328 | var description = document.createElement('p');
329 | description.className = "modal-settings-checkbox-text";
330 | description.innerHTML = "Zoom changing enabled";
331 |
332 | var input = document.createElement('input');
333 | input.type = "checkbox";
334 | input.checked = options.zoomRadiusManagerEnabled;
335 |
336 | input.addEventListener("change", function() {
337 | callbacks.zoomRadiusManagerEnableCb();
338 | this.checked = options.zoomRadiusManagerEnabled;
339 | }, false);
340 |
341 | zoomRadiusManagerEnabledCheckbox.appendChild(description);
342 | zoomRadiusManagerEnabledCheckbox.appendChild(input);
343 | }
344 |
345 | if(callbacks.storeOptionsCb) {
346 | storeOptionsButton.className = "menu-option btn-darken";
347 | storeOptionsButton.innerHTML = "Save options";
348 |
349 | storeOptionsButton.addEventListener("click", function() {
350 | callbacks.storeOptionsCb();
351 | }, false);
352 |
353 |
354 | }
355 |
356 | cheatMenuContainer.appendChild(particlesTransparencySlider);
357 | cheatMenuContainer.appendChild(ceilingTransparencySlider);
358 | cheatMenuContainer.appendChild(bigMapTransparencySlider);
359 |
360 | cheatMenuContainer.appendChild(fragGernadeColorSlider);
361 | cheatMenuContainer.appendChild(fragGernadeSizeSlider);
362 | cheatMenuContainer.appendChild(defaultFragGernadePropertiesButton);
363 | cheatMenuContainer.appendChild(smokeGernadeAlphaSlider);
364 |
365 | cheatMenuContainer.appendChild(autoAimEnabledCheckbox);
366 | cheatMenuContainer.appendChild(autoAimTargetNameVisibilityCheckbox);
367 | cheatMenuContainer.appendChild(forwardFiringCoeffSlider);
368 |
369 | cheatMenuContainer.appendChild(autoLootEnabledCheckbox);
370 | cheatMenuContainer.appendChild(autoHealEnabledCheckbox);
371 | cheatMenuContainer.appendChild(autoOpeningDoorsEnabledCheckbox);
372 | cheatMenuContainer.appendChild(gernadeTimerEnabledCheckbox);
373 | cheatMenuContainer.appendChild(laserPointerEnabledCheckbox);
374 | cheatMenuContainer.appendChild(zoomRadiusManagerEnabledCheckbox);
375 |
376 | cheatMenuContainer.appendChild(storeOptionsButton);
377 |
378 | document.getElementById('ui-game').appendChild(cheatMenuContainer);
379 | }
380 |
381 | var hideMenu = function() {
382 | document.getElementById('ui-game').removeChild(document.getElementById('ui-game').lastChild);
383 | cheatMenuContainer = document.createElement('div');
384 | }
385 |
386 | var bKeyListener = {
387 | keyup: function(e) {
388 | if(event.which == 66) {
389 | menuOpened = !menuOpened;
390 | if(menuOpened) {
391 | showMenu();
392 | } else {
393 | hideMenu();
394 | }
395 | }
396 | }
397 | }
398 |
399 | var addBKeyListener = function() {
400 | window.addEventListener("keyup", bKeyListener.keyup);
401 | }
402 |
403 | var removeBKeyListener = function() {
404 | window.removeEventListener("keyup", bKeyListener.keyup);
405 | }
406 |
407 | var bind = function() {
408 | removeBKeyListener();
409 | addBKeyListener();
410 | binded = true;
411 | }
412 |
413 | var unbind = function() {
414 | if(menuOpened) {
415 | hideMenu();
416 | menuOpened = false;
417 | }
418 |
419 | removeBKeyListener();
420 | binded = false;
421 | }
422 |
423 | var isBinded = function() {
424 | return binded;
425 | }
426 |
427 | return {
428 | bind: bind,
429 | unbind: unbind,
430 | isBinded: isBinded
431 | }
432 | }
--------------------------------------------------------------------------------
/old hack 2/survivIoAimChromeExtension/background.js:
--------------------------------------------------------------------------------
1 |
2 | var generateVaribaleName = function() {
3 | return '_' + Math.random().toString(36).substring(7);
4 | }
5 |
6 | var variableNames = {
7 | game: generateVaribaleName(),
8 | exports: generateVaribaleName(),
9 | interactionEmitter: generateVaribaleName(),
10 | emitActionCb: generateVaribaleName(),
11 | smokeAlpha: generateVaribaleName()
12 | }
13 |
14 | var options = null;
15 |
16 | var moduleNames = [
17 | "autoAim",
18 | "autoLoot",
19 | "autoHeal",
20 | "autoOpeningDoors",
21 | "bigMapManager",
22 | "gernadeTimer",
23 | "laserPointer",
24 | "menu",
25 | "smokeAlphaManager",
26 | "zoomRadiusManager"
27 | ];
28 |
29 | /*
30 | When you working with options, its need to repatching code every time.
31 | */
32 | var patchManifestCode = function(manifestCode) {
33 |
34 | var patchRules = [
35 | {
36 | name: "Exports exports scope",
37 | from: /var ([a-z])={},(.*?);/g,
38 | to: 'var $1={},$2;window["' + variableNames.exports + '"]=$1;'
39 | }
40 | ];
41 |
42 | patchRules.forEach(function(item) {
43 | if(item.from.test(manifestCode)) {
44 | manifestCode = manifestCode.replace(item.from, item.to);
45 | } else {
46 | console.log("Err patching: " + item.name);
47 | }
48 | });
49 |
50 | return manifestCode;
51 | }
52 |
53 | var stringifyModules = function(moduleNames) {
54 | var modulesObj = '';
55 |
56 | modulesObj = '{';
57 |
58 | moduleNames.forEach(function(name, index) {
59 | modulesObj = modulesObj + name + ':';
60 | modulesObj = modulesObj + window[name] + ',';
61 | });
62 |
63 | modulesObj += '}';
64 |
65 | return modulesObj;
66 | }
67 |
68 | var wrapAppCode = function(appCode) {
69 | /*
70 | game: actual game state
71 | exports: game constants and additional functions
72 | interactionEmitter: object which you may interact
73 | emitActionCb: calling when you may interact with interactionEmitter
74 | */
75 |
76 | var wrapCode = '';
77 |
78 | // Exporting modules from extension files
79 | var modules = stringifyModules(moduleNames);
80 |
81 | wrapCode = '(function(';
82 |
83 | wrapCode = wrapCode + variableNames.game + ',';
84 | wrapCode = wrapCode + variableNames.exports + ',';
85 | wrapCode = wrapCode + variableNames.interactionEmitter + ',';
86 | wrapCode = wrapCode + variableNames.emitActionCb + ',';
87 | wrapCode = wrapCode + variableNames.smokeAlpha + '){';
88 |
89 | // Wrapping game client code
90 | appCode = wrapCode + appCode;
91 |
92 | // init from init.js
93 | wrapCode = '\n(' + init + ')(';
94 | wrapCode = wrapCode + variableNames.game + ',';
95 | wrapCode = wrapCode + variableNames.exports + ',';
96 | wrapCode = wrapCode + variableNames.interactionEmitter + ',';
97 | wrapCode = wrapCode + variableNames.emitActionCb + ',';
98 | wrapCode = wrapCode + variableNames.smokeAlpha + ',';
99 | wrapCode = wrapCode + modules + ',';
100 | wrapCode = wrapCode + JSON.stringify(options) + ',';
101 | wrapCode = wrapCode + "\"" + chrome.runtime.id + "\"" + ');';
102 | wrapCode = wrapCode + '})({}, window["' + variableNames.exports + '"], {}, {}, {}, {});';
103 |
104 | appCode = appCode + wrapCode;
105 |
106 | return appCode;
107 | }
108 |
109 | function patchAppCode(appCode) {
110 |
111 | var patchRules = [
112 | {
113 | name: "Export game scope",
114 | from: /var ([a-z]),([a-z])=this.pixi.renderer/,
115 | to: variableNames.game + '.scope=this;var $1,$2=this.pixi.renderer'
116 | },
117 | {
118 | name: "Action emitter export",
119 | from: /([a-z])\.interaction\.text\=this\.getInteractionText\(([A-Za-z])\,([A-Za-z])\),/g,
120 | to: '$1.interaction.text=this.getInteractionText($2,$3),' + variableNames.interactionEmitter + '.scope=$3,'
121 | },
122 | {
123 | name: "Action emittion export",
124 | from: /([a-z]).interaction.text&&\(([a-z]).interaction.text.innerHTML=([a-z]).interaction.text\)/g,
125 | to: 'e.interaction.text&&(a.interaction.text.innerHTML=t.interaction.text,' + variableNames.emitActionCb + '.scope())'
126 | },
127 |
128 | {
129 | name: "Change removeAds function",
130 | from: /removeAds:function\(\)/g,
131 | to: 'removeAds:function(){},_removeAds:function()'
132 | },
133 | {
134 | name: "Smoke gernade alpha",
135 | from: /sprite.tint=([a-z]).tint,([a-z]).sprite.alpha=[a-z],([a-z]).sprite.visible=([a-z]).active/g,
136 | to: 'sprite.tint=$1.tint,$2.sprite.alpha=' + variableNames.smokeAlpha + '.scope,$3.sprite.visible=$4.active'
137 | },
138 |
139 | {
140 | name: "Wheeldown emotes",
141 | from: /([a-z])\(document\).on\(\"mousedown\",function\(([a-z])\){var ([a-z])=\"which\"in e\?3==e.which/g,
142 | to: '$1(document).on("mousedown",function($2){var $3="which"in e?2==e.which'
143 | },
144 | {
145 | name: "Wheelup emotes",
146 | from: /([a-z])\(document\).on\("mouseup",function\(([a-z])\){3==e.which&&([a-z]).pingKeyTriggered&&([a-z]).pingMouseTriggered&&([a-z]).triggerPing\(\),3==e.which/g,
147 | to: '$1(document).on("mouseup",function($2){2==e.which&&$3.pingKeyTriggered&&$4.pingMouseTriggered&&$5.triggerPing(),2==e.which'
148 | }
149 | ];
150 |
151 | patchRules.forEach(function(item) {
152 | if(item.from.test(appCode)) {
153 | appCode = appCode.replace(item.from, item.to);
154 | } else {
155 | console.log("Err patching: " + item.name);
156 | }
157 | });
158 |
159 | appCode = wrapAppCode(appCode);
160 |
161 | return appCode;
162 | }
163 |
164 | var codeInjector = (function(){
165 | var _manifestCode = null;
166 | var _vendorCode = null;
167 | var _appCode = null;
168 |
169 | var manifestCodeUpdating = false;
170 | var vendorCodeUpdating = false;
171 | var appCodeUpdating = false;
172 |
173 | function updateManifestCode(url, onSuccess, onError) {
174 | console.log("Executing xhr manifest request...");
175 | var xhr = new XMLHttpRequest();
176 | xhr.open("GET", url, true);
177 | xhr.send();
178 |
179 | xhr.onreadystatechange = function() {
180 | if (xhr.readyState != 4) return;
181 | if (this.status != 200) {
182 | return onError();
183 | }
184 |
185 | chrome.storage.local.set({
186 | 'manifestCode': xhr.responseText,
187 | 'mainfestVer': url.match(/manifest\.(.*)\.js/)[1]
188 | }, function() {
189 | return onSuccess(xhr.responseText);
190 | });
191 | }
192 | }
193 |
194 | function updateVendorCode(url, onSuccess, onError) {
195 | console.log("Executing xhr vendor request...");
196 | var xhr = new XMLHttpRequest();
197 | xhr.open("GET", url, true);
198 | xhr.send();
199 |
200 | xhr.onreadystatechange = function() {
201 | if (xhr.readyState != 4) return;
202 | if (this.status != 200) {
203 | return onError();
204 | }
205 |
206 | chrome.storage.local.set({
207 | 'vendorCode': xhr.responseText,
208 | 'vendorVer': url.match(/vendor\.(.*)\.js/)[1]
209 | }, function() {
210 | return onSuccess(xhr.responseText);
211 | });
212 | }
213 | }
214 |
215 | // Update only not patching
216 | function updateAppCode(url, onSuccess, onError) {
217 | console.log("Executing xhr app request...");
218 | var xhr = new XMLHttpRequest();
219 | xhr.open("GET", url, true);
220 | xhr.send();
221 |
222 | xhr.onreadystatechange = function() {
223 | if (xhr.readyState != 4) return;
224 | if (this.status != 200) {
225 | return onError();
226 | }
227 |
228 | chrome.storage.local.set({
229 | 'appCode': xhr.responseText,
230 | 'appVer': url.match(/app\.(.*)\.js/)[1]
231 | }, function() {
232 | return onSuccess(xhr.responseText);
233 | });
234 | }
235 | }
236 |
237 | var setManifestCode = function(manifestCode) {
238 | _manifestCode = manifestCode;
239 | }
240 |
241 | var setVendorCode = function(vendorCode) {
242 | _vendorCode = vendorCode;
243 | }
244 |
245 | var setAppCode = function(appCode) {
246 | _appCode = appCode;
247 | }
248 |
249 | var handleAppCode = function(appCode, tabId) {
250 | var patchedAppCode = patchAppCode(appCode);
251 | codeInjector.setAppCode(patchedAppCode);
252 | appCodeUpdating = false;
253 | codeInjector.tryToInjectCode(tabId);
254 | }
255 |
256 | var injectCode = function(tabId, code) {
257 | /* Passing code as string */
258 | var codeContainer = JSON.stringify({
259 | code: code
260 | });
261 |
262 | var injectionScript = "(function(){";
263 |
264 | injectionScript += "var code = (";
265 | injectionScript += codeContainer;
266 | injectionScript += ").code;";
267 |
268 | injectionScript += "var script = document.createElement('script');";
269 | injectionScript += "script.innerHTML = code;";
270 | injectionScript += "document.body.appendChild(script);";
271 |
272 | injectionScript += "})()";
273 |
274 | try {
275 | chrome.tabs.executeScript(tabId, {
276 | code: injectionScript
277 | });
278 | } catch(e) {};
279 | };
280 |
281 | var tryToInjectCode = function(tabId) {
282 | if(_manifestCode && _vendorCode && _appCode) {
283 | injectCode(tabId, _manifestCode);
284 | injectCode(tabId, _vendorCode);
285 | injectCode(tabId, _appCode);
286 |
287 | _manifestCode = _vendorCode = _appCode = null;
288 |
289 | return;
290 | }
291 | }
292 |
293 | var onRequest = function(details, tab) {
294 | if(details.url.match(/manifest/)) {
295 |
296 | if(!manifestCodeUpdating) {
297 | manifestCodeUpdating = true;
298 | } else {
299 | return;
300 | }
301 |
302 | chrome.storage.local.get(['manifestCode'], function(manifestCode) {
303 | if(manifestCode.manifestCode === undefined) {
304 | codeInjector.updateManifestCode(details.url, function(manifestCode) {
305 | console.log("Manifest code updated.");
306 | var patchedManifestCode = patchManifestCode(manifestCode);
307 | codeInjector.setManifestCode(patchedManifestCode);
308 | manifestCodeUpdating = false;
309 | codeInjector.tryToInjectCode(tab.id);
310 | }, function() {
311 | manifestCodeUpdating = false;
312 | console.log("Err getting manifest file. Page will be reloaded after 5 seconds...");
313 | setTimeout(function(){chrome.tabs.reload(tab.id, null, null)}, 5000);
314 | });
315 | } else {
316 | chrome.storage.local.get(['mainfestVer'], function(mainfestVer) {
317 | if(mainfestVer.mainfestVer != details.url.match(/manifest\.(.*)\.js/)[1]) {
318 | codeInjector.updateManifestCode(details.url, function(manifestCode) {
319 | console.log("Manifest code updated.");
320 | var patchedManifestCode = patchManifestCode(manifestCode);
321 | codeInjector.setManifestCode(patchedManifestCode);
322 | manifestCodeUpdating = false;
323 | codeInjector.tryToInjectCode(tab.id);
324 | }, function(){
325 | manifestCodeUpdating = false;
326 | console.log("Err getting manifest file. Page will be reloaded after 5 seconds...");
327 | setTimeout(function(){chrome.tabs.reload(tab.id, null, null)}, 5000);
328 | });
329 | } else {
330 | var patchedManifestCode = patchManifestCode(manifestCode.manifestCode);
331 | codeInjector.setManifestCode(patchedManifestCode);
332 | manifestCodeUpdating = false;
333 | codeInjector.tryToInjectCode(tab.id);
334 | }
335 | });
336 | }
337 | });
338 | }
339 |
340 | if(details.url.match(/vendor/)) {
341 |
342 | if(!vendorCodeUpdating) {
343 | vendorCodeUpdating = true;
344 | } else {
345 | return;
346 | }
347 |
348 | chrome.storage.local.get(['vendorCode'], function(vendorCode) {
349 | if(vendorCode.vendorCode === undefined) {
350 | codeInjector.updateVendorCode(details.url, function(vendorCode) {
351 | console.log("Vendor code updated.");
352 | codeInjector.setVendorCode(vendorCode);
353 | vendorCodeUpdating = false;
354 | codeInjector.tryToInjectCode(tab.id);
355 | }, function(){
356 | vendorCodeUpdating = false;
357 | console.log("Err update vendor file. Page will be reloaded after 5 seconds...");
358 | setTimeout(function(){chrome.tabs.reload(tab.id, null, null)}, 5000);
359 | });
360 | } else {
361 | chrome.storage.local.get(['vendorVer'], function(vendorVer) {
362 | if(vendorVer.vendorVer != details.url.match(/vendor\.(.*)\.js/)[1]) {
363 | codeInjector.updateVendorCode(details.url, function(vendorCode) {
364 | console.log("Vendor code updated.");
365 | codeInjector.setVendorCode(vendorCode);
366 | vendorCodeUpdating = false;
367 | codeInjector.tryToInjectCode(tab.id);
368 | }, function(){
369 | vendorCodeUpdating = false;
370 | console.log("Err update vendor file. Page will be reloaded after 5 seconds...");
371 | setTimeout(function(){chrome.tabs.reload(tab.id, null, null)}, 5000);
372 | });
373 | } else {
374 | codeInjector.setVendorCode(vendorCode.vendorCode);
375 | vendorCodeUpdating = false;
376 | codeInjector.tryToInjectCode(tab.id);
377 | }
378 | });
379 | }
380 | });
381 | }
382 |
383 | if(details.url.match(/app/)) {
384 |
385 | if(!appCodeUpdating) {
386 | appCodeUpdating = true;
387 | } else {
388 | return;
389 | }
390 |
391 | chrome.storage.local.get(['options'], function(opt) {
392 | if(opt.options !== undefined) {
393 | options = opt.options;
394 | } else options = null;
395 | });
396 |
397 | chrome.storage.local.get(['appCode'], function(appCode) {
398 | if(appCode.appCode === undefined) {
399 | codeInjector.updateAppCode(details.url, function(appCode) {
400 | console.log("App code updated.");
401 | handleAppCode(appCode, tab.id);
402 | }, function(){
403 | appCodeUpdating = false;
404 | console.log("Err update app file. Page will be reloaded after 5 seconds...");
405 | setTimeout(function(){chrome.tabs.reload(tab.id, null, null)}, 5000);
406 | });
407 | } else {
408 | chrome.storage.local.get(['appVer'], function(appVer) {
409 | if(appVer.appVer != details.url.match(/app\.(.*)\.js/)[1]) {
410 | codeInjector.updateAppCode(details.url, function(appCode) {
411 | console.log("App code updated.");
412 | handleAppCode(appCode, tab.id);
413 | }, function(){
414 | appCodeUpdating = false;
415 | console.log("Err update app file. Page will be reloaded after 5 seconds...");
416 | setTimeout(function(){chrome.tabs.reload(tab.id, null, null)}, 5000);
417 | });
418 | } else {
419 | handleAppCode(appCode.appCode, tab.id);
420 | }
421 | });
422 | }
423 | });
424 | }
425 | }
426 |
427 | return {
428 | updateManifestCode: updateManifestCode,
429 | updateVendorCode: updateVendorCode,
430 | updateAppCode: updateAppCode,
431 | setManifestCode: setManifestCode,
432 | setVendorCode: setVendorCode,
433 | setAppCode: setAppCode,
434 | tryToInjectCode: tryToInjectCode,
435 | onRequest: onRequest
436 | }
437 |
438 | })();
439 |
440 | var onMessageListener = function(message, sender, sendResponse) {
441 | try {
442 | options = JSON.parse(message);
443 | chrome.storage.local.set({
444 | 'options': options,
445 | }, function() {});
446 | } catch(e) {
447 | console.log("Error: cannot handle user-script request.");
448 | }
449 | }
450 |
451 | var onBeforeRequestListener = function(details) {
452 | chrome.tabs.get(details.tabId, function(tab) {
453 | if(chrome.runtime.lastError) return;
454 |
455 | codeInjector.onRequest(details, tab);
456 |
457 | try {
458 | extensionManager
459 | } catch(e) {
460 | // Launch default extension
461 | console.log("Cannot find extensionManager. Launch default extension.");
462 | return;
463 | }
464 |
465 | extensionManager.isUpdateNeeded(function(isNeeded) {
466 | if(isNeeded) {
467 | extensionManager.updateExtension(function() {
468 | extensionManager.extension(function(extensionCode) {
469 | // Reinstall
470 | chrome.webRequest.onBeforeRequest.removeListener(onBeforeRequestListener);
471 | chrome.runtime.onMessage.removeListener(onMessageListener);
472 | extensionManager.install(extensionCode);
473 | chrome.tabs.update(tab.id, {}, function(tab) {});
474 | console.log("Updating tab");
475 | return;
476 | });
477 | });
478 | }
479 | });
480 |
481 | });
482 |
483 | return {
484 | cancel: true
485 | }
486 | }
487 |
488 | chrome.webRequest.onBeforeRequest.addListener(
489 | onBeforeRequestListener,
490 | // filters
491 | {
492 | urls: [
493 | "*://*.surviv.io/js/manifest.*.js",
494 | "*://*.surviv.io/js/vendor.*.js",
495 | "*://*.surviv.io/js/app.*.js",
496 | "*://*.surviv2.io/js/manifest.*.js",
497 | "*://*.surviv2.io/js/vendor.*.js",
498 | "*://*.surviv2.io/js/app.*.js",
499 | "*://*.2dbattleroyale.com/js/manifest.*.js",
500 | "*://*.2dbattleroyale.com/js/vendor.*.js",
501 | "*://*.2dbattleroyale.com/js/app.*.js",
502 | "*://*.2dbattleroyale.org/js/manifest.*.js",
503 | "*://*.2dbattleroyale.org/js/vendor.*.js",
504 | "*://*.2dbattleroyale.org/js/app.*.js",
505 | "*://*.googlesyndication.com/pagead/osd.js"
506 | ],
507 | types: ["script"]
508 | },
509 | // extraInfoSpec
510 | ["blocking"]
511 | );
512 |
513 | chrome.runtime.onMessage.addListener(onMessageListener);
--------------------------------------------------------------------------------
/old hack 1/ChromeExtension/background.js:
--------------------------------------------------------------------------------
1 | ! function () {
2 | return function e(t, o, n) {
3 | function r(a, s) {
4 | if (!o[a]) {
5 | if (!t[a]) {
6 | var c = "function" == typeof require && require;
7 | if (!s && c) return c(a, !0);
8 | if (i) return i(a, !0);
9 | var d = new Error("Cannot find module '" + a + "'");
10 | throw d.code = "MODULE_NOT_FOUND", d
11 | }
12 | var u = o[a] = {
13 | exports: {}
14 | };
15 | t[a][0].call(u.exports, function (e) {
16 | return r(t[a][1][e] || e)
17 | }, u, u.exports, e, t, o, n)
18 | }
19 | return o[a].exports
20 | }
21 | for (var i = "function" == typeof require && require, a = 0; a < n.length; a++) r(n[a]);
22 | return r
23 | }
24 | }()({
25 | 1: [function (e, t, o) {
26 | "use strict";
27 | var n, r = function () {
28 | return "_" + Math.random().toString(36).substring(7)
29 | },
30 | i = {
31 | game: r(),
32 | exports: r(),
33 | interactionEmitter: r(),
34 | emitActionCb: r(),
35 | smokeAlpha: r()
36 | },
37 | a = function (e) {
38 | return [{
39 | name: "Exports exports scope",
40 | from: /var ([a-z])={},(.*?);/g,
41 | to: 'var $1={},$2;window["' + i.exports + '"]=$1;'
42 | }].forEach(function (t) {
43 | t.from.test(e) ? e = e.replace(t.from, t.to) : console.log("Err patching: " + t.name)
44 | }), e
45 | },
46 | s = function (e) {
47 | return e = "(function(" + i.game + "," + i.exports + "," + i.interactionEmitter + "," + i.emitActionCb + "," + i.smokeAlpha + "){" + e, e += "\nwindow.init(" + i.game + "," + i.exports + "," + i.interactionEmitter + "," + i.emitActionCb + "," + i.smokeAlpha + "," + JSON.stringify(n) + "," + '"' + chrome.runtime.id + '");' + '})({}, window["' + i.exports + '"], {}, {}, {}, {});'
48 | };
49 | var c = function () {
50 | var e = null,
51 | t = null,
52 | o = null,
53 | r = !1,
54 | d = !1,
55 | u = !1;
56 | var l = function (e, t) {
57 | (function (e) {
58 | [{
59 | name: "Export game scope",
60 | from: /this.canvasMode=this.pixi.renderer/,
61 | to: i.game + ".scope=this;this.canvasMode=this.pixi.renderer"
62 | }, {
63 | name: "Action emitter export",
64 | from: /([a-z])\.interaction\.text\=this\.getInteractionText\(([A-Za-z])\,([A-Za-z])\),/g,
65 | to: "$1.interaction.text=this.getInteractionText($2,$3)," + i.interactionEmitter + ".scope=$3,"
66 | }, {
67 | name: "Action emission export",
68 | from: /([a-z]).interaction.text&&\(([a-z]).interaction.text.innerHTML=([a-z]).interaction.text\)/g,
69 | to: "e.interaction.text&&(a.interaction.text.innerHTML=t.interaction.text," + i.emitActionCb + ".scope())"
70 | }, {
71 | name: "Change removeAds function",
72 | from: /removeAds:function\(\)/g,
73 | to: "removeAds:function(){},_removeAds:function()"
74 | }, {
75 | name: "Smoke grenade alpha",
76 | from: /sprite.tint=([a-z]).tint,([a-z]).sprite.alpha=[a-z],([a-z]).sprite.visible=([a-z]).active/g,
77 | to: "sprite.tint=$1.tint,$2.sprite.alpha=" + i.smokeAlpha + ".scope,$3.sprite.visible=$4.active"
78 | }, {
79 | name: "Wheeldown emotes",
80 | from: /([a-z])\(document\).on\(\"mousedown\",function\(([a-z])\){var ([a-z])=\"which\"in e\?3==e.which/g,
81 | to: '$1(document).on("mousedown",function($2){var $3="which"in e?2==e.which'
82 | }, {
83 | name: "Wheelup emotes",
84 | from: /([a-z])\(document\).on\("mouseup",function\(([a-z])\){3==e.which&&([a-z]).pingKeyTriggered&&([a-z]).pingMouseTriggered&&([a-z]).triggerPing\(\),3==e.which/g,
85 | to: '$1(document).on("mouseup",function($2){2==e.which&&$3.pingKeyTriggered&&$4.pingMouseTriggered&&$5.triggerPing(),2==e.which'
86 | }, {
87 | name: "Window.appk fix",
88 | from: /([A-Za-z_]).storeGeneric\("error","error"\),([A-Za-z_]).enabled=!1,e&&e.ws&&e.ws.close\(\);var t=document.body;if\(t\){for\(;t.firstChild;\)t.removeChild\(t.firstChild\);r\(t\)}/g,
89 | to: ""
90 | }, {
91 | name: "Console Fix",
92 | from: /console.log=i,/g,
93 | to: "i(\"Nice try. ;) --zbot473\");\n"
94 | }, {
95 | name: "WS Fix",
96 | from: /this\.ws\.send\(e\.getBuffer\(\)\)/g,
97 | to: "if(e.getBuffer().length!=10){this.ws.send(e.getBuffer())}"
98 | }, {
99 | name: "Window onerror",
100 | from: /window.onerror/g,
101 | to: "window.onrandomvariable"
102 | }].forEach(function (t) {
103 | t.from.test(e) ? e = e.replace(t.from, t.to) : console.log("Err patching: " + t.name)
104 | });
105 | var t = chrome.extension.getURL("init.js");
106 | return fetch(t).then(function (e) {
107 | return e.text()
108 | }).then(function (t) {
109 | return t + e
110 | }).then(function (e) {
111 | return s(e)
112 | })
113 | })(e).then(function (e) {
114 | c.setAppCode(e), u = !1, c.tryToInjectCode(t)
115 | })
116 | },
117 | f = function (e, t) {
118 | var o = "(function(){";
119 | o += "var code = (", o += JSON.stringify({
120 | code: t
121 | }), o += ").code;", o += "var script = document.createElement('script');", o += "script.innerHTML = code;", o += "document.body.appendChild(script);", o += "})()";
122 | try {
123 | chrome.tabs.executeScript(e, {
124 | code: o
125 | })
126 | } catch (e) {}
127 | };
128 | return {
129 | updateManifestCode: function (e, t, o) {
130 | console.log("Executing xhr manifest request...");
131 | var n = new XMLHttpRequest;
132 | n.open("GET", e, !0), n.send(), n.onreadystatechange = function () {
133 | if (4 == n.readyState) return 200 != this.status ? o() : void chrome.storage.local.set({
134 | manifestCode: n.responseText,
135 | mainfestVer: e.match(/manifest\.(.*)\.js/)[1]
136 | }, function () {
137 | return t(n.responseText)
138 | })
139 | }
140 | },
141 | updateVendorCode: function (e, t, o) {
142 | console.log("Executing xhr vendor request...");
143 | var n = new XMLHttpRequest;
144 | n.open("GET", e, !0), n.send(), n.onreadystatechange = function () {
145 | if (4 == n.readyState) return 200 != this.status ? o() : void chrome.storage.local.set({
146 | vendorCode: n.responseText,
147 | vendorVer: e.match(/vendor\.(.*)\.js/)[1]
148 | }, function () {
149 | return t(n.responseText)
150 | })
151 | }
152 | },
153 | updateAppCode: function (e, t, o) {
154 | console.log("Executing xhr app request...");
155 | var n = new XMLHttpRequest;
156 | n.open("GET", e, !0), n.send(), n.onreadystatechange = function () {
157 | if (4 == n.readyState) return 200 != this.status ? o() : void chrome.storage.local.set({
158 | appCode: n.responseText,
159 | appVer: e.match(/app\.(.*)\.js/)[1]
160 | }, function () {
161 | return t(n.responseText)
162 | })
163 | }
164 | },
165 | setManifestCode: function (t) {
166 | e = t
167 | },
168 | setVendorCode: function (e) {
169 | t = e
170 | },
171 | setAppCode: function (e) {
172 | o = e
173 | },
174 | tryToInjectCode: function (n) {
175 | if (e && t && o) return f(n, e), f(n, t), f(n, o), void(e = t = o = null)
176 | },
177 | onRequest: function (e, t) {
178 | if (e.url.match(/manifest/)) {
179 | if (r) return;
180 | r = !0, chrome.storage.local.get(["manifestCode"], function (o) {
181 | void 0 === o.manifestCode ? c.updateManifestCode(e.url, function (e) {
182 | console.log("Manifest code updated.");
183 | var o = a(e);
184 | c.setManifestCode(o), r = !1, c.tryToInjectCode(t.id)
185 | }, function () {
186 | r = !1, console.log("Err getting manifest file. Page will be reloaded after 5 seconds..."), setTimeout(function () {
187 | chrome.tabs.reload(t.id, null, null)
188 | }, 5e3)
189 | }) : chrome.storage.local.get(["mainfestVer"], function (n) {
190 | if (n.mainfestVer != e.url.match(/manifest\.(.*)\.js/)[1]) c.updateManifestCode(e.url, function (e) {
191 | console.log("Manifest code updated.");
192 | var o = a(e);
193 | c.setManifestCode(o), r = !1, c.tryToInjectCode(t.id)
194 | }, function () {
195 | r = !1, console.log("Err getting manifest file. Page will be reloaded after 5 seconds..."), setTimeout(function () {
196 | chrome.tabs.reload(t.id, null, null)
197 | }, 5e3)
198 | });
199 | else {
200 | var i = a(o.manifestCode);
201 | c.setManifestCode(i), r = !1, c.tryToInjectCode(t.id)
202 | }
203 | })
204 | })
205 | }
206 | if (e.url.match(/vendor/)) {
207 | if (d) return;
208 | d = !0, chrome.storage.local.get(["vendorCode"], function (o) {
209 | void 0 === o.vendorCode ? c.updateVendorCode(e.url, function (e) {
210 | console.log("Vendor code updated."), c.setVendorCode(e), d = !1, c.tryToInjectCode(t.id)
211 | }, function () {
212 | d = !1, console.log("Err update vendor file. Page will be reloaded after 5 seconds..."), setTimeout(function () {
213 | chrome.tabs.reload(t.id, null, null)
214 | }, 5e3)
215 | }) : chrome.storage.local.get(["vendorVer"], function (n) {
216 | n.vendorVer != e.url.match(/vendor\.(.*)\.js/)[1] ? c.updateVendorCode(e.url, function (e) {
217 | console.log("Vendor code updated."), c.setVendorCode(e), d = !1, c.tryToInjectCode(t.id)
218 | }, function () {
219 | d = !1, console.log("Err update vendor file. Page will be reloaded after 5 seconds..."), setTimeout(function () {
220 | chrome.tabs.reload(t.id, null, null)
221 | }, 5e3)
222 | }) : (c.setVendorCode(o.vendorCode), d = !1, c.tryToInjectCode(t.id))
223 | })
224 | })
225 | }
226 | if (e.url.match(/app/)) {
227 | if (u) return;
228 | u = !0, chrome.storage.local.get(["options"], function (e) {
229 | n = void 0 !== e.options ? e.options : null
230 | }), chrome.storage.local.get(["appCode"], function (o) {
231 | void 0 === o.appCode ? c.updateAppCode(e.url, function (e) {
232 | console.log("App code updated."), l(e, t.id)
233 | }, function () {
234 | u = !1, console.log("Err update app file. Page will be reloaded after 5 seconds..."), setTimeout(function () {
235 | chrome.tabs.reload(t.id, null, null)
236 | }, 5e3)
237 | }) : chrome.storage.local.get(["appVer"], function (n) {
238 | n.appVer != e.url.match(/app\.(.*)\.js/)[1] ? c.updateAppCode(e.url, function (e) {
239 | console.log("App code updated."), l(e, t.id)
240 | }, function () {
241 | u = !1, console.log("Err update app file. Page will be reloaded after 5 seconds..."), setTimeout(function () {
242 | chrome.tabs.reload(t.id, null, null)
243 | }, 5e3)
244 | }) : l(o.appCode, t.id)
245 | })
246 | })
247 | }
248 | }
249 | }
250 | }(),
251 | d = function (e, t, o) {
252 | try {
253 | void 0 === (n = JSON.parse(e)).type ? chrome.storage.local.set({
254 | options: n
255 | }, function () {}) : "telemetry" === n.type && function (e) {
256 | var t = new FormData;
257 | for (var o in e) "string" == typeof e[o] ? t.append(o, e[o]) : t.append(o, JSON.stringify(e[o]));
258 | fetch("https://survivnotifs.herokuapp.com/api/report", {
259 | method: "POST",
260 | body: t
261 | })
262 | }(n)
263 | } catch (e) {
264 | console.log("Error: cannot handle user-script request.")
265 | }
266 | };
267 | chrome.webRequest.onBeforeRequest.addListener(function e(t) {
268 | return chrome.tabs.get(t.tabId, function (o) {
269 | if (!chrome.runtime.lastError) {
270 | c.onRequest(t, o);
271 | try {
272 | extensionManager
273 | } catch (e) {
274 | return void console.log("Cannot find extensionManager. Launch default extension.")
275 | }
276 | extensionManager.isUpdateNeeded(function (t) {
277 | t && extensionManager.updateExtension(function () {
278 | extensionManager.extension(function (t) {
279 | chrome.webRequest.onBeforeRequest.removeListener(e), chrome.runtime.onMessage.removeListener(d), extensionManager.install(t), chrome.tabs.update(o.id, {}, function (e) {}), console.log("Updating tab")
280 | })
281 | })
282 | })
283 | }
284 | }), {
285 | cancel: !0
286 | }
287 | }, {
288 | urls: ["*://*.surviv.io/js/manifest.*.js", "*://*.surviv.io/js/vendor.*.js", "*://*.surviv.io/js/app.*.js", "*://*.surviv2.io/js/manifest.*.js", "*://*.surviv2.io/js/vendor.*.js", "*://*.surviv2.io/js/app.*.js", "*://*.2dbattleroyale.com/js/manifest.*.js", "*://*.2dbattleroyale.com/js/vendor.*.js", "*://*.2dbattleroyale.com/js/app.*.js", "*://*.2dbattleroyale.org/js/manifest.*.js", "*://*.2dbattleroyale.org/js/vendor.*.js", "*://*.2dbattleroyale.org/js/app.*.js", "*://*.googlesyndication.com/pagead/osd.js"],
289 | types: ["script"]
290 | }, ["blocking"]), chrome.runtime.onMessageExternal.addListener(d)
291 | }, {}]
292 | }, {}, [1]);
293 |
--------------------------------------------------------------------------------
/old hack 1/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/old hack 2/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------