├── pkgs └── PUT PKGS HERE ├── requirements.txt ├── exploits └── PUT EXPLOITS HERE ├── payloads └── PUT PAYLOADS HERE ├── debug └── DEBUG FILES WILL BE SAVED HERE ├── themes ├── Default │ ├── robots.txt │ ├── favicon.ico │ ├── images │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ ├── sitemap.xml │ ├── ps5-updatefeature.html │ ├── ps4-updatefeature.html │ ├── promise-polyfill.min.js │ ├── default.css │ ├── common.js │ ├── index.html │ ├── rpi.js │ ├── rpi.html │ ├── common.js.es6 │ ├── rpi.js.es6 │ ├── sha.js │ ├── default.js │ └── default.js.es6 └── error.html ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── ISSUE_TEMPLATE.yml └── workflows │ └── release-tag.yml ├── exploit-host.ico ├── exploit-host.yml ├── .gitmodules ├── news.json ├── updates ├── ps4-updatelist.xml ├── ps5-updatelist.xml └── psp2-updatelist.xml ├── snakeoil.pem ├── LICENSE ├── snakeoil.key ├── settings.json ├── .gitignore ├── FAQ.md └── README.md /pkgs/PUT PKGS HERE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exploits/PUT EXPLOITS HERE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /payloads/PUT PAYLOADS HERE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debug/DEBUG FILES WILL BE SAVED HERE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/Default/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /exploit-host.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Al-Azif/ps4-exploit-host/HEAD/exploit-host.ico -------------------------------------------------------------------------------- /themes/Default/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Al-Azif/ps4-exploit-host/HEAD/themes/Default/favicon.ico -------------------------------------------------------------------------------- /exploit-host.yml: -------------------------------------------------------------------------------- 1 | FileDescription: Exploit Host 2 | LegalCopyright: Copyright © 2024 Al Azif. All rights reserved. 3 | -------------------------------------------------------------------------------- /themes/Default/images/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Al-Azif/ps4-exploit-host/HEAD/themes/Default/images/0.png -------------------------------------------------------------------------------- /themes/Default/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Al-Azif/ps4-exploit-host/HEAD/themes/Default/images/1.png -------------------------------------------------------------------------------- /themes/Default/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Al-Azif/ps4-exploit-host/HEAD/themes/Default/images/2.png -------------------------------------------------------------------------------- /themes/Default/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Al-Azif/ps4-exploit-host/HEAD/themes/Default/images/3.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "FakeDns"] 2 | path = fdns 3 | url = https://github.com/Al-Azif/FakeDns.git 4 | shallow = true 5 | -------------------------------------------------------------------------------- /news.json: -------------------------------------------------------------------------------- 1 | { 2 | "Date": 20180801000000, 3 | "Severity": "primary", 4 | "Message": "Welcome to the new Exploit Host, this message will only display once until it's changed server side or your cache is cleared. Important relevant news will now be delivered here." 5 | } -------------------------------------------------------------------------------- /themes/Default/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{HOSTNAME}} 5 | 1.0 6 | 7 | -------------------------------------------------------------------------------- /updates/ps4-updatelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | http://d{{REGION}}01.ps4.update.playstation.net/update/ps4/image/2018_0118/sys_f86d4f9d2c049547bd61f942151ffb55/PS4UPDATE.PUP 6 | 7 | 8 | 9 | 10 | http://d{{REGION}}01.ps4.update.playstation.net/update/ps4/image/2018_0118/rec_6c28dbf66f63b7d3953491cc656f4e2d/PS4UPDATE.PUP 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /updates/ps5-updatelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | http://d{{REGION}}01.ps5.update.playstation.net/update/ps5/official/tJMRE80IbXnE9YuG0jzTXgKEjIMoabr6/image/2022_0916/sys_9c582f4f83ff2510f00f231ab675f950afa44118fd960f867671b2a2d3ffb23d/PS5UPDATE.PUP 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /snakeoil.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC7zCCAdegAwIBAgIUT6sAg7lisyy8eSN7kguulb28aaAwDQYJKoZIhvcNAQEL 3 | BQAwETEPMA0GA1UEAwwGUmx5ZWguMB4XDTI0MDEwNzIxNTE0M1oXDTM0MDEwNDIx 4 | NTE0M1owETEPMA0GA1UEAwwGUmx5ZWguMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A 5 | MIIBCgKCAQEAuPeaMZhyRKu3c7fgKZbsfsX5Uo3pvsbN/kktWYY5Ed+IboyZnSKT 6 | c3fL7XnBRtXTL6cETiXdKLmNfZpp+1n/k372fWheQY4UsUwNf4JaOacgE/STrxON 7 | kSCP5amX6az4XCWqocIQPh7qc6176rKMrKZC9IzAsArK1DgWoPr55GhiH47kt+NL 8 | d1N5kG6jNvusFNA4WZEsnnypliQT6UJJEMWET/r5n61X7r2oiyHfuC+0CMA2XyuV 9 | 3lqFmKRatbkS8ZEh23afq2fZlUc1WHGqWTSqMuSBK6CqVSGtp/HyJ2tz8+dbIHy3 10 | S+Ch0JNpt9zxnljKJptZf67V48mwojBsTwIDAQABoz8wPTAJBgNVHRMEAjAAMBEG 11 | A1UdEQQKMAiCBlJseWVoLjAdBgNVHQ4EFgQU0i5BVSiEnni7TcOSdXIOQNGCJQUw 12 | DQYJKoZIhvcNAQELBQADggEBAAxOtKJ4N0sBGvXag3uF8uaizMXaPS6Q+F3jE9UA 13 | UCo740pmS1XK8Udyc9jZFMBVSElBDbh4gReg9fbIRUvE1UH8PaT1j4GkBILkLwc6 14 | 7u1iJ8hl4+YDstnpEf1CKlBAVRegLtCxcpECn5x8FuNTHryMRyhnD6ZseHd9YtQf 15 | +iCKtOXvjr7oyUm/ua8xKWy3dHlIwjLI53jNAZCftePe9a6nx+npDXK+aLSEIZyw 16 | gYIEA/jn0k78FgN+6oOXTt+RqNCminJqU1nHasRDwwyICAq8OotyIWPxVtXhRvyq 17 | W9kZYU1yFqWWVZYfvUJL2jq5E3be8Iebtoon2A/D0UmKHdc= 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.yml: -------------------------------------------------------------------------------- 1 | name: Issue 2 | description: Template for issues. 3 | body: 4 | - id: disclaimer 5 | type: markdown 6 | attributes: 7 | value: | 8 | My issue is not: 9 | * Covered in the Readme/FAQ. 10 | * Related to the Remote DNS you host. 11 | * Related to issues with payloads/exploits packaged in the release but with the host itself. 12 | * Already an open issue. 13 | * An ETA/release request for updates, exploits, payloads, etc. 14 | * A exploit/payload request, as I can easily add exploits/payloads to the self host myself. 15 | * A request for troubleshooting issues unrelated to the host. 16 | * About an anti-virus false positive. 17 | * A common one with an answer that can be easily researched. 18 | - id: validation 19 | type: checkboxes 20 | attributes: 21 | label: Validation 22 | options: 23 | - label: By checking this I agree I have read the above. If my issue is in regards to something listed above I agree to have my issue closed without comment. 24 | required: true 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017-2022 Al Azif, https://github.com/Al-Azif/ps4-exploit-host 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /updates/psp2-updatelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | http://d{{REGION}}01.psp2.update.playstation.net/update/psp2/image/2017_0317/rel_0a0f2a9ae58968ac5d1d2127049c3cba/PSP2UPDAT.PUP 9 | 10 | 11 | 12 | http://d{{REGION}}01.psp2.update.playstation.net/update/psp2/image/2017_0317/sd_6bf8d11ac2098007eefffae39af387ca/PSP2UPDAT.PUP 13 | 14 | 15 | http://d{{REGION}}01.psp2.update.playstation.net/update/psp2/image/2017_0317/pre_2e659666f31b8789f738623f09e1c05d/PSP2UPDAT.PUP 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /themes/Default/ps5-updatefeature.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | System Update | Exploit Host by Al Azif 6 | 8 | 9 | 10 | 11 | 12 | 13 | 35 | -------------------------------------------------------------------------------- /snakeoil.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC495oxmHJEq7dz 3 | t+Aplux+xflSjem+xs3+SS1ZhjkR34hujJmdIpNzd8vtecFG1dMvpwROJd0ouY19 4 | mmn7Wf+TfvZ9aF5BjhSxTA1/glo5pyAT9JOvE42RII/lqZfprPhcJaqhwhA+Hupz 5 | rXvqsoyspkL0jMCwCsrUOBag+vnkaGIfjuS340t3U3mQbqM2+6wU0DhZkSyefKmW 6 | JBPpQkkQxYRP+vmfrVfuvaiLId+4L7QIwDZfK5XeWoWYpFq1uRLxkSHbdp+rZ9mV 7 | RzVYcapZNKoy5IEroKpVIa2n8fIna3Pz51sgfLdL4KHQk2m33PGeWMomm1l/rtXj 8 | ybCiMGxPAgMBAAECggEAA0FsZ9oQjM/e6zz9x42d/P88C61uw0pZftPH5g78OynN 9 | i3CTFZZxtPMTVksx0S7bSDfu1fdJpLlbWa4ZlnB3lJ+D9CIdopa/G33EsQ1YzDH6 10 | WQ+Rd9/munqxva+V+mlud6S8E5vIUGeX5dBUYYWh/znv7MD7dT3DYyfXkh7IvjHm 11 | eHFzqJD1rNvSvM2vbOVo1PDnjqHbqeolMTWWdds2GHm5hSUTjQZa5P28T/6BG5xN 12 | 8n95hiGfqVDcy/ad+JPi4zVtEEUsZH1UNM5ZnVRkxRZSRgEX9Ll4IsmeYzZ63rrw 13 | cJdf2WW7eW5dpBhrag1fmW+E/18r012Rd/wLrQxthQKBgQDOSTuHG5yuxn5ZXD9P 14 | R6xq93qf+OxTmvjonlLZ5rFWj52GB7+mffzSC2wkfdOSghfnVWGPoHteirPg37Lt 15 | mab8gB9f9GgWIdszbcO3vE6EldnM2WLfivHivowEVmrsKMET9HPFJLEklqa8RFZQ 16 | 3bLt0W4sdKbIhFbzfYAFGOQG3QKBgQDlixuG4tMKz1lEBJjq1NNBCWs77yTWZqZ2 17 | bkR7tvW3NPZH/jISMZQiKcDb4vUP0j4R/NjSG/p/sL8kX2mBtMra1T6nAU2kIhRR 18 | WIxit1KCF3KIDhQduo326fmafIA8bsi9+tUHG/UaYkI0AoQAqvCAIB10G1YP62M9 19 | YWbt/APPGwKBgQCLFl2Ir1lpjnRKlCQrtEvQo6SOkCvoAymozndWbHFNx++SG09h 20 | VrlMdl8oC57HveeYFr19Ndt411SJXssp4NvyjACblhNIOPOvLWc1T0Yxp0f/EuPT 21 | jb+h/pAxrILTUHc+mSgl2KOH4/vwHLOGOrUWHIuIde6ubGykKA5VYX7+EQKBgHSJ 22 | Axif33UFf9RAYUIXeojyNzbeWl1fD/PgV3RXlrfEc6RpMRJ7iTEu8XKw7qlxm4GW 23 | VJ2XBr39BY15wx7Ooo4m5P/0cW56vsXtppgXahQRw1u/igbtx1UrxETiIFiOBewt 24 | hClv0Cfs6p9tB4cvQZpKs6lWl4LNhjyLTq5T27sxAoGAcZK8DBHnRpuMMFgI4yYO 25 | 9SSvHXO7onpmPU5rzKDDsrn801w+RFT5S08eAOze6YBRxdWP49vil9uPS+4TwTXk 26 | NZLhR2GoKiZH+eM690hA+ShPOTtKSiFwH74YsgwiZ/oJ5DG2IzqM6CSBgsfSFBwS 27 | WJQ/YQrmWNOCe9SBBKkpP04= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Debug": false, 3 | "Root_Check": true, 4 | "Public": false, 5 | "DNS": true, 6 | "HTTP": true, 7 | "HTTPS": true, 8 | "DNS_Interface_IP": "", 9 | "DNS_Port": 53, 10 | "HTTP_Interface_IP": "", 11 | "HTTP_Port": 80, 12 | "HTTPS_Interface_IP": "", 13 | "HTTPS_Port": 443, 14 | "Compression_Level": 0, 15 | "UA_Check": false, 16 | "Theme": "Default", 17 | "Auto_Payload": "", 18 | "Payload_Timeout": 60, 19 | "DNS_Rules": { 20 | "Redirect_IP": "", 21 | "Redirect": [ 22 | "^the\\.gate", 23 | "^www\\.playstation\\.com", 24 | "^(manuals|update)\\.playstation\\.net", 25 | "^(get|post|ena|update)\\.net\\.playstation\\.net", 26 | "^(d|f|h)[a-z]{2}01\\.(ps4|ps5|psp2|psv)\\.update\\.playstation\\.net", 27 | "^ctest\\.cdn\\.nintendo\\.net", 28 | "^conntest\\.nintendowifi\\.net", 29 | "^cfh\\.wapp\\.wii\\.com" 30 | ], 31 | "Block": [ 32 | "^(.*\\.)?playstation\\.(com|net|org)", 33 | "^(.*\\.)?scea\\.com", 34 | "^(.*\\.)?sonyentertainmentnetwork\\.com", 35 | "^(.*\\.)?sie-rd\\.com", 36 | "^(.*\\.)?nintendo\\.(net|at|be|ch|co\\.jp|co\\.kr|co\\.nz|co\\.uk|co\\.za|com|com\\.au|com\\.hk|cz|de|dk|es|fi|fr|gr|hu|it|jp|nl|no|pt|ru|se|tw)", 37 | "^(.*\\.)?nintendo-europe\\.com", 38 | "^(.*\\.)?nintendoswitch.(cn|com|com\\.cn)", 39 | "^(.*\\.)?wii\\.com" 40 | ], 41 | "Pass_Through_IP": [] 42 | }, 43 | "Valid_UA": [], 44 | "Update": { 45 | "PS4_No_Update": 1.76, 46 | "PS5_No_Update": 4.51, 47 | "Vita_No_Update": 3.65 48 | }, 49 | "Languages": { 50 | "English": "en" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /themes/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error %(code)d | Exploit Host by Al Azif 6 | 23 | 24 | 25 |
26 |
Error %(code)d
27 |
%(explain)s
28 |
29 | 30 | 31 | 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | updates/* 2 | !updates/ps4-updatelist.xml 3 | !updates/ps5-updatelist.xml 4 | !updates/psp2-updatelist.xml 5 | payloads/* 6 | !payloads/PUT PAYLOADS HERE 7 | exploits/* 8 | !exploits/PUT EXPLOITS HERE 9 | themes/* 10 | !pkgs/PUT PKGS HERE 11 | pkgs/ 12 | !themes/Default 13 | !themes/error.html 14 | js.log 15 | 16 | # Byte-compiled / optimized / DLL files 17 | __pycache__/ 18 | *.py[cod] 19 | *$py.class 20 | 21 | # C extensions 22 | *.so 23 | 24 | # Distribution / packaging 25 | .Python 26 | env/ 27 | build/ 28 | develop-eggs/ 29 | dist/ 30 | downloads/ 31 | eggs/ 32 | .eggs/ 33 | lib/ 34 | lib64/ 35 | parts/ 36 | sdist/ 37 | var/ 38 | wheels/ 39 | *.egg-info/ 40 | .installed.cfg 41 | *.egg 42 | 43 | # PyInstaller 44 | # Usually these files are written by a python script from a template 45 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 46 | *.manifest 47 | *.spec 48 | 49 | # Installer logs 50 | pip-log.txt 51 | pip-delete-this-directory.txt 52 | 53 | # Unit test / coverage reports 54 | htmlcov/ 55 | .tox/ 56 | .coverage 57 | .coverage.* 58 | .cache 59 | nosetests.xml 60 | coverage.xml 61 | *.cover 62 | .hypothesis/ 63 | 64 | # Translations 65 | *.mo 66 | *.pot 67 | 68 | # Django stuff: 69 | *.log 70 | local_settings.py 71 | 72 | # Flask stuff: 73 | instance/ 74 | .webassets-cache 75 | 76 | # Scrapy stuff: 77 | .scrapy 78 | 79 | # Sphinx documentation 80 | docs/_build/ 81 | 82 | # PyBuilder 83 | target/ 84 | 85 | # Jupyter Notebook 86 | .ipynb_checkpoints 87 | 88 | # pyenv 89 | .python-version 90 | 91 | # celery beat schedule file 92 | celerybeat-schedule 93 | 94 | # SageMath parsed files 95 | *.sage.py 96 | 97 | # dotenv 98 | .env 99 | 100 | # virtualenv 101 | .venv 102 | venv/ 103 | ENV/ 104 | 105 | # Spyder project settings 106 | .spyderproject 107 | .spyproject 108 | 109 | # Rope project settings 110 | .ropeproject 111 | 112 | # mkdocs documentation 113 | /site 114 | 115 | # mypy 116 | .mypy_cache/ 117 | -------------------------------------------------------------------------------- /.github/workflows/release-tag.yml: -------------------------------------------------------------------------------- 1 | name: release-tag 2 | 3 | on: 4 | push: 5 | tags: 6 | - v*.*.* 7 | 8 | jobs: 9 | build: 10 | runs-on: windows-latest 11 | permissions: 12 | contents: write 13 | steps: 14 | - 15 | name: Checkout 16 | uses: actions/checkout@v4 17 | with: 18 | submodules: true 19 | - 20 | name: Install Python 21 | uses: actions/setup-python@v5 22 | with: 23 | python-version: 3.12 24 | - 25 | name: Install Python packages 26 | run: pip install -r requirements.txt pyinstaller pyinstaller-versionfile 27 | - 28 | name: Create Pyinstaller version file (exploit-host) 29 | run: create-version-file exploit-host.yml --outfile exploit-host.version --version "${{ github.ref_name }}".Replace("v", "") 30 | - 31 | name: Build executable (exploit-host) 32 | run: pyinstaller --noconfirm --clean --onefile --console --name exploit-host --version-file exploit-host.version --distpath .\ --icon exploit-host.ico exploit-host.py 33 | - 34 | name: Create Pyinstaller version file (build-static) 35 | run: create-version-file build-static.yml --outfile build-static.version --version "${{ github.ref_name }}".Replace("v", "") 36 | - 37 | name: Build executable (build-static) 38 | run: pyinstaller --noconfirm --clean --onefile --console --name build-static --version-file build-static.version --distpath .\ --icon build-static.ico build-static.py 39 | - 40 | name: Make release zips 41 | run: | 42 | Compress-Archive -Path ".\debug\", ".\exploits", ".\payloads", ".\pkgs", ".\themes", ".\updates", ".\build-static.exe", ".\exploit-host.exe", ".\FAQ.md", ".\LICENSE", ".\news.json", ".\README.md", ".\settings.json", ".\snakeoil.key", ".\snakeoil.pem" -CompressionLevel Optimal -DestinationPath .\exploit-host-exe-${{ github.ref_name }}.zip 43 | Compress-Archive -Path ".\debug\", ".\exploits", ".\fdns", ".\payloads", ".\pkgs", ".\themes", ".\updates", ".\build-static.py", ".\exploit-host.py", ".\FAQ.md", ".\LICENSE", ".\news.json", ".\README.md", ".\requirements.txt", ".\settings.json", ".\snakeoil.key", ".\snakeoil.pem" -CompressionLevel Optimal -DestinationPath .\exploit-host-py-${{ github.ref_name }}.zip 44 | - 45 | name: Create release 46 | uses: ncipollo/release-action@v1 47 | with: 48 | artifactErrorsFailBuild: true 49 | artifacts: | 50 | exploit-host-exe-${{ github.ref_name }}.zip 51 | exploit-host-py-${{ github.ref_name }}.zip 52 | draft: true 53 | -------------------------------------------------------------------------------- /themes/Default/ps4-updatefeature.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | System Update | Exploit Host by Al Azif 6 | 58 | 59 | 60 |
61 |
62 |
63 |

PlayStation 4 System Update 5.05

64 |
65 |
66 |
67 |

About System Update 5.05

68 |

Main features:

69 |
    70 |
  • Improves "system stability"
  • 71 |
72 |
73 |
74 |
75 |
76 | 77 | 78 | 100 | -------------------------------------------------------------------------------- /themes/Default/promise-polyfill.min.js: -------------------------------------------------------------------------------- 1 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(){}function t(e){if(!(this instanceof t))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],u(e,this)}function o(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(f){return void i(n.promise,f)}r(n.promise,o)}else(1===e._state?r:i)(n.promise,e._value)})):e._deferreds.push(n)}function r(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if(n instanceof t)return e._state=3,e._value=n,void f(e);if("function"==typeof o)return void u(function(e,n){return function(){e.apply(n,arguments)}}(o,n),e)}e._state=1,e._value=n,f(e)}catch(r){i(e,r)}}function i(e,n){e._state=2,e._value=n,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var n=0,r=e._deferreds.length;r>n;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t}); 2 | -------------------------------------------------------------------------------- /themes/Default/default.css: -------------------------------------------------------------------------------- 1 | html { 2 | min-height: 100%; 3 | min-width: 100%; 4 | } 5 | 6 | body { 7 | background-position: right bottom; 8 | background-repeat: no-repeat; 9 | background-attachment: fixed; 10 | min-height: 100%; 11 | min-width: 100%; 12 | } 13 | 14 | #ifr { 15 | margin: 0; 16 | padding: 0; 17 | width: 0; 18 | height: 0; 19 | border: none; 20 | display: none; 21 | } 22 | 23 | .overlay { 24 | position: fixed; 25 | display: none; 26 | width: 100%; 27 | height: 100%; 28 | top: 0; 29 | left: 0; 30 | right: 0; 31 | bottom: 0; 32 | background-color: rgba(0,0,0,0.9); 33 | z-index: 3; 34 | } 35 | 36 | .centered-text { 37 | position: relative; 38 | top: 50%; 39 | margin: -20px auto auto auto; 40 | text-align: center; 41 | font-size: 40px; 42 | color: #fff; 43 | } 44 | 45 | #bar-back { 46 | position: fixed; 47 | bottom: 0%; 48 | width: 100%; 49 | } 50 | 51 | #bar-load { 52 | width: 3%; 53 | height: 20px; 54 | background-color: #0058b1; 55 | text-align: center; 56 | line-height: 20px; 57 | color: #fff; 58 | } 59 | 60 | #exploit-loader, #exploit-loader:after { 61 | border-radius: 50%; 62 | width: 10em; 63 | height: 10em; 64 | } 65 | 66 | #exploit-loader { 67 | margin: -60px auto auto auto; 68 | font-size: 10px; 69 | position: relative; 70 | top: 50%; 71 | text-indent: -9999em; 72 | border-top: 1.1em solid rgba(255, 255, 255, 0); 73 | border-right: 1.1em solid rgba(255, 255, 255, 0); 74 | border-bottom: 1.1em solid rgba(255, 255, 255, 0); 75 | border-left: 1.1em solid #0058b1; 76 | -webkit-transform: translateZ(0); 77 | -ms-transform: translateZ(0); 78 | transform: translateZ(0); 79 | -webkit-animation: load 1.1s infinite linear; 80 | animation: load 1.1s infinite linear; 81 | } 82 | 83 | @-webkit-keyframes load { 84 | 0% { 85 | -webkit-transform: rotate(0deg); 86 | transform: rotate(0deg); 87 | } 88 | 89 | 100% { 90 | -webkit-transform: rotate(360deg); 91 | transform: rotate(360deg); 92 | } 93 | } 94 | 95 | @keyframes load { 96 | 0% { 97 | -webkit-transform: rotate(0deg); 98 | transform: rotate(0deg); 99 | } 100 | 101 | 100% { 102 | -webkit-transform: rotate(360deg); 103 | transform: rotate(360deg); 104 | } 105 | } 106 | 107 | .content-title { 108 | padding: 20px 40px; 109 | margin: 5px; 110 | background: #003263; 111 | color: #fff; 112 | border: 1px solid #6392b1; 113 | } 114 | 115 | .content-header { 116 | border-bottom: 1px solid #003488; 117 | margin-bottom: 20px; 118 | padding-left: 16px; 119 | } 120 | 121 | .btn-custom-main { 122 | padding: 16px 32px; 123 | font-size: 18px; 124 | width: 85%; 125 | background-color: #003263; 126 | border: 0; 127 | } 128 | 129 | .btn-custom-dropdown { 130 | padding: 16px; 131 | font-size: 18px; 132 | width: 15%; 133 | background-color: #003263; 134 | border: 0; 135 | } 136 | 137 | .btn-group { 138 | display: inline-block; 139 | width: 325px; 140 | padding: 3px; 141 | } 142 | 143 | .btn-custom-full { 144 | width: 100%; 145 | } 146 | 147 | #buttons { 148 | padding-left: 32px; 149 | } 150 | 151 | .alert { 152 | position: fixed; 153 | top: 20px; 154 | left: 12%; 155 | width: 76%; 156 | z-index: 2; 157 | } 158 | 159 | #pkg-container { 160 | max-height: 200px; 161 | } 162 | 163 | #pkg-list { 164 | overflow-y: auto; 165 | } 166 | 167 | #language-selection, #theme-selection { 168 | width: auto !important; 169 | } 170 | 171 | /* Default Bootstrap overwrites below this line */ 172 | 173 | .btn-primary { 174 | background-color: #003263; 175 | border-color: #003263; 176 | } 177 | 178 | .btn-outline-primary { 179 | color: #003263; 180 | border-color: #003263; 181 | } 182 | 183 | .nav-link { 184 | color: #003263; 185 | } 186 | 187 | .nav-link.active { 188 | color: #fff; 189 | background-color: #003263 !important; 190 | } 191 | 192 | .badge-primary { 193 | background-color: #003263; 194 | } 195 | 196 | /* 197 | Copyright (c) 2017-2024 Al Azif, https://github.com/Al-Azif/ps4-exploit-host 198 | 199 | Permission is hereby granted, free of charge, to any person obtaining 200 | a copy of this software and associated documentation files (the 201 | "Software"), to deal in the Software without restriction, including 202 | without limitation the rights to use, copy, modify, merge, publish, 203 | distribute, sublicense, and/or sell copies of the Software, and to 204 | permit persons to whom the Software is furnished to do so, subject to 205 | the following conditions: 206 | 207 | The above copyright notice and this permission notice shall be 208 | included in all copies or substantial portions of the Software. 209 | 210 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 211 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 212 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 213 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 214 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 215 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 216 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 217 | */ 218 | -------------------------------------------------------------------------------- /themes/Default/common.js: -------------------------------------------------------------------------------- 1 | "use strict";function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function getBasePath(){var b="".concat(window.location.origin).concat(window.location.pathname);return"/"===b.slice(-1)&&(b=b.slice(0,-1)),b}window.onerror=function(a,b,c,d,e){if(b===document.location.href)return void alert("User Custom JS Error\n\n".concat(a,"\nLine: ").concat(c,"\nColumn: ").concat(d));var f=JSON.stringify({message:a,line:c,column:d,url:b,useragent:navigator.userAgent,stack:e}),g=new XMLHttpRequest;g.open("POST","".concat(getBasePath(),"/debug/jserrorlog"),!0),g.setRequestHeader("Content-Type","application/json"),navigator.onLine?(g.onload=function(){200<=g.status&&400>g.status?alert("Successfully Submitted Error Log\n\n".concat(a,"\nFile: ").concat(b,"\nLine: ").concat(c,"\nColumn: ").concat(d)):alert("Error Submitting Error Log\n\n".concat(a,"\nFile: ").concat(b,"\nLine: ").concat(c,"\nColumn: ").concat(d))},g.onerror=function(){alert("Error Submitting Error Log\n\n".concat(a,"\nFile: ").concat(b,"\nLine: ").concat(c,"\nColumn: ").concat(d))}):alert("Offline, No Error Log Submitted\n\n".concat(a,"\nFile: ").concat(b,"\nLine: ").concat(c,"\nColumn: ").concat(d)),g.send(f)};function int2Hex(a){return a.toString(16)}function uuid(){var b,c,a=Math.floor,d="",e=Date.now();for(c=0;32>c;c+=1)b=0|(e+16*Math.random())%16,e=a(e/16),(8===c||12===c||16===c||20===c)&&(d+="-"),d+=12===c?int2Hex(4):16===c?int2Hex(11&b):int2Hex(b);return d}function sleep(a){return new Promise(function(b){setTimeout(b,a)})}function getJson(a){var b=new XMLHttpRequest;return b.open("GET",a,!1),b.setRequestHeader("Content-Type","application/json"),b.send(),!!(4===b.readyState&&200<=b.status&&400>b.status)&&JSON.parse(b.responseText)}function getJsonAsync(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.setRequestHeader("Content-Type","application/json"),c.onload=function(){200<=c.status&&400>c.status?b(JSON.parse(c.responseText)):b(!1)},c.onerror=function(){b(!1)},c.send()}function getMenu(){var a="".concat(getBasePath(),"/api/menu"),b=getJson(a);return!!(void 0!==b&&0c.status)&&c.responseText}function getDataAsync(a,b,c){var d=new XMLHttpRequest;d.open("GET",c?"https://cors.plus/".concat(a):a,!0),d.onload=function(){200<=d.status&&400>d.status?b(d.responseText):b(!1)},d.onerror=function(){b(!1)},d.send()}function loadFrame(a){var b=document.getElementById("ifr");b!==void 0&&b.contentWindow.location.replace(a)}function loadEntry(a,b,c){c?window.location.href="".concat(getBasePath(),"/exploits/").concat(a,"/").concat(b,"/index.html"):loadFrame("".concat(getBasePath(),"/exploits/").concat(a,"/").concat(b,"/index.html"))}function clearFrame(){loadFrame("".concat(getBasePath(),"/blank.html"))}function safeRedirect(a){clearFrame(),document.getElementById("ifr").addEventListener("load",function(){window.location.href=a})}function cacheTheme(){loadFrame("".concat(getBasePath(),"/cache/theme/index.html"))}function cacheCategory(a){loadFrame("".concat(getBasePath(),"/cache/category/").concat(a,"/index.html"))}function cacheEntry(a,b){loadFrame("".concat(getBasePath(),"/cache/entry/").concat(a,"/").concat(b,"/index.html"))}function cacheAll(){loadFrame("".concat(getBasePath(),"/cache/all/index.html"))}function setStorage(a,b,c){return!("string"!=typeof c||_typeof(b)!==c)&&(localStorage.setItem(a,b),!0)}function getStorage(a){return null!==localStorage.getItem(a)&&localStorage.getItem(a)}function deleteStorage(a){localStorage.removeItem(a)}function setCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+1e3*(60*(60*(24*c)))),d="; expires=".concat(e.toUTCString())}document.cookie="".concat(a,"=").concat(encodeURIComponent(b)).concat(d,"; domain=").concat(window.location.hostname,"; path=").concat(window.location.pathname,";")}function deleteCookie(a){document.cookie="".concat(a,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC;")}function getCookie(a){for(var b,c="".concat(a,"="),d=decodeURIComponent(document.cookie),e=d.split(";"),f=0;f 2 | 3 | 4 | 5 | Exploit Host by Al Azif 6 | 7 | 8 | 9 | 10 |
11 |
Caching...
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Loading...
19 |
20 |
21 | 130 |
131 |

*

132 |
133 |
134 |
135 |
136 |
137 | 138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 175 | -------------------------------------------------------------------------------- /themes/Default/rpi.js: -------------------------------------------------------------------------------- 1 | "use strict";var _this=void 0;function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d").concat(JSON.stringify(b),"

"))}function getTMDBURLRPI(a){var b,c,d,e="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";e=e.toUpperCase();var f=new jsSHA("SHA-256","TEXT");f.update(e);var g=f.getHash("HEX");return"2AB0555FABF50901A5D7CD56962769F0274374FA56C7E81E77EC386B22834AFB"===g.toUpperCase()?(b=new jsSHA("SHA-1","TEXT"),b.setHMACKey(e,"HEX"),b.update(a),c=b.getHMAC("HEX"),c=c.toUpperCase(),d="https://tmdb.np.dl.playstation.net/tmdb2/".concat(a,"_").concat(c,"/").concat(a,".json")):d="http://0.0.0.0",d}function displayTIDMetaRPI(a){window.Meta.update(getTMDBURLRPI(a)),window.Meta.icon!==void 0&&$("#meta-icon").attr("src",window.Meta.icon),window.Meta.name!==void 0&&$("#meta-name").text(window.Meta.name),window.Meta.icon===void 0&&window.Meta.name===void 0?$("#meta-info").hide():$("#meta-info").show()}function setLastIPRPI(a){var b,c=decodeURIComponent(document.cookie),d=c.split(";");$.each(d,function(a,c){for(;" "===c.charAt(0);)c=c.substring(1);0===c.indexOf("last_ip=")&&(b=c.substring(8,c.length))}),b===void 0?($(a).val("0.0.0.0"),document.cookie="last_ip=0.0.0.0; expires=Tue, 19 Jan 2038 03:14:07 UTC;"):$(a).val(b)}function validateInputRPI(a,b){var c;if("IP"===a)c=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;else if("URL"===a)c=/^http[s]?:\/\/.+/i;else if("ContentID"===a)c=/^[A-Z]{2}[0-9]{4}-[A-Z]{4}[0-9]{5}_[0-9]{2}-[A-Z0-9]{16}$/;else if("TitleID"===a)c=/^[A-Z]{4}[0-9]{5}$/;else if("TaskID"===a)c=/^(?:[1-9][0-9]{3}|[1-9][0-9]{2}|[1-9][0-9]|[0-9])$/;else return!1;return c.test(b)}function sendCommandRPI(a,b,c){var d="http://".concat(a,":12800/api/").concat(b);return validateInputRPI("IP",a)?(document.cookie="last_ip=".concat(a,"; expires=Tue, 19 Jan 2038 03:14:07 UTC;"),$.ajax({type:"POST",contentType:"application/json; charset=utf-8",dataType:"json",url:d,data:c,async:!1,beforeSend:function a(){$("#sendingOverlay").show()},complete:function a(){$("#sendingOverlay").hide()}}).responseJSON):void alert("Invalid IP")}function isExistsRPI(a,b){var c,d;return validateInputRPI("TitleID",b.toUpperCase())?(c=sendCommandRPI(a,"is_exists","{\"title_id\": \"".concat(b.toUpperCase(),"\"}")),d=c.status,void showResponseRPI(d,c)):void alert("Validation Error")}function installRPI(a,b,c){var d,e;return validateInputRPI("URL",c)?("direct"===b?d=sendCommandRPI(a,"install","{\"type\": \"direct\", \"packages\": [\"".concat(c,"\"]}")):"ref_pkg_url"==b&&(d=sendCommandRPI(a,"install","{\"type\": \"ref_pkg_url\", \"url\": \"".concat(c,"\"}"))),e=d.status,void showResponseRPI(e,d)):void alert("Validation Error")}function uninstallRPI(a,b,c){var d,e;if("uninstall_game"===b||"uninstall_patch"===b){if(validateInputRPI("TitleID",c.toUpperCase()))return d=sendCommandRPI(a,b,"{\"title_id\": \"".concat(c.toUpperCase(),"\"}")),e=d.status,void showResponseRPI(e,d);}else if(("uninstall_ac"===b||"uninstall_theme"===b)&&validateInputRPI("ContentID",c.toUpperCase()))return d=sendCommandRPI(a,b,"{\"content_id\": \"".concat(c.toUpperCase(),"\"}")),e=d.status,void showResponseRPI(e,d);alert("Validation Error")}function findTaskRPI(a,b,c){var d,e;return validateInputRPI("ContentID",c.toUpperCase())?(d=sendCommandRPI(a,"find_task","{\"content_id\": \"".concat(c.toUpperCase(),"\", \"sub_type\": ").concat(b,"}")),e=d.status,void showResponseRPI(e,d)):void alert("Validation Error")}function taskRPI(a,b,c){var d,e;return validateInputRPI("TaskID",c)?(d=sendCommandRPI(a,b,"{\"task_id\": ".concat(c,"}")),e=d.status,void showResponseRPI(e,d)):void alert("Validation Error")}function makePkgButtonRPI(a,b,c){var g,d=Math.pow,e=Math.floor,f=Math.log,h=43,j=a.substring(0,h-3);a.length>h&&(j+="...");var k=0===b?0:e(f(b)/f(1024)),i="".concat(1*(b/d(1024,k)).toFixed(2)," ").concat(["B","kB","MB","GB","TB"][k]);return g=""),g}function makePkgArrayRPI(a){var b="";return void 0!==a&&$.each(a,function(a,c){"No PKGs Found"===c?b="

No PKGs found on host

":"I/O Error on Host"===c?b="

I/O error on host

":"No results"===c?b="

No results

":b+=makePkgButtonRPI(c.Filename,c.Filesize,c.File_URL)}),""===b&&(b="

Error connecting to host

"),b}function checkPkgLink(){var a,b=/[A-Z]{2}[0-9]{4}-([A-Z]{4}[0-9]{5}_[0-9]{2})-[A-Z0-9]{16}/i,c=/([A-Z]{4}[0-9]{5})/i;b.test($("#installURL").val())?(a=b.exec($("#installURL").val()),a=a[1].toUpperCase(),displayTIDMetaRPI(a)):c.test($("#installURL").val())?(a=c.exec($("#installURL").val()),a="".concat(a[1].toUpperCase(),"_00"),displayTIDMetaRPI(a)):$("#meta-info").hide()}$(function(){var a,b;if(window.Meta=new TMDB,!navigator.onLine)return void $("#offlineOverlay").show();setLastIPRPI("#ip"),clearInputRPI();var c=getPKGListRPI();$("a[data-toggle=\"pill\"]").click(function(){clearInputRPI(),$("#header").text($(_this).text())}),$("#pkgSearch").keyup(function(){a=[],"No PKGs Found"!==c&&"I/O Error on Host"!==c&&(b=$("#pkgSearch").val().toUpperCase(),$.each(c,function(c,d){-1 2 | 3 | 4 | 5 | Remote Package Installer by Flatz 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
You cannot use remote package installer while offline!
15 |
16 |
17 |
Sending...
18 |
19 |
20 |

Remote Package Installer

21 |
22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | 37 | 38 |
39 |
40 |
41 |
42 |
43 | 49 |
50 |
51 |
52 |
53 | 54 |
55 |
56 |

*

57 |
58 |
59 |
60 |
61 |
62 | 63 |
64 | 65 | 66 |
67 |
68 |
69 | 70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | 78 |
79 | 80 |
81 |
82 |
83 |
84 |
85 |
86 | 87 | 88 |
89 |
90 | 91 | 92 |
93 |
94 | 95 | 96 |
97 |
98 | 99 | 100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | 108 |
109 | 110 |
111 |
112 |
113 |
114 |
115 |
116 | 117 | 118 |
119 |
120 | 121 | 122 |
123 |
124 | 125 | 126 |
127 |
128 | 129 | 130 |
131 |
132 |
133 |
134 |
135 | 136 |
137 |
138 |
139 | 140 | 141 | 142 | 143 | 144 | 145 |
146 |
147 |
148 |
149 |
150 |

This is an interface for Flatz's Remote PKG Installer you can find the release notes here.

151 | PKG Link: Here
152 | Created by: Flatz

153 |
154 |
155 |
156 |
157 |
158 | 159 | 160 | 161 | 162 | 184 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Exploit Host 2 | ================ 3 | 4 | ## What is this? 5 | 6 | This is an easy way for anyone to host their own exploit for the PS4/PS5/Vita/Wii/Switch/etc on their LAN. Features include: 7 | 8 | - Hosts your choice of exploit 9 | - Allows caching of exploits for offline use (Device dependant) 10 | - Sends your choice of payload after a successful exploit 11 | - Blocks update/telemetry domains from resolving 12 | - Serves a specific firmware update to your device (Device dependant) 13 | - Server side application works on just about every platform 14 | - Static Website builder. Compiles the host into a static website to run on HTTP server of your choice (You lose some features using this method, DNS, updater, etc) 15 | 16 | If you do not want to host the package yourself you can use my remote DNS. See the `Using remote DNS` section below. 17 | 18 | **PLEASE READ THIS README AND THE [FAQ](https://github.com/Al-Azif/ps4-exploit-host/blob/master/FAQ.md) BEFORE POSTING AN ISSUE.** 19 | 20 | ## Requirements 21 | 22 | - If you are not using a binary release you will need [Python 3](https://www.python.org/downloads/) 23 | - Root privileges on non-Windows machines 24 | 25 | ## How to download 26 | 27 | - Download the zip on the [releases](https://github.com/Al-Azif/ps4-exploit-host/releases) page 28 | - Download with Git, be sure to grab the submodules. This does not include any exploits or payloads. This is for experts only, download a release if you have issues 29 | 30 | `git clone --recursive https://github.com/Al-Azif/ps4-exploit-host.git` 31 | 32 | ## Using remote DNS (Run Nothing Locally) 33 | 34 | 0. Make sure you are on an exploitable device/firmware (ie. PS4: <=9.00, PS5: <=4.51, etc) 35 | - On the PS4/PS5 this can be found at `Settings > System > System Information` 36 | - If your firmware is too high you are out of luck there is no public exploit available and you cannot downgrade. 37 | 1. On your device go to setup your network as desired but be sure to set the DNS servers to `165.227.83.145` and `192.241.221.79` 38 | - This is typically found when setting up a "custom" network on the device. 39 | - Either IP can be used as the Primary or Secondary DNS. Flip a coin to decide. Randomly selecting with help with load balancing. 40 | 2. On the device visit the internet. If the devices is explicitly supported the online uses manual, internet connection test, and/or the browsers default homepage should be the exploit page. Examples: 41 | - On the PS4/PS5, go to `Settings > User's Guide` and select it the exploit selection should appear. 42 | - On the PS4 uou can also open browser and the default homepage will be the exploit selection. 43 | - On the Nintendo Switch the internet connection test will be the exploit selection. 44 | 3. If you using something like `Bin Loader` you will need to use another program to send the desired payload. 45 | 46 | My Twitter is [@_AlAzif](https://twitter.com/_AlAzif) you can check my recent tweets for know issues/maintenance info. 47 | 48 | **Request forwarding is disabled for non-[sponsors](https://github.com/sponsors/Al-Azif/), due to it being abused. You can read more info about the situation that caused open forwarding to be removed [here](https://gist.github.com/Al-Azif/255479c07006e7614e6bae342c19c44d).** 49 | 50 | ## How to run (Run Locally) 51 | 52 | 1. Download the files (As shown in the "How to download" section above) 53 | 2. Double click the executable (`exploit-host.exe`, `exploit-host.py`, etc). If it starts with no errors, note the IP given. 54 | - Alternatively run it from the command line (`exploit-host.exe`, `./exploit-host`, `python exploit-host.py`, etc) 55 | - If you are not root when running on a non-Windows machine you need to use `sudo` 56 | 3. Follow the `Using remote DNS` section substituting your DNS IP given noted in the previous step for both primary and secondary DNS IP addresses. 57 | 4. When done use `Ctrl+C` to cleanly close the application. 58 | 59 | Note: You can edit `settings.json` to modify the hosts behavior. There is a section below with more info. 60 | 61 | ## Creating a static HTML build 62 | 63 | TBD. 64 | 65 | ## Running on Raspberry Pi 66 | 67 | While the "How to run" section applies to the Pi as well there are some more complex options people may want to use for the Pi like running without any network whatsoever. 68 | 69 | - To run as a standalone device that you plug directly into your device though ethernet go [here](https://gist.github.com/Al-Azif/fe2ae67a2fb06cc136580b1e923c7aac) (Supports any Pi with a ethernet port) 70 | - To run as a WiFi access point for your device go [here](https://gist.github.com/Al-Azif/765740019c45b9a49cbf739609cadda7) (Officially supports RPi 3 currently, may work on others with WiFi adapter) 71 | 72 | ## Running on an ESP device 73 | 74 | TBD. 75 | 76 | ## How to use the built in updater 77 | 78 | Below is an example of how to issue the PS4 5.05 update to PS4s that have a lower FW currently installed. 79 | 80 | **If you already have an official updated above 5.05 downloaded you must delete it first.** 81 | 82 | 0. Make these changes before starting the application in the `How to run` section. Look at the `Update [PS4_No_Update]` setting in the `settings.json` info below. 83 | 1. Put the system update in the `updates` folder as `PS4UPDATE_SYSTEM.PUP` 84 | - Optionally put the recovery update in the `updates` folder as `PS4UPDATE_RECOVERY.PUP` 85 | 86 | **5.05 SYS MD5:** F86D4F9D2C049547BD61F942151FFB55 87 | 88 | **5.05 REC MD5:** C2A602174F6B1D8EF599640CD276924A 89 | 90 | 2. MAKE SURE THE DNS IS SET CORRECTLY! 91 | 3. **SEE #2 I'M SO SERIOUS!** 92 | 4. There should be a different page on the `System Software Update > View Details` option on the PS4. It will be obvious! 93 | - The PS4 is not using the right DNS if you get the standard Sony changelog page. **STOP IMMEDIATELY AND RESTART THE ENTIRE PROCESS** 94 | 5. Run a system update on your PS4 system. 95 | 6. Return to the "How to run" section. 96 | 97 | ## Modifying `settings.json` 98 | 99 | It's probably a good idea to make a backup of the default settings.json just in case. Any invalid settings will throw a warning and use a default value. 100 | 101 | Use valid json formatting. Boolean values should be lower case, integers should not be quoted, etc. 102 | 103 | | Setting | Notes | Type | 104 | | ------- | ----- | ------- | 105 | | Debug | Will print debug info from the DNS/HTTP servers | boolean | 106 | | Root_Check | Will skip the root user check for Linux/OSX, only disable if you are sure you don't need it. Will cause port errors if set wrong | boolean | 107 | | Public | If the server is listening on a public IP (Disabled payload sending other than "Auto_Payload and disables viewing/editing settings remotely) | boolean | 108 | | DNS | If the DNS server should be run | boolean | 109 | | HTTP | If the HTTP server should be run | boolean | 110 | | HTTPS | If the HTTPS server should be run | boolean | 111 | | DNS_Interface | The IP of the interface to bind the DNS server to | string (IP Address) | 112 | | DNS_Port | The port to bind the DNS server to | int (1-65535) | 113 | | HTTP_Interface | The IP of the interface to bind the HTTP server to | string (IP Address) | 114 | | HTTP_Port | The port to bind the HTTP server to | int (1-65535) | 115 | | HTTPS_Interface | The IP of the interface to bind the HTTPS server to | string (IP Address) | 116 | | HTTPS_Port | The port to bind the HTTPS server to | int (1-65535) | 117 | | Compression_Level | Enables gzip compression on the HTTP server, 0 being disabled, 9 being most compressed | int (0-9) | 118 | | UA_Check | If the UA should be checked against values in the Valid_UA setting | boolean | 119 | | Theme | Which theme to use, themes must be located in the themes folder | string | 120 | | Sticky_Cache | Whether the appcache manifest should be included in itself or not | boolean | 121 | | Auto_Payload | Payload to send to any IP that accesses server at `/success`. Payload must be in the payloads folder | string | 122 | | Payload_Timeout | The timeout, in seconds, to try and send a payload through the payload menu before timing out | int (1-999) | 123 | | DNS_Rules | Fake DNS control block | | 124 | | DNS_Rules [Redirect IP] | The IP address to redirect URLs listed in the Redirect rules to | string (IP Address) | 125 | | DNS_Rules [Redirect] | Array of domains to forwards to DNS_Rules [Redirect IP] | array of strings (regex) | 126 | | DNS_Rules [Block] | Array of domains to block | array of strings (regex) | 127 | | DNS_Rules [Pass_Through] | Array of IP addresses to not modify DNS requests | array of strings (IP Address) | 128 | | Valid_UA | User-Agents to allow access to exploits, only used if UA_Check is enabled | array of strings (regex) | 129 | | Update | Updater control block | | 130 | | Update [PS4_No_Update] | The PS4 version (and lower) listed here will not be served update files | float | 131 | | Update [PS5_No_Update] | The PS5 version (and lower) listed here will not be served update files | float | 132 | | Update [Vita_No_Update] | The PS Vita version (and lower) listed here will not be served update files | float | 133 | 134 | ## Modifying metadata 135 | 136 | TBD. 137 | 138 | ## About offline caching 139 | 140 | - Redirect/Theme info is cached automatically. 141 | - Redirect/Theme info updates and refreshes automatically. 142 | - Exploits can be cached on a per firmware basis or all cached at once with the dropdown menu and/or `[Cache All]` button on the exploit selection menu. 143 | - Exploit updates must be "manually" updated by clicking cache button an update is available or checking the "About" option in the exploit's dropdown menu. 144 | - You will be told if there is no update when clicking the button. 145 | - If you are offline the caching buttons will be hidden as will exploits that require a network connection or are not cached. 146 | 147 | ## About autoload 148 | 149 | - Exploits can be automatically selected by clicking "Autoload" in the exploits dropdown menu. 150 | - When you open the exploit selection it'll automatically select that exploit. 151 | - This can be disabled by clearing your browser's cookies. 152 | 153 | ## Contributing 154 | 155 | You can check the [issue tracker](https://github.com/Al-Azif/ps4-exploit-host/issues) for my to do list and/or bugs. Feel free to send a [pull request](https://github.com/Al-Azif/ps4-exploit-host/pulls) for whatever. 156 | Be sure to report any bugs, include as much information as possible. 157 | 158 | ## What if a new exploit is released? 159 | 160 | You should just be able to place the exploit files in the `exploit` directory. The exploit will automatically add the exploit to the menu. 161 | 162 | ex. exploits/firmware_version/exploit_name/index.html 163 | 164 | ## Why do you commit so many little changes, tweaks, etc? 165 | 166 | I have no self control... it also lets people see the actual development. From barely working chicken scratch to actual code. 167 | 168 | ## Credits 169 | 170 | - Specter, IDC, qwertyoruiopz, Flatz, CTurt, Mistawes, XVortex, LightningMods, CelesteBlue123, Anonymous, neofreno, wolfmankurd, crypt0s, etc 171 | - Build Static Icon: https://icon-icons.com/icon/html-application/2459 172 | - Exploit Host Icon: https://icon-icons.com/icon/redirect-exchange/90870 173 | -------------------------------------------------------------------------------- /themes/Default/common.js.es6: -------------------------------------------------------------------------------- 1 | function getBasePath() { 2 | // const port = window.location.port !== '' ? `:${window.location.port}` : ''; 3 | // let url = `${window.location.origin}${port}${window.location.pathname}`; 4 | let url = `${window.location.origin}${window.location.pathname}`; 5 | 6 | if (url.slice(-1) === '/') { 7 | url = url.slice(0, -1); 8 | } 9 | 10 | return url; 11 | } 12 | 13 | // --- JS Error Logger -------------------------------------------------------- 14 | 15 | window.onerror = (msg, errorLocation, lineNo, columnNo, error) => { 16 | if (errorLocation === document.location.href) { 17 | // eslint-disable-next-line no-alert 18 | alert(`User Custom JS Error\n\n${msg}\nLine: ${lineNo}\nColumn: ${columnNo}`); 19 | return; // Assuming this is a user script error 20 | } 21 | const data = JSON.stringify({ 22 | message: msg, 23 | line: lineNo, 24 | column: columnNo, 25 | url: errorLocation, 26 | useragent: navigator.userAgent, 27 | stack: error, 28 | }); 29 | 30 | const xhr = new XMLHttpRequest(); 31 | xhr.open('POST', `${getBasePath()}/debug/jserrorlog`, true); 32 | xhr.setRequestHeader('Content-Type', 'application/json'); 33 | 34 | if (navigator.onLine) { 35 | xhr.onload = () => { 36 | if (xhr.status >= 200 && xhr.status < 400) { 37 | // eslint-disable-next-line no-alert 38 | alert(`Successfully Submitted Error Log\n\n${msg}\nFile: ${errorLocation}\nLine: ${lineNo}\nColumn: ${columnNo}`); 39 | } else { 40 | // eslint-disable-next-line no-alert 41 | alert(`Error Submitting Error Log\n\n${msg}\nFile: ${errorLocation}\nLine: ${lineNo}\nColumn: ${columnNo}`); 42 | } 43 | }; 44 | 45 | xhr.onerror = () => { 46 | // eslint-disable-next-line no-alert 47 | alert(`Error Submitting Error Log\n\n${msg}\nFile: ${errorLocation}\nLine: ${lineNo}\nColumn: ${columnNo}`); 48 | }; 49 | } else { 50 | // eslint-disable-next-line no-alert 51 | alert(`Offline, No Error Log Submitted\n\n${msg}\nFile: ${errorLocation}\nLine: ${lineNo}\nColumn: ${columnNo}`); 52 | } 53 | 54 | xhr.send(data); 55 | }; 56 | 57 | // --- Common Functions ------------------------------------------------------- 58 | 59 | function int2Hex(value) { 60 | return value.toString(16); 61 | } 62 | 63 | // eslint-disable-next-line no-unused-vars 64 | function uuid() { 65 | let random; 66 | let i; 67 | 68 | let result = ''; 69 | let seed = Date.now(); 70 | 71 | for (i = 0; i < 32; i += 1) { 72 | // eslint-disable-next-line no-bitwise 73 | random = (seed + Math.random() * 16) % 16 | 0; 74 | seed = Math.floor(seed / 16); 75 | 76 | if (i === 8 || i === 12 || i === 16 || i === 20) { 77 | result += '-'; 78 | } 79 | 80 | if (i === 12) { 81 | result += int2Hex(4); 82 | } else if (i === 16) { 83 | // eslint-disable-next-line no-bitwise 84 | result += int2Hex(random & (3 | 8)); 85 | } else { 86 | result += int2Hex(random); 87 | } 88 | } 89 | return result; 90 | } 91 | 92 | // eslint-disable-next-line no-unused-vars 93 | function sleep(time) { 94 | return new Promise((resolve) => { setTimeout(resolve, time); }); 95 | } 96 | 97 | function getJson(inputURL) { 98 | const xhr = new XMLHttpRequest(); 99 | xhr.open('GET', inputURL, false); 100 | xhr.setRequestHeader('Content-Type', 'application/json'); 101 | 102 | xhr.send(); 103 | if (xhr.readyState === 4 && xhr.status >= 200 && xhr.status < 400) { 104 | return JSON.parse(xhr.responseText); 105 | } 106 | 107 | return false; 108 | } 109 | 110 | function getJsonAsync(inputURL, callback) { 111 | const xhr = new XMLHttpRequest(); 112 | xhr.open('GET', inputURL, true); 113 | xhr.setRequestHeader('Content-Type', 'application/json'); 114 | 115 | xhr.onload = () => { 116 | if (xhr.status >= 200 && xhr.status < 400) { 117 | callback(JSON.parse(xhr.responseText)); 118 | } else { 119 | callback(false); 120 | } 121 | }; 122 | 123 | xhr.onerror = () => { 124 | callback(false); 125 | }; 126 | 127 | xhr.send(); 128 | } 129 | 130 | // eslint-disable-next-line no-unused-vars 131 | function getMenu() { 132 | const url = `${getBasePath()}/api/menu`; 133 | const result = getJson(url); 134 | 135 | if (result !== undefined && Object.keys(result).length > 0) { 136 | return result; 137 | } 138 | return false; 139 | } 140 | 141 | // eslint-disable-next-line no-unused-vars 142 | function getMenuAsync(callback) { 143 | const url = `${getBasePath()}/api/menu`; 144 | 145 | getJsonAsync(url, (response) => { 146 | if (response && response !== {}) { 147 | callback(response); 148 | } else { 149 | callback(false); 150 | } 151 | }); 152 | } 153 | 154 | // eslint-disable-next-line no-unused-vars 155 | function getSettings() { 156 | const url = `${getBasePath()}/api/themes`; 157 | const result = getJson(url); 158 | 159 | if (result !== undefined && Object.keys(result).length > 0) { 160 | return result; 161 | } 162 | return false; 163 | } 164 | 165 | // eslint-disable-next-line no-unused-vars 166 | function getSettingsAsync(callback) { 167 | const url = `${getBasePath()}/api/themes`; 168 | 169 | getJsonAsync(url, (response) => { 170 | if (response && response !== {}) { 171 | callback(response); 172 | } else { 173 | callback(false); 174 | } 175 | }); 176 | } 177 | 178 | // eslint-disable-next-line no-unused-vars 179 | function getData(inputURL, cors) { 180 | const xhr = new XMLHttpRequest(); 181 | xhr.open('GET', cors ? `https://cors.plus/${inputURL}` : inputURL, false); 182 | 183 | xhr.send(); 184 | if (xhr.readyState === 4 && xhr.status >= 200 && xhr.status < 400) { 185 | return xhr.responseText; 186 | } 187 | 188 | return false; 189 | } 190 | 191 | // eslint-disable-next-line no-unused-vars 192 | function getDataAsync(inputURL, callback, cors) { 193 | const xhr = new XMLHttpRequest(); 194 | xhr.open('GET', cors ? `https://cors.plus/${inputURL}` : inputURL, true); 195 | 196 | xhr.onload = () => { 197 | if (xhr.status >= 200 && xhr.status < 400) { 198 | callback(xhr.responseText); 199 | } else { 200 | callback(false); 201 | } 202 | }; 203 | 204 | xhr.onerror = () => { 205 | callback(false); 206 | }; 207 | 208 | xhr.send(); 209 | } 210 | 211 | function loadFrame(url) { 212 | const ifrObj = document.getElementById('ifr'); 213 | 214 | if (ifrObj !== undefined) { 215 | ifrObj.contentWindow.location.replace(url); 216 | } 217 | } 218 | 219 | // eslint-disable-next-line no-unused-vars 220 | function loadEntry(category, entry, redirect) { 221 | if (redirect) { 222 | window.location.href = `${getBasePath()}/exploits/${category}/${entry}/index.html`; 223 | } else { 224 | loadFrame(`${getBasePath()}/exploits/${category}/${entry}/index.html`); 225 | } 226 | } 227 | 228 | function clearFrame() { 229 | loadFrame(`${getBasePath()}/blank.html`); 230 | } 231 | 232 | // eslint-disable-next-line no-unused-vars 233 | function safeRedirect(url) { 234 | clearFrame(); 235 | 236 | document.getElementById('ifr').addEventListener('load', () => { 237 | window.location.href = url; 238 | }); 239 | } 240 | 241 | // eslint-disable-next-line no-unused-vars 242 | function cacheTheme() { 243 | loadFrame(`${getBasePath()}/cache/theme/index.html`); 244 | } 245 | 246 | // eslint-disable-next-line no-unused-vars 247 | function cacheCategory(category) { 248 | loadFrame(`${getBasePath()}/cache/category/${category}/index.html`); 249 | } 250 | 251 | // eslint-disable-next-line no-unused-vars 252 | function cacheEntry(category, entry) { 253 | loadFrame(`${getBasePath()}/cache/entry/${category}/${entry}/index.html`); 254 | } 255 | 256 | // eslint-disable-next-line no-unused-vars 257 | function cacheAll() { 258 | loadFrame(`${getBasePath()}/cache/all/index.html`); 259 | } 260 | 261 | // eslint-disable-next-line no-unused-vars 262 | function setStorage(key, value, datatype) { 263 | if (typeof datatype === 'string') { 264 | // Don't need to lint for valid-typeof on next line as we solved the issue above 265 | // eslint-disable-next-line valid-typeof 266 | if (typeof value === datatype) { 267 | localStorage.setItem(key, value); 268 | return true; 269 | } 270 | } 271 | return false; 272 | } 273 | 274 | // eslint-disable-next-line no-unused-vars 275 | function getStorage(key) { 276 | if (localStorage.getItem(key) !== null) { 277 | return localStorage.getItem(key); 278 | } 279 | return false; 280 | } 281 | 282 | // eslint-disable-next-line no-unused-vars 283 | function deleteStorage(key) { 284 | localStorage.removeItem(key); 285 | } 286 | 287 | function setCookie(key, value, days) { 288 | let expires = ''; 289 | if (days) { 290 | const date = new Date(); 291 | date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 292 | expires = `; expires=${date.toUTCString()}`; 293 | } 294 | 295 | document.cookie = `${key}=${encodeURIComponent(value)}${expires}; domain=${window.location.hostname}; path=${window.location.pathname};`; 296 | } 297 | 298 | function deleteCookie(key) { 299 | document.cookie = `${key}=; expires=Thu, 01 Jan 1970 00:00:00 UTC;`; 300 | } 301 | 302 | function getCookie(key) { 303 | const name = `${key}=`; 304 | const decodedCookie = decodeURIComponent(document.cookie); 305 | const cookies = decodedCookie.split(';'); 306 | 307 | for (let i = 0; i < cookies.length; i += 1) { 308 | let cookie = cookies[i]; 309 | 310 | while (cookie.charAt(0) === ' ') { 311 | cookie = cookie.substring(1); 312 | } 313 | if (cookie.indexOf(name) === 0) { 314 | return decodeURI(cookie.substring(name.length, cookie.length)); 315 | } 316 | } 317 | 318 | return undefined; 319 | } 320 | 321 | // eslint-disable-next-line no-unused-vars 322 | function setAutoload(category, entry) { 323 | setCookie('autoload', `${category}/${entry}`, 100 * 365); 324 | } 325 | 326 | // eslint-disable-next-line no-unused-vars 327 | function autoloadCookie(menu) { 328 | const autoload = getCookie('autoload'); 329 | 330 | if (autoload) { 331 | try { 332 | const category = autoload.split('/')[0]; 333 | const entry = autoload.split('/')[1]; 334 | 335 | if (!(category in menu) || !(entry in menu[category].entries)) { 336 | deleteCookie('autoload'); 337 | } else { 338 | return autoload; 339 | } 340 | } catch (e) { 341 | deleteCookie('autoload'); 342 | } 343 | } 344 | return false; 345 | } 346 | 347 | // eslint-disable-next-line no-unused-vars 348 | function imageToBackground(inputURL, callback, cors, outputFormat) { 349 | const img = new Image(); 350 | img.crossOrigin = 'Anonymous'; 351 | img.onload = function onImageLoad() { 352 | const canvas = document.createElement('canvas'); 353 | const ctx = canvas.getContext('2d'); 354 | canvas.height = this.naturalHeight; 355 | canvas.width = this.naturalWidth; 356 | ctx.drawImage(this, 0, 0); 357 | const dataURL = canvas.toDataURL(outputFormat); 358 | callback(dataURL); 359 | }; 360 | img.src = cors ? `https://cors.plus/${inputURL}` : inputURL; 361 | } 362 | 363 | // eslint-disable-next-line no-unused-vars 364 | function checkUAMatch(validUAs) { 365 | const currentUA = navigator.userAgent; 366 | 367 | if (validUAs.indexOf(currentUA) > -1) { 368 | return true; 369 | } 370 | 371 | for (let i = 0; i < validUAs.length; i += 1) { 372 | const pattern = new RegExp(validUAs[i]); 373 | if (pattern.test(currentUA)) { 374 | return true; 375 | } 376 | } 377 | 378 | return false; 379 | } 380 | /* 381 | Copyright (c) 2017-2022 Al Azif, https://github.com/Al-Azif/ps4-exploit-host 382 | 383 | Permission is hereby granted, free of charge, to any person obtaining 384 | a copy of this software and associated documentation files (the 385 | "Software"), to deal in the Software without restriction, including 386 | without limitation the rights to use, copy, modify, merge, publish, 387 | distribute, sublicense, and/or sell copies of the Software, and to 388 | permit persons to whom the Software is furnished to do so, subject to 389 | the following conditions: 390 | 391 | The above copyright notice and this permission notice shall be 392 | included in all copies or substantial portions of the Software. 393 | 394 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 395 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 396 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 397 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 398 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 399 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 400 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 401 | */ 402 | -------------------------------------------------------------------------------- /themes/Default/rpi.js.es6: -------------------------------------------------------------------------------- 1 | class TMDB { 2 | constructor() { 3 | this.url = ''; 4 | this.json = ''; 5 | } 6 | 7 | update(url) { 8 | if (url !== this.url) { 9 | this.url = url; 10 | this.json = $.ajax({ 11 | dataType: 'json', 12 | url: this.url, 13 | async: false, 14 | }).responseJSON; 15 | } 16 | } 17 | 18 | get icon() { 19 | if (this.json !== undefined) { 20 | return this.json.icons[0].icon; 21 | } 22 | return undefined; 23 | } 24 | 25 | get name() { 26 | if (this.json !== undefined) { 27 | return this.json.names[0].name; 28 | } 29 | return undefined; 30 | } 31 | } 32 | 33 | function clearInputRPI() { 34 | $('#meta-info').hide(); 35 | $('#installURL').val('http://'); 36 | $('#pkgSearch').val(''); 37 | $('#uninstallID').val(''); 38 | $('#uninstallRadioGame').prop('checked', true); 39 | $('#taskContentID').val(''); 40 | $('#taskRadioGame').prop('checked', true); 41 | $('#taskID').val(''); 42 | } 43 | 44 | function getPKGListRPI() { 45 | return $.ajax({ 46 | dataType: 'json', 47 | url: '/api/pkglist', 48 | async: false, 49 | }).responseJSON; 50 | } 51 | 52 | function showResponseRPI(type, message) { 53 | let color = ''; 54 | 55 | if (type === 'fail') { 56 | color = ' text-danger'; 57 | } else if (type === 'success') { 58 | color = ' text-success'; 59 | } 60 | $('#responseText').html(`

${JSON.stringify(message)}

`); 61 | } 62 | 63 | function getTMDBURLRPI(tid) { 64 | let sha1HMAC; 65 | let tmdbHash; 66 | let tmdbURL; 67 | 68 | // Insert key here (In hex format). It will be automatically checked against the correct hash 69 | let key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; 70 | 71 | key = key.toUpperCase(); 72 | 73 | const sha256 = new jsSHA('SHA-256', 'TEXT'); 74 | sha256.update(key); 75 | const keyHash = sha256.getHash('HEX'); 76 | 77 | if (keyHash.toUpperCase() === '2AB0555FABF50901A5D7CD56962769F0274374FA56C7E81E77EC386B22834AFB') { 78 | sha1HMAC = new jsSHA('SHA-1', 'TEXT'); 79 | 80 | sha1HMAC.setHMACKey(key, 'HEX'); 81 | sha1HMAC.update(tid); 82 | tmdbHash = sha1HMAC.getHMAC('HEX'); 83 | tmdbHash = tmdbHash.toUpperCase(); 84 | 85 | tmdbURL = `https://tmdb.np.dl.playstation.net/tmdb2/${tid}_${tmdbHash}/${tid}.json`; 86 | } else { 87 | tmdbURL = 'http://0.0.0.0'; 88 | } 89 | 90 | return tmdbURL; 91 | } 92 | 93 | function displayTIDMetaRPI(tid) { 94 | window.Meta.update(getTMDBURLRPI(tid)); 95 | if (window.Meta.icon !== undefined) { 96 | $('#meta-icon').attr('src', window.Meta.icon); 97 | } 98 | if (window.Meta.name !== undefined) { 99 | $('#meta-name').text(window.Meta.name); 100 | } 101 | 102 | if (window.Meta.icon === undefined && window.Meta.name === undefined) { 103 | $('#meta-info').hide(); 104 | } else { 105 | $('#meta-info').show(); 106 | } 107 | } 108 | 109 | function setLastIPRPI(element) { 110 | let result; 111 | 112 | const decodedCookie = decodeURIComponent(document.cookie); 113 | const cookies = decodedCookie.split(';'); 114 | 115 | $.each(cookies, (i, field) => { 116 | while (field.charAt(0) === ' ') { 117 | field = field.substring(1); 118 | } 119 | if (field.indexOf('last_ip=') === 0) { 120 | result = field.substring('last_ip='.length, field.length); 121 | } 122 | }); 123 | 124 | if (result !== undefined) { 125 | $(element).val(result); 126 | } else { 127 | $(element).val('0.0.0.0'); 128 | document.cookie = 'last_ip=0.0.0.0; expires=Tue, 19 Jan 2038 03:14:07 UTC;'; 129 | } 130 | } 131 | 132 | function validateInputRPI(inputType, value) { 133 | let pattern; 134 | 135 | if (inputType === 'IP') { 136 | pattern = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/; 137 | } else if (inputType === 'URL') { 138 | pattern = /^http[s]?:\/\/.+/i; 139 | } else if (inputType === 'ContentID') { 140 | pattern = /^[A-Z]{2}[0-9]{4}-[A-Z]{4}[0-9]{5}_[0-9]{2}-[A-Z0-9]{16}$/; 141 | } else if (inputType === 'TitleID') { 142 | pattern = /^[A-Z]{4}[0-9]{5}$/; 143 | } else if (inputType === 'TaskID') { 144 | pattern = /^(?:[1-9][0-9]{3}|[1-9][0-9]{2}|[1-9][0-9]|[0-9])$/; 145 | } else { 146 | return false; 147 | } 148 | return pattern.test(value); 149 | } 150 | 151 | function sendCommandRPI(ip, endpoint, command) { 152 | const compiledURL = `http://${ip}:12800/api/${endpoint}`; 153 | 154 | if (validateInputRPI('IP', ip)) { 155 | document.cookie = `last_ip=${ip}; expires=Tue, 19 Jan 2038 03:14:07 UTC;`; 156 | return $.ajax({ 157 | type: 'POST', 158 | contentType: 'application/json; charset=utf-8', 159 | dataType: 'json', 160 | url: compiledURL, 161 | data: command, 162 | async: false, 163 | beforeSend: () => { 164 | $('#sendingOverlay').show(); 165 | }, 166 | complete: () => { 167 | $('#sendingOverlay').hide(); 168 | }, 169 | }).responseJSON; 170 | } 171 | // eslint-disable-next-line no-alert 172 | alert('Invalid IP'); 173 | return undefined; 174 | } 175 | 176 | function isExistsRPI(ip, tid) { 177 | let response; 178 | let type; 179 | 180 | if (validateInputRPI('TitleID', tid.toUpperCase())) { 181 | response = sendCommandRPI(ip, 'is_exists', `{"title_id": "${tid.toUpperCase()}"}`); 182 | type = response.status; 183 | // TODO: Parse response 184 | showResponseRPI(type, response); 185 | return; 186 | } 187 | // eslint-disable-next-line no-alert 188 | alert('Validation Error'); 189 | } 190 | 191 | function installRPI(ip, urlType, url) { 192 | let response; 193 | let type; 194 | 195 | if (validateInputRPI('URL', url)) { 196 | if (urlType === 'direct') { 197 | response = sendCommandRPI(ip, 'install', `{"type": "direct", "packages": ["${url}"]}`); 198 | } else if (urlType === 'ref_pkg_url') { 199 | response = sendCommandRPI(ip, 'install', `{"type": "ref_pkg_url", "url": "${url}"}`); 200 | } 201 | type = response.status; 202 | // TODO: Parse response 203 | showResponseRPI(type, response); 204 | return; 205 | } 206 | // eslint-disable-next-line no-alert 207 | alert('Validation Error'); 208 | } 209 | 210 | function uninstallRPI(ip, endpoint, uid) { 211 | let response; 212 | let type; 213 | 214 | if (endpoint === 'uninstall_game' || endpoint === 'uninstall_patch') { 215 | if (validateInputRPI('TitleID', uid.toUpperCase())) { 216 | response = sendCommandRPI(ip, endpoint, `{"title_id": "${uid.toUpperCase()}"}`); 217 | type = response.status; 218 | // TODO: Parse response 219 | showResponseRPI(type, response); 220 | return; 221 | } 222 | } else if (endpoint === 'uninstall_ac' || endpoint === 'uninstall_theme') { 223 | if (validateInputRPI('ContentID', uid.toUpperCase())) { 224 | response = sendCommandRPI(ip, endpoint, `{"content_id": "${uid.toUpperCase()}"}`); 225 | type = response.status; 226 | // TODO: Parse response 227 | showResponseRPI(type, response); 228 | return; 229 | } 230 | } 231 | // eslint-disable-next-line no-alert 232 | alert('Validation Error'); 233 | } 234 | 235 | function findTaskRPI(ip, taskType, cid) { 236 | let response; 237 | let type; 238 | 239 | if (validateInputRPI('ContentID', cid.toUpperCase())) { 240 | response = sendCommandRPI(ip, 'find_task', `{"content_id": "${cid.toUpperCase()}", "sub_type": ${taskType}}`); 241 | type = response.status; 242 | // TODO: Parse response 243 | showResponseRPI(type, response); 244 | return; 245 | } 246 | // eslint-disable-next-line no-alert 247 | alert('Validation Error'); 248 | } 249 | 250 | function taskRPI(ip, taskType, taskID) { 251 | let response; 252 | let type; 253 | 254 | if (validateInputRPI('TaskID', taskID)) { 255 | response = sendCommandRPI(ip, taskType, `{"task_id": ${taskID}}`); 256 | type = response.status; 257 | // TODO: Parse response 258 | showResponseRPI(type, response); 259 | return; 260 | } 261 | // eslint-disable-next-line no-alert 262 | alert('Validation Error'); 263 | } 264 | 265 | function makePkgButtonRPI(pkgName, pkgSize, pkgURL) { 266 | let output; 267 | 268 | const truncateLength = 43; 269 | let truncatedName = pkgName.substring(0, truncateLength - 3); 270 | 271 | if (pkgName.length > truncateLength) { 272 | truncatedName += '...'; 273 | } 274 | 275 | const i = pkgSize === 0 ? 0 : Math.floor(Math.log(pkgSize) / Math.log(1024)); 276 | const formattedSize = `${(pkgSize / (1024 ** i)).toFixed(2) * 1} ${['B', 'kB', 'MB', 'GB', 'TB'][i]}`; 277 | output = '`; 280 | 281 | return output; 282 | } 283 | 284 | function makePkgArrayRPI(pkgJson) { 285 | let output = ''; 286 | 287 | if (pkgJson !== undefined) { 288 | $.each(pkgJson, (i, field) => { 289 | if (field === 'No PKGs Found') { 290 | output = '

No PKGs found on host

'; 291 | } else if (field === 'I/O Error on Host') { 292 | output = '

I/O error on host

'; 293 | } else if (field === 'No results') { 294 | output = '

No results

'; 295 | } else { 296 | output += makePkgButtonRPI(field.Filename, field.Filesize, field.File_URL); 297 | } 298 | }); 299 | } 300 | 301 | if (output === '') { 302 | output = '

Error connecting to host

'; 303 | } 304 | return output; 305 | } 306 | 307 | function checkPkgLink() { 308 | let match; 309 | 310 | const patternCID = /[A-Z]{2}[0-9]{4}-([A-Z]{4}[0-9]{5}_[0-9]{2})-[A-Z0-9]{16}/i; 311 | const patternTID = /([A-Z]{4}[0-9]{5})/i; 312 | 313 | if (patternCID.test($('#installURL').val())) { 314 | match = patternCID.exec($('#installURL').val()); 315 | match = match[1].toUpperCase(); 316 | displayTIDMetaRPI(match); 317 | } else if (patternTID.test($('#installURL').val())) { 318 | match = patternTID.exec($('#installURL').val()); 319 | match = `${match[1].toUpperCase()}_00`; 320 | displayTIDMetaRPI(match); 321 | } else { 322 | $('#meta-info').hide(); 323 | } 324 | } 325 | 326 | $(() => { 327 | let searchJson; 328 | let searchTerm; 329 | 330 | window.Meta = new TMDB(); 331 | 332 | if (!navigator.onLine) { 333 | $('#offlineOverlay').show(); 334 | return; 335 | } 336 | 337 | setLastIPRPI('#ip'); 338 | clearInputRPI(); 339 | const pkgJson = getPKGListRPI(); 340 | 341 | $('a[data-toggle="pill"]').click(() => { 342 | clearInputRPI(); 343 | $('#header').text($(this).text()); 344 | }); 345 | 346 | $('#pkgSearch').keyup(() => { 347 | searchJson = []; 348 | if (pkgJson !== 'No PKGs Found' && pkgJson !== 'I/O Error on Host') { 349 | searchTerm = $('#pkgSearch').val().toUpperCase(); 350 | $.each(pkgJson, (i, field) => { 351 | if (field.Filename.toUpperCase().indexOf(searchTerm) > -1) { 352 | searchJson.push(field); 353 | } 354 | }); 355 | 356 | if (pkgJson !== undefined && searchJson.length === 0) { 357 | searchJson = ['No results']; 358 | } 359 | $('#pkg-list').html(makePkgArrayRPI(searchJson)); 360 | } 361 | }); 362 | 363 | $('#installURL').keyup(checkPkgLink); 364 | 365 | $('#btn-exists').click(() => { 366 | isExistsRPI($('#ip').val(), $('#existID').val()); 367 | }); 368 | 369 | $('#btn-install-cdn').click(() => { 370 | installRPI($('#ip').val(), 'ref_pkg_url', $('#installURL').val()); 371 | }); 372 | 373 | $('#btn-install-url').click(() => { 374 | installRPI($('#ip').val(), 'direct', $('#installURL').val()); 375 | }); 376 | 377 | $('#btn-uninstall').click(() => { 378 | uninstallRPI($('#ip').val(), $('input[name=\'uninstallRadios\']:checked').val(), $('#uninstallID').val()); 379 | }); 380 | 381 | $('#btn-task-find').click(() => { 382 | findTaskRPI($('#ip').val(), $('input[name=\'taskRadios\']:checked').val(), $('#taskContentID').val()); 383 | }); 384 | 385 | $('#btn-task-star').click(() => { 386 | taskRPI($('#ip').val(), 'start_task', $('#taskID').val()); 387 | }); 388 | 389 | $('#btn-task-stop').click(() => { 390 | taskRPI($('#ip').val(), 'stop_task', $('#taskID').val()); 391 | }); 392 | 393 | $('#btn-task-pause').click(() => { 394 | taskRPI($('#ip').val(), 'pause_task', $('#taskID').val()); 395 | }); 396 | 397 | $('#btn-task-resume').click(() => { 398 | taskRPI($('#ip').val(), 'resume_task', $('#taskID').val()); 399 | }); 400 | 401 | $('#btn-task-unregister').click(() => { 402 | taskRPI($('#ip').val(), 'unregister_task', $('#taskID').val()); 403 | }); 404 | 405 | $('#btn-task-progress').click(() => { 406 | taskRPI($('#ip').val(), 'get_task_progress', $('#taskID').val()); 407 | }); 408 | 409 | $('#pkg-list').html(makePkgArrayRPI(pkgJson)); 410 | 411 | $('.btn-pkg-list').click((event) => { 412 | $('#installURL').val($(event.target).data('pkg-url')); 413 | checkPkgLink(); 414 | }); 415 | }); 416 | /* 417 | Copyright (c) 2017-2022 Al Azif, https://github.com/Al-Azif/ps4-exploit-host 418 | 419 | Permission is hereby granted, free of charge, to any person obtaining 420 | a copy of this software and associated documentation files (the 421 | "Software"), to deal in the Software without restriction, including 422 | without limitation the rights to use, copy, modify, merge, publish, 423 | distribute, sublicense, and/or sell copies of the Software, and to 424 | permit persons to whom the Software is furnished to do so, subject to 425 | the following conditions: 426 | 427 | The above copyright notice and this permission notice shall be 428 | included in all copies or substantial portions of the Software. 429 | 430 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 431 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 432 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 433 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 434 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 435 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 436 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 437 | */ 438 | -------------------------------------------------------------------------------- /themes/Default/sha.js: -------------------------------------------------------------------------------- 1 | /* 2 | A JavaScript implementation of the SHA family of hashes, as 3 | defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding 4 | HMAC implementation as defined in FIPS PUB 198a 5 | 6 | Copyright Brian Turek 2008-2017 7 | Distributed under the BSD License 8 | See http://caligatio.github.com/jsSHA/ for more information 9 | 10 | Several functions taken from Paul Johnston 11 | */ 12 | 'use strict';(function(Y){function C(c,a,b){var e=0,h=[],n=0,g,l,d,f,m,q,u,r,I=!1,v=[],w=[],t,y=!1,z=!1,x=-1;b=b||{};g=b.encoding||"UTF8";t=b.numRounds||1;if(t!==parseInt(t,10)||1>t)throw Error("numRounds must a integer >= 1");if("SHA-1"===c)m=512,q=K,u=Z,f=160,r=function(a){return a.slice()};else if(0===c.lastIndexOf("SHA-",0))if(q=function(a,b){return L(a,b,c)},u=function(a,b,h,e){var k,f;if("SHA-224"===c||"SHA-256"===c)k=(b+65>>>9<<4)+15,f=16;else if("SHA-384"===c||"SHA-512"===c)k=(b+129>>>10<< 13 | 5)+31,f=32;else throw Error("Unexpected error in SHA-2 implementation");for(;a.length<=k;)a.push(0);a[b>>>5]|=128<<24-b%32;b=b+h;a[k]=b&4294967295;a[k-1]=b/4294967296|0;h=a.length;for(b=0;be;e+=1)c[e]=a[e].slice();return c};x=1;if("SHA3-224"=== 15 | c)m=1152,f=224;else if("SHA3-256"===c)m=1088,f=256;else if("SHA3-384"===c)m=832,f=384;else if("SHA3-512"===c)m=576,f=512;else if("SHAKE128"===c)m=1344,f=-1,F=31,z=!0;else if("SHAKE256"===c)m=1088,f=-1,F=31,z=!0;else throw Error("Chosen SHA variant is not supported");u=function(a,c,e,b,h){e=m;var k=F,f,g=[],n=e>>>5,l=0,d=c>>>5;for(f=0;f=e;f+=n)b=D(a.slice(f,f+n),b),c-=e;a=a.slice(f);for(c%=e;a.length>>3;a[f>>2]^=k<=h)break;g.push(a.a);l+=1;0===64*l%e&&D(null,b)}return g}}else throw Error("Chosen SHA variant is not supported");d=M(a,g,x);l=A(c);this.setHMACKey=function(a,b,h){var k;if(!0===I)throw Error("HMAC key already set");if(!0===y)throw Error("Cannot set HMAC key after calling update");if(!0===z)throw Error("SHAKE is not supported for HMAC");g=(h||{}).encoding||"UTF8";b=M(b,g,x)(a);a=b.binLen;b=b.value;k=m>>>3;h=k/4-1;if(ka/8){for(;b.length<=h;)b.push(0);b[h]&=4294967040}for(a=0;a<=h;a+=1)v[a]=b[a]^909522486,w[a]=b[a]^1549556828;l=q(v,l);e=m;I=!0};this.update=function(a){var c,b,k,f=0,g=m>>>5;c=d(a,h,n);a=c.binLen;b=c.value;c=a>>>5;for(k=0;k>>5);n=a%m;y=!0};this.getHash=function(a,b){var k,g,d,m;if(!0===I)throw Error("Cannot call getHash after setting HMAC key");d=N(b);if(!0===z){if(-1===d.shakeLen)throw Error("shakeLen must be specified in options"); 18 | f=d.shakeLen}switch(a){case "HEX":k=function(a){return O(a,f,x,d)};break;case "B64":k=function(a){return P(a,f,x,d)};break;case "BYTES":k=function(a){return Q(a,f,x)};break;case "ARRAYBUFFER":try{g=new ArrayBuffer(0)}catch(p){throw Error("ARRAYBUFFER not supported by this environment");}k=function(a){return R(a,f,x)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER");}m=u(h.slice(),n,e,r(l),f);for(g=1;g>>24-f%32),m=u(m,f, 19 | 0,A(c),f);return k(m)};this.getHMAC=function(a,b){var k,g,d,p;if(!1===I)throw Error("Cannot call getHMAC without first setting HMAC key");d=N(b);switch(a){case "HEX":k=function(a){return O(a,f,x,d)};break;case "B64":k=function(a){return P(a,f,x,d)};break;case "BYTES":k=function(a){return Q(a,f,x)};break;case "ARRAYBUFFER":try{k=new ArrayBuffer(0)}catch(v){throw Error("ARRAYBUFFER not supported by this environment");}k=function(a){return R(a,f,x)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER"); 20 | }g=u(h.slice(),n,e,r(l),f);p=q(w,A(c));p=u(g,f,m,p,f);return k(p)}}function b(c,a){this.a=c;this.b=a}function O(c,a,b,e){var h="";a/=8;var n,g,d;d=-1===b?3:0;for(n=0;n>>2]>>>8*(d+n%4*b),h+="0123456789abcdef".charAt(g>>>4&15)+"0123456789abcdef".charAt(g&15);return e.outputUpper?h.toUpperCase():h}function P(c,a,b,e){var h="",n=a/8,g,d,p,f;f=-1===b?3:0;for(g=0;g>>2]:0,p=g+2>>2]:0,p=(c[g>>>2]>>>8*(f+g%4*b)&255)<<16|(d>>>8*(f+(g+1)%4*b)&255)<<8|p>>>8*(f+ 21 | (g+2)%4*b)&255,d=0;4>d;d+=1)8*g+6*d<=a?h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p>>>6*(3-d)&63):h+=e.b64Pad;return h}function Q(c,a,b){var e="";a/=8;var h,d,g;g=-1===b?3:0;for(h=0;h>>2]>>>8*(g+h%4*b)&255,e+=String.fromCharCode(d);return e}function R(c,a,b){a/=8;var e,h=new ArrayBuffer(a),d,g;g=new Uint8Array(h);d=-1===b?3:0;for(e=0;e>>2]>>>8*(d+e%4*b)&255;return h}function N(c){var a={outputUpper:!1,b64Pad:"=",shakeLen:-1};c=c||{}; 22 | a.outputUpper=c.outputUpper||!1;!0===c.hasOwnProperty("b64Pad")&&(a.b64Pad=c.b64Pad);if(!0===c.hasOwnProperty("shakeLen")){if(0!==c.shakeLen%8)throw Error("shakeLen must be a multiple of 8");a.shakeLen=c.shakeLen}if("boolean"!==typeof a.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!==typeof a.b64Pad)throw Error("Invalid b64Pad formatting option");return a}function M(c,a,b){switch(a){case "UTF8":case "UTF16BE":case "UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE"); 23 | }switch(c){case "HEX":c=function(a,c,d){var g=a.length,l,p,f,m,q,u;if(0!==g%2)throw Error("String of HEX type must be in byte increments");c=c||[0];d=d||0;q=d>>>3;u=-1===b?3:0;for(l=0;l>>1)+q;for(f=m>>>2;c.length<=f;)c.push(0);c[f]|=p<<8*(u+m%4*b)}return{value:c,binLen:4*g+d}};break;case "TEXT":c=function(c,h,d){var g,l,p=0,f,m,q,u,r,t;h=h||[0];d=d||0;q=d>>>3;if("UTF8"===a)for(t=-1=== 24 | b?3:0,f=0;fg?l.push(g):2048>g?(l.push(192|g>>>6),l.push(128|g&63)):55296>g||57344<=g?l.push(224|g>>>12,128|g>>>6&63,128|g&63):(f+=1,g=65536+((g&1023)<<10|c.charCodeAt(f)&1023),l.push(240|g>>>18,128|g>>>12&63,128|g>>>6&63,128|g&63)),m=0;m>>2;h.length<=u;)h.push(0);h[u]|=l[m]<<8*(t+r%4*b);p+=1}else if("UTF16BE"===a||"UTF16LE"===a)for(t=-1===b?2:0,l="UTF16LE"===a&&1!==b||"UTF16LE"!==a&&1===b,f=0;f>>8);r=p+q;for(u=r>>>2;h.length<=u;)h.push(0);h[u]|=g<<8*(t+r%4*b);p+=2}return{value:h,binLen:8*p+d}};break;case "B64":c=function(a,c,d){var g=0,l,p,f,m,q,u,r,t;if(-1===a.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");p=a.indexOf("=");a=a.replace(/\=/g,"");if(-1!==p&&p").concat(a.themes[i],""));try{$("#theme-selection option[value='".concat(c,"']")).attr("selected",!0)}catch(a){}}navigator.onLine?$("#custom-theme-options").show():$("#custom-theme-options").hide();var d=getStorage("background-image-url"),e=getStorage("custom-css-url"),f=getStorage("custom-js-url");d&&$("#background-image-url").val(d),e&&$("#custom-css-url").val(e),f&&$("#custom-js-url").val(f),$("#submit-language").on("click",function(){setCookie("language",$("#language-selection").val(),36500)}),$("#submit-theme").on("click",function(){getCookie("theme")!==$("#theme-selection").val()&&(setCookie("theme",$("#theme-selection").val(),36500),window.location.reload())});var g=/^https?:\/\/.+\..+/i;$("#submit-background-image").on("click",function(){""===$("#background-image-url").val()?($("body").css("background-image",""),deleteStorage("background-image-url"),deleteStorage("background-image")):$("#background-image-url").val().match(g)&&imageToBackground($("#background-image-url").val(),function(a){setStorage("background-image-url",$("#background-image-url").val(),"string"),setStorage("background-image",a,"string"),$("body").css("background-image","url('".concat(a,"')"))},!1)}),$("#submit-css").on("click",function(){$("style").remove(),""===$("#custom-css-url").val()?(deleteStorage("custom-css-url"),deleteStorage("custom-css")):$("#custom-css-url").val().match(g)&&getDataAsync($("#custom-css-url").val(),function(a){setStorage("custom-css",a,"string"),setStorage("custom-css-url",$("#custom-css-url").val(),"string"),$("head").append(""))},!0)}),$("#submit-js").on("click",function(){""===$("#custom-js-url").val()?(deleteStorage("custom-js-url"),deleteStorage("custom-js"),window.location.reload()):$("#custom-js-url").val().match(g)&&getDataAsync($("#custom-js-url").val(),function(a){setStorage("custom-js",a,"string"),setStorage("custom-js-url",$("#custom-js-url").val(),"string"),window.location.reload()},!0)}),$("#reload-page").on("click",function(){window.location.reload()}),$("#reset-defaults").on("click",function(){deleteStorage("background-image-url"),deleteStorage("background-image"),deleteStorage("custom-css-url"),deleteStorage("custom-css"),deleteStorage("custom-js-url"),deleteStorage("custom-js"),window.location.reload()}),window.Failsafe||(window.location.hash?window.history.pushState({location:window.history.state.location,modal:!0},null,"#".concat(window.history.state.location)):window.history.pushState({location:window.history.state.location,modal:!0},null," "),$("#settings-modal").on("hide.bs.modal",function(){""===window.history.state.location?displayHome():displayCategory(window.history.state.location)})),$("#settings-modal").modal("show")})}function urlModal(){$("#submit-url-redirect").on("click",function(){window.location.href=$("#url-redirect").val()}),window.Failsafe||(window.location.hash?window.history.pushState({location:window.history.state.location,modal:!0},null,"#".concat(window.history.state.location)):window.history.pushState({location:window.history.state.location,modal:!0},null," "),$("#url-modal").on("hide.bs.modal",function(){""===window.history.state.location?displayHome():displayCategory(window.history.state.location)})),$("#url-modal").modal("show")}function randomBackground(){var a=["url(\"".concat(getBasePath(),"/themes/Default/images/0.png\")"),"url(\"".concat(getBasePath(),"/themes/Default/images/1.png\")"),"url(\"".concat(getBasePath(),"/themes/Default/images/2.png\")"),"url(\"".concat(getBasePath(),"/themes/Default/images/3.png\")")];$("body").css("background-image",a[Math.floor(Math.random()*a.length)])}function buildAfterCaching(){getMenuAsync(function(a){if(void 0!==a){if(window.Menu=a,navigator.onLine&&newsAlert(),!navigator.onLine){var b=JSON.parse(getStorage("cache-status"));$.each(window.Menu,function(a,c){$.each(c.entries,function(c,d){d.offline?(!{}.hasOwnProperty.call(b,a)||!{}.hasOwnProperty.call(b[a],c))&&delete window.Menu[a].entries[c]:delete window.Menu[a].entries[c]}),$.isEmptyObject(window.Menu[a].entries)&&delete window.Menu[a]})}triggerAutoload(),buildHTML(),window.location.hash?decodeURIComponent(window.location.hash.substr(1))in window.Menu?displayCategory(decodeURIComponent(window.location.hash.substr(1))):displayHome():1===Object.keys(window.Menu).length?displayCategory(Object.keys(window.Menu)[0]):displayHome(),$(window).on("keyup",function(a){27===a.keyCode&&(clearFrame(),clearOverlays(),$(".modal").is(":visible")?$(".modal").modal("hide"):displayHome()),118===a.keyCode&&($(".modal").modal("hide"),$("#settings-modal").is(":visible")?$("#url-modal").modal("show"):$("#settings-modal").modal("show"))}),$(".category-button").on("click",function(a){displayCategory($(a.target).data("category"))}),$(".entry-button").on("click",function(a){if(window.Menu[$(a.target).data("category")].entries[$(a.target).data("entry")].params){var b=window.Menu[$(a.target).data("category")].entries[$(a.target).data("entry")].params.replace(/{{EXPLOIT_LOCATION}}/g,"".concat(getBasePath(),"/exploits/").concat($(a.target).data("category"),"/").concat($(a.target).data("entry"),"/index.html"));b=b.replace(/\/\/ {{LOADER}}/g,"$('#param-modal').modal('hide');showLoader();"),$("#param-modal-title").text($(a.target).data("entry")),$("#param-modal-body").html(b),$("#param-modal").modal("show")}else exploitLoader($(a.target).data("category"),$(a.target).data("entry"))}),$(".about-button").on("click",function(a){$(a.target).data("entry")?entryMeta($(a.target).data("category"),$(a.target).data("entry")):categoryMeta($(a.target).data("category"))}),$(".autoload-button").on("click",function(a){startAutoload($(a.target).data("category"),$(a.target).data("entry"))}),$(".cache-button").on("click",function(a){$(a.target).data("entry")?cacheEntry($(a.target).data("category"),$(a.target).data("entry")):cacheCategory($(a.target).data("category"))}),$(".cache-all-button").on("click",function(a){$(a.target).data("category")?cacheCategory($(a.target).data("category")):cacheAll()}),$(".refresh-button").on("click",function(){window.location.reload(!0)}),$(".back-button").on("click",function(){displayHome()}),$("#settings-modal").on("show.bs.modal",settingsModal),$("#url-modal").on("show.bs.modal",urlModal)}else{$(document).prop("title","Menu Error | Exploit Host by Al Azif"),$("#title").text("Menu Error"),$("#header").text("");var c="
";c+="
",c+="",c+="
",c+="
",c+="",c+="
",c+="
",$("#buttons").html(c)}})}function cacheInterface(a){var b,c,d;if("ondownloading"===a)$("#bar-text").html("Caching..."),showCaching();else if("ondownloading-theme"===a)$("#bar-text").html("Caching Theme..."),showCaching();else{var e=$("#ifr")[0].contentDocument.URL+"",f=/\/cache\/(theme|category|entry|all)\/.*index\.html$/,g=/\/cache\/category\/(.*)\/index\.html$/,h=/\/cache\/entry\/(.*)\/(.*)\/index\.html$/,i=f.exec(e);"category"===i[1]?(b=g.exec(e),c=decodeURIComponent(b[1])):"entry"===i[1]&&(b=h.exec(e),c=decodeURIComponent(b[1]),d=decodeURIComponent(b[2])),clearFrame(),$("#ifr").one("load",function(){clearOverlays(),"oncached"===a?(myAlert("success","Cached Successfully"),addCacheStatus(i[1],c,d),triggerAutoload()):"onupdateready"===a?(myAlert("success","Cache updated"),addCacheStatus(i[1],c,d),triggerAutoload()):"onnoupdate"===a?(myAlert("primary","No update available"),addCacheStatus(i[1],c,d),triggerAutoload()):"onerror"===a?(myAlert("danger","Error caching resources"),removeCacheStatus(i[1],c,d),triggerAutoload()):"onobsolete"===a?(myAlert("danger","Manifest returned a 404, cache was deleted"),removeCacheStatus(i[1],c,d),triggerAutoload()):"oncached-theme"===a||"onnoupdate-theme"===a?buildAfterCaching():"onupdateready-theme"===a?(deleteCookie("newsDate"),window.location.reload(!0)):"onerror-theme"===a?(buildAfterCaching(),myAlert("danger","Error caching theme resources")):"onobsolete-theme"===a?(buildAfterCaching(),myAlert("danger","Manifest returned a 404, theme cache was deleted")):"onerror-appcache-theme"===a?(buildAfterCaching(),myAlert("danger","Browser does not support AppCache, theme was not cached")):"onerror-appcache"==a&&(myAlert("danger","Browser does not support AppCache, nothing was cached"),removeCacheStatus("all",void 0,void 0),triggerAutoload())})}}function cacheProgress(a){$("#bar-load").width("".concat(a,"%")),$("#bar-load").html("".concat(a,"%"))}$(function(){null===window.history.state&&(window.history.replaceState({},null,window.location.hash?window.location.hash:" "),null===window.history.state&&"true"!==getCookie("session-warning")&&(document.cookie="session-warning=true; domain=".concat(window.location.hostname,"; path=").concat(window.location.pathname,";"),alert("This session is bugged. The circle button will close the browser rather than going back in the menu. Use the on screen controls."))),window.Failsafe=null===window.history.state;var a=getCookie("theme");a===void 0?setCookie("theme","Default",36500):"Default"!==a&&(window.location.search+="".concat(a)),randomBackground();var b=getStorage("background-image"),c=getStorage("custom-css"),d=getStorage("custom-js");b&&$("body").css("background-image","url(".concat(b,")")),c&&$("head").append("")),d&&$("head").append("")),$("#ifr").attr("src","".concat(getBasePath(),"/blank.html")),$("#ifr").one("load",function(){navigator.onLine?cacheTheme():buildAfterCaching()})}); 2 | -------------------------------------------------------------------------------- /themes/Default/default.js.es6: -------------------------------------------------------------------------------- 1 | // --- Theme Functions -------------------------------------------------------- 2 | 3 | function myAlert(type, message, wait) { 4 | let safeWait; 5 | 6 | const alertID = `alert-${uuid()}`; 7 | let alertString = `'; 19 | $('#alert-box').append(alertString); 20 | $(`#${alertID}`).collapse('show'); 21 | // TODO: Alert systems to show multiple alerts that shift up when closed 22 | // Calculate top 23 | // $(`#alert-${randomID}`).css('top', ($('.alert').length)); 24 | if (safeWait !== 0) { 25 | sleep(safeWait).then(() => { 26 | $(`#${alertID}`).alert('close'); 27 | // TODO: Shift remaining alerts up 28 | }); 29 | } 30 | } 31 | 32 | function newsAlert() { 33 | getJsonAsync(`${getBasePath()}/api/news`, (response) => { 34 | if (response) { 35 | const news = response; 36 | const date = getCookie('newsDate'); 37 | if (news !== undefined && (date === undefined || news.Date > date) 38 | && news.Message !== undefined && news.Severity !== undefined) { 39 | if (autoloadCookie(window.Menu)) { 40 | // Alert will pause execution on the autoload redirect allowing users to see new news 41 | // eslint-disable-next-line no-alert 42 | alert(news.Message); 43 | setCookie('newsDate', news.Date, 30); 44 | } else { 45 | myAlert(`${news.Severity} alert-news`, news.Message, 0); 46 | $('.alert-news [data-dismiss="alert"]').on('click', () => { 47 | setCookie('newsDate', news.Date, 30); 48 | }); 49 | } 50 | } 51 | } 52 | }); 53 | } 54 | 55 | function buildHTML() { 56 | let htmlString = ''; 57 | 58 | if ($.isEmptyObject(window.Menu)) { 59 | htmlString = '
'; 60 | htmlString += '
'; 61 | htmlString += ''; 62 | htmlString += '
'; 63 | htmlString += '
'; 64 | htmlString += ''; 65 | htmlString += '
'; 66 | htmlString += '
'; 67 | $('#buttons').html(htmlString); 68 | return; 69 | } 70 | 71 | if ('error' in window.Menu && window.Menu.error === true && 'message' in window.Menu) { 72 | htmlString = '
'; 73 | htmlString += '
'; 74 | htmlString += ``; 75 | htmlString += '
'; 76 | htmlString += '
'; 77 | htmlString += ''; 78 | htmlString += '
'; 79 | htmlString += '
'; 80 | $('#buttons').html(htmlString); 81 | return; 82 | } 83 | 84 | if (window.Menu !== undefined) { 85 | htmlString = '
'; 86 | $.each(window.Menu, (i, field) => { 87 | htmlString += '
'; 88 | htmlString += ``; 89 | htmlString += ''; 90 | htmlString += ''; 97 | htmlString += '
'; 98 | }); 99 | if (navigator.onLine) { 100 | htmlString += '
'; 101 | htmlString += ''; 102 | htmlString += '
'; 103 | } 104 | htmlString += '
'; 105 | $('#buttons').append(htmlString); 106 | 107 | $.each(window.Menu, (i, field) => { 108 | htmlString = `
`; 109 | if ('error' in field.entries && field.entries.error === true && 'message' in field.entries) { 110 | htmlString += '
'; 111 | htmlString += ``; 112 | htmlString += '
'; 113 | htmlString += '
'; 114 | } else { 115 | $.each(field.entries, (j, entry) => { 116 | htmlString += '
'; 117 | htmlString += ``; 118 | htmlString += ''; 119 | htmlString += ''; 127 | htmlString += '
'; 128 | }); 129 | if (navigator.onLine && field.offline) { 130 | htmlString += '
'; 131 | htmlString += ``; 132 | htmlString += '
'; 133 | } 134 | if (window.Failsafe) { 135 | htmlString += '
'; 136 | htmlString += ''; 137 | htmlString += '
'; 138 | } 139 | htmlString += ''; 140 | } 141 | $('#buttons').append(htmlString); 142 | }); 143 | } 144 | } 145 | 146 | function clearOverlays() { 147 | $('#cache-overlay').hide(); 148 | $('#bar-text').hide(); 149 | $('#bar-back').hide(); 150 | $('#bar-load').hide(); 151 | $('#bar-load').html(''); 152 | $('#bar-load').width('0%'); 153 | $('#exploit-overlay').hide(); 154 | $('#exploit-message').hide(); 155 | $('#exploit-message').html(''); 156 | $('#exploit-loader').hide(); 157 | } 158 | 159 | function showCaching() { 160 | $('#cache-overlay').show(); 161 | $('#bar-text').show(); 162 | $('#bar-back').show(); 163 | $('#bar-load').show(); 164 | } 165 | 166 | function showLoader() { 167 | $('#exploit-overlay').show(); 168 | $('#exploit-loader').show(); 169 | $('#exploit-message').show(); 170 | } 171 | 172 | // eslint-disable-next-line no-unused-vars 173 | function exploitDone(message) { 174 | $('#exploit-loader').hide(); 175 | $('#exploit-message').html(message); 176 | const pattern = /^https?:\/\/.*\/exploits\/(.*)\/(.*)\/index.html/; 177 | const match = pattern.exec($('#ifr')[0].contentDocument.URL); 178 | const category = decodeURIComponent(match[1]); 179 | const entry = decodeURIComponent(match[2]); 180 | 181 | if (window.Menu[category].entries[entry].reload === true) { 182 | sleep(3000).then(() => { 183 | clearFrame(); 184 | clearOverlays(); 185 | }); 186 | } 187 | } 188 | 189 | function displayHome() { 190 | $(document).prop('title', 'Category Selection | Exploit Host by Al Azif'); 191 | window.history.replaceState({ location: '', modal: false }, null, ' '); 192 | 193 | $('#title').text('Category Selection'); 194 | $('#header').text('Categories'); 195 | 196 | $('.category-page').hide(); 197 | $('#category-buttons').show(); 198 | } 199 | 200 | function displayCategory(category) { 201 | $(document).prop('title', 'Exploit Selection | Exploit Host by Al Azif'); 202 | window.history.pushState({ location: category, modal: false }, null, `#${category}`); 203 | 204 | $('#title').text('Exploit Selection'); 205 | $('#header').text(category); 206 | 207 | $('#category-buttons').hide(); 208 | $('.category-page').hide(); 209 | 210 | $('.category-page').each((i, field) => { 211 | if (String($(field).data('category')) === String(category)) { 212 | $(field).show(); 213 | } 214 | }); 215 | } 216 | 217 | function exploitLoader(category, entry) { 218 | showLoader(); 219 | loadEntry(category, entry, window.Menu[category].entries[entry].redirect); 220 | } 221 | 222 | function triggerAutoload() { 223 | const autoload = autoloadCookie(window.Menu); 224 | if (autoload) { 225 | const autoloadCategory = autoload.split('/')[0]; 226 | const autoloadEntry = autoload.split('/')[1]; 227 | exploitLoader(autoloadCategory, autoloadEntry); 228 | } 229 | } 230 | 231 | function startAutoload(category, entry) { 232 | setAutoload(category, entry); 233 | 234 | if (!navigator.onLine && (!window.Menu[category].offline 235 | || !window.Menu[category].entries[entry].offline)) { 236 | myAlert('danger', 'Could not autoload, payload is online only (Currently offline)'); 237 | } else if (navigator.onLine && window.Menu[category].offline 238 | && window.Menu[category].entries[entry].offline) { 239 | cacheEntry(category, entry); 240 | } else { 241 | triggerAutoload(); 242 | } 243 | } 244 | 245 | function addCacheStatus(type, category, entry) { 246 | // Unsure if the recursive option is better, looks better, but performance is 247 | // unknown because of ths repeating localStorage access vs all at once 248 | let categoryKeys = []; 249 | let entryKeys = []; 250 | const cacheStatusChanges = {}; 251 | 252 | if (!getStorage('cache-status')) { 253 | setStorage('cache-status', '{}', 'string'); 254 | } 255 | 256 | const existingCacheStatus = JSON.parse(getStorage('cache-status')); 257 | 258 | if (type === 'all') { 259 | categoryKeys = Object.keys(window.Menu); 260 | for (let i = 0; i < categoryKeys.length; i += 1) { 261 | // Recursive Option: 262 | // addCacheStatus('category', categoryKeys[i], undefined) 263 | entryKeys = Object.keys(window.Menu[categoryKeys[i]].entries); 264 | for (let j = 0; j < entryKeys.length; j += 1) { 265 | $.extend(true, cacheStatusChanges, { 266 | [categoryKeys[i]]: { 267 | [window.Menu[categoryKeys[i]].entries[entryKeys[j]].title]: new Date().toISOString(), 268 | }, 269 | }); 270 | } 271 | } 272 | setStorage('cache-status', JSON.stringify($.extend({}, existingCacheStatus, cacheStatusChanges)), 'string'); 273 | } else if (type === 'category') { 274 | entryKeys = Object.keys(window.Menu[category].entries); 275 | for (let i = 0; i < entryKeys.length; i += 1) { 276 | // Recursive Option: 277 | // addCacheStatus('entry', category, window.Menu[category].entries[entryKeys[i]].title); 278 | $.extend(true, cacheStatusChanges, { 279 | [category]: { 280 | [window.Menu[category].entries[entryKeys[i]].title]: new Date().toISOString(), 281 | }, 282 | }); 283 | } 284 | setStorage('cache-status', JSON.stringify($.extend(true, {}, existingCacheStatus, cacheStatusChanges)), 'string'); 285 | } else if (type === 'entry') { 286 | setStorage('cache-status', JSON.stringify($.extend(true, {}, existingCacheStatus, { 287 | [category]: { 288 | [entry]: new Date().toISOString(), 289 | }, 290 | })), 'string'); 291 | } 292 | } 293 | 294 | function removeCacheStatus(type, category, entry) { 295 | if (!navigator.onLine) { 296 | return; 297 | } 298 | 299 | if (!getStorage('cache-status')) { 300 | setStorage('cache-status', '{}', 'string'); 301 | return; 302 | } 303 | 304 | const existingCacheStatus = JSON.parse(getStorage('cache-status')); 305 | 306 | if (type === 'all') { 307 | setStorage('cache-status', '{}', 'string'); 308 | } else if (type === 'category') { 309 | delete existingCacheStatus[category]; 310 | setStorage('cache-status', JSON.stringify(existingCacheStatus), 'string'); 311 | } else if (type === 'entry') { 312 | delete existingCacheStatus[category][entry]; 313 | setStorage('cache-status', JSON.stringify(existingCacheStatus), 'string'); 314 | } 315 | } 316 | 317 | function categoryMeta(category) { 318 | let lang; 319 | let modalBody; 320 | let notes; 321 | const meta = window.Menu[category]; 322 | 323 | if (typeof meta === 'undefined') { 324 | myAlert('danger', 'Unable to retrieve metadata'); 325 | return; 326 | } 327 | 328 | $.extend(true, { 329 | title: '', 330 | device: '', 331 | firmware: '', 332 | user_agents: '', 333 | notes: { 334 | default: '', 335 | }, 336 | }, meta); 337 | 338 | const uaMatch = checkUAMatch(meta.user_agents) ? 'Match' : 'Mismatch'; 339 | 340 | lang = getCookie('language'); 341 | if (typeof lang !== 'string') { 342 | setCookie('language', 'default', 100 * 365); 343 | lang = 'default'; 344 | } 345 | 346 | if (typeof meta.notes[lang] === 'string') { 347 | notes = meta.notes[lang]; 348 | } else { 349 | notes = meta.notes.default; 350 | } 351 | 352 | modalBody = `
Device:
${meta.device}
`; 353 | modalBody += `
Firmware:
${meta.firmware}
`; 354 | modalBody += `
UA Match?:
${uaMatch}
`; 355 | modalBody += `
Notes:
${notes}
`; 356 | 357 | $('#meta-modal-title').html(meta.title); 358 | $('#meta-modal-body').html(modalBody); 359 | 360 | if (!window.Failsafe) { 361 | if (window.location.hash) { 362 | window.history.pushState({ location: window.history.state.location, modal: true }, null, `#${window.history.state.location}`); 363 | } else { 364 | window.history.pushState({ location: window.history.state.location, modal: true }, null, ' '); 365 | } 366 | 367 | $('#meta-modal').on('hide.bs.modal', () => { 368 | if (window.history.state.location === '') { 369 | displayHome(); 370 | } else { 371 | displayCategory(window.history.state.location); 372 | } 373 | }); 374 | } 375 | 376 | $('#meta-modal').modal('show'); 377 | } 378 | 379 | function isValidDate(inputDate) { 380 | const compiledDate = new Date(inputDate); 381 | if (Number.isNaN) { 382 | return compiledDate instanceof Date && !Number.isNaN(Number(compiledDate)); 383 | } 384 | // Another 4.05 issue 385 | // eslint-disable-next-line no-restricted-globals 386 | return compiledDate instanceof Date && !isNaN(Number(compiledDate)); 387 | } 388 | 389 | function entryMeta(category, entry) { 390 | let updatedDate; 391 | let lang; 392 | let description; 393 | let modalBody; 394 | let cacheCheck = 'Not Cached'; 395 | const meta = window.Menu[category].entries[entry]; 396 | 397 | let cacheStatus = JSON.parse(getStorage('cache-status')); 398 | 399 | if (!cacheStatus) { 400 | cacheStatus = {}; 401 | } 402 | 403 | if (typeof meta === 'undefined') { 404 | myAlert('danger', 'Unable to retrieve metadata'); 405 | return; 406 | } 407 | 408 | $.extend(true, { 409 | title: '', 410 | version: '', 411 | updated: '', 412 | device: '', 413 | firmware: '', 414 | description: { 415 | default: '', 416 | }, 417 | author: '', 418 | url: '', 419 | }, meta); 420 | 421 | if (!meta.updated || !isValidDate(meta.updated)) { 422 | updatedDate = 'Invalid Date'; 423 | if (category in cacheStatus && entry in cacheStatus[category] 424 | && !isValidDate(new Date(updatedDate))) { 425 | cacheCheck = 'Unknown'; 426 | } 427 | } else { 428 | updatedDate = new Date(meta.updated).toLocaleString(); 429 | if (category in cacheStatus && entry in cacheStatus[category]) { 430 | if (new Date(updatedDate) <= new Date(cacheStatus[category][entry])) { 431 | cacheCheck = 'Up to Date'; 432 | } else { 433 | cacheCheck = 'Out of Date'; 434 | } 435 | } 436 | } 437 | 438 | lang = getCookie('language'); 439 | if (typeof lang !== 'string') { 440 | setCookie('language', 'default', 100 * 365); 441 | lang = 'default'; 442 | } 443 | 444 | if (typeof meta.description[lang] === 'string') { 445 | description = meta.description[lang]; 446 | } else { 447 | description = meta.description.default; 448 | } 449 | 450 | modalBody = `
Version:
${meta.version}
`; 451 | modalBody += `
Updated:
${updatedDate}
`; 452 | modalBody += `
Cache:
${cacheCheck}
`; 453 | modalBody += `
Device:
${meta.device}
`; 454 | modalBody += `
Firmware:
${meta.firmware}
`; 455 | modalBody += `
Description:
${description}
`; 456 | modalBody += `
Author(s):
${meta.author}
`; 457 | modalBody += ``; 458 | 459 | $('#meta-modal-title').html(meta.title); 460 | $('#meta-modal-body').html(modalBody); 461 | 462 | if (!window.Failsafe) { 463 | if (window.location.hash) { 464 | window.history.pushState({ location: window.history.state.location, modal: true }, null, `#${window.history.state.location}`); 465 | } else { 466 | window.history.pushState({ location: window.history.state.location, modal: true }, null, ' '); 467 | } 468 | 469 | $('#meta-modal').on('hide.bs.modal', () => { 470 | if (window.history.state.location === '') { 471 | displayHome(); 472 | } else { 473 | displayCategory(window.history.state.location); 474 | } 475 | }); 476 | } 477 | 478 | $('#meta-modal').modal('show'); 479 | } 480 | 481 | function settingsModal() { 482 | getSettingsAsync((settingsArray) => { 483 | if (settingsArray) { 484 | const currentLanguage = getCookie('language'); 485 | const currentTheme = getCookie('theme'); 486 | 487 | try { 488 | const languageKeys = Object.keys(settingsArray.languages); 489 | $('#language-selection').html(''); 490 | for (let i = 0; i < languageKeys.length; i += 1) { 491 | $('#language-selection').append(``); 492 | } 493 | 494 | $(`#language-selection option[value='${currentLanguage}']`).attr('selected', true); 495 | } catch (e) { /* Purposely Left Blank */ } 496 | 497 | $('#theme-selection').html(''); 498 | for (let i = 0; i < settingsArray.themes.length; i += 1) { 499 | $('#theme-selection').append(``); 500 | } 501 | 502 | try { 503 | $(`#theme-selection option[value='${currentTheme}']`).attr('selected', true); 504 | } catch (e) { /* Purposely Left Blank */ } 505 | } 506 | 507 | if (navigator.onLine) { 508 | $('#custom-theme-options').show(); 509 | } else { 510 | $('#custom-theme-options').hide(); 511 | } 512 | 513 | const backgroundURL = getStorage('background-image-url'); 514 | const cssURL = getStorage('custom-css-url'); 515 | const jsURL = getStorage('custom-js-url'); 516 | 517 | if (backgroundURL) { 518 | $('#background-image-url').val(backgroundURL); 519 | } 520 | if (cssURL) { 521 | $('#custom-css-url').val(cssURL); 522 | } 523 | if (jsURL) { 524 | $('#custom-js-url').val(jsURL); 525 | } 526 | 527 | $('#submit-language').on('click', () => { 528 | setCookie('language', $('#language-selection').val(), 100 * 365); 529 | }); 530 | 531 | $('#submit-theme').on('click', () => { 532 | if (getCookie('theme') !== $('#theme-selection').val()) { 533 | setCookie('theme', $('#theme-selection').val(), 100 * 365); 534 | window.location.reload(); 535 | } 536 | }); 537 | 538 | // Just a quick check to see if the URL is at least http(s)://*.* 539 | const urlRegex = /^https?:\/\/.+\..+/i; 540 | 541 | $('#submit-background-image').on('click', () => { 542 | if ($('#background-image-url').val() === '') { 543 | $('body').css('background-image', ''); 544 | deleteStorage('background-image-url'); 545 | deleteStorage('background-image'); 546 | } else if (($('#background-image-url').val()).match(urlRegex)) { 547 | imageToBackground($('#background-image-url').val(), (backgroundData) => { 548 | setStorage('background-image-url', $('#background-image-url').val(), 'string'); 549 | setStorage('background-image', backgroundData, 'string'); 550 | $('body').css('background-image', `url('${backgroundData}')`); 551 | }, false); 552 | } 553 | }); 554 | 555 | $('#submit-css').on('click', () => { 556 | $('style').remove(); 557 | if ($('#custom-css-url').val() === '') { 558 | deleteStorage('custom-css-url'); 559 | deleteStorage('custom-css'); 560 | } else if (($('#custom-css-url').val()).match(urlRegex)) { 561 | getDataAsync($('#custom-css-url').val(), (cssData) => { 562 | setStorage('custom-css', cssData, 'string'); 563 | setStorage('custom-css-url', $('#custom-css-url').val(), 'string'); 564 | $('head').append(``); 565 | }, true); 566 | } 567 | }); 568 | 569 | $('#submit-js').on('click', () => { 570 | if ($('#custom-js-url').val() === '') { 571 | deleteStorage('custom-js-url'); 572 | deleteStorage('custom-js'); 573 | window.location.reload(); 574 | } else if (($('#custom-js-url').val()).match(urlRegex)) { 575 | getDataAsync($('#custom-js-url').val(), (jsData) => { 576 | setStorage('custom-js', jsData, 'string'); 577 | setStorage('custom-js-url', $('#custom-js-url').val(), 'string'); 578 | window.location.reload(); 579 | }, true); 580 | } 581 | }); 582 | 583 | $('#reload-page').on('click', () => { 584 | window.location.reload(); 585 | }); 586 | 587 | $('#reset-defaults').on('click', () => { 588 | deleteStorage('background-image-url'); 589 | deleteStorage('background-image'); 590 | deleteStorage('custom-css-url'); 591 | deleteStorage('custom-css'); 592 | deleteStorage('custom-js-url'); 593 | deleteStorage('custom-js'); 594 | window.location.reload(); 595 | }); 596 | 597 | if (!window.Failsafe) { 598 | if (window.location.hash) { 599 | window.history.pushState({ location: window.history.state.location, modal: true }, null, `#${window.history.state.location}`); 600 | } else { 601 | window.history.pushState({ location: window.history.state.location, modal: true }, null, ' '); 602 | } 603 | 604 | $('#settings-modal').on('hide.bs.modal', () => { 605 | if (window.history.state.location === '') { 606 | displayHome(); 607 | } else { 608 | displayCategory(window.history.state.location); 609 | } 610 | }); 611 | } 612 | 613 | $('#settings-modal').modal('show'); 614 | }); 615 | } 616 | 617 | function urlModal() { 618 | $('#submit-url-redirect').on('click', () => { 619 | window.location.href = $('#url-redirect').val(); 620 | }); 621 | 622 | if (!window.Failsafe) { 623 | if (window.location.hash) { 624 | window.history.pushState({ location: window.history.state.location, modal: true }, null, `#${window.history.state.location}`); 625 | } else { 626 | window.history.pushState({ location: window.history.state.location, modal: true }, null, ' '); 627 | } 628 | 629 | $('#url-modal').on('hide.bs.modal', () => { 630 | if (window.history.state.location === '') { 631 | displayHome(); 632 | } else { 633 | displayCategory(window.history.state.location); 634 | } 635 | }); 636 | } 637 | $('#url-modal').modal('show'); 638 | } 639 | 640 | function randomBackground() { 641 | // TODO: Holiday images for certain dates 642 | // ex. 643 | // Dec 14th - Dec 27th show christmas.png 644 | // Dec 30 - Jan 2nd show newyears.png 645 | const imageArray = [ 646 | `url("${getBasePath()}/themes/Default/images/0.png")`, // Ithaqua 647 | `url("${getBasePath()}/themes/Default/images/1.png")`, // Cthugha 648 | `url("${getBasePath()}/themes/Default/images/2.png")`, // Ithaqua 649 | `url("${getBasePath()}/themes/Default/images/3.png")`, // Cthugha 650 | ]; 651 | 652 | $('body').css('background-image', imageArray[Math.floor(Math.random() * imageArray.length)]); 653 | } 654 | 655 | function buildAfterCaching() { 656 | // Build window.Menu 657 | getMenuAsync((response) => { 658 | if (response !== undefined) { 659 | window.Menu = response; 660 | 661 | // Display new alert if online. 662 | if (navigator.onLine) { 663 | newsAlert(); 664 | } 665 | 666 | // Modify Menu for cache 667 | if (!navigator.onLine) { 668 | const cacheStatus = JSON.parse(getStorage('cache-status')); 669 | $.each(window.Menu, (i, category) => { 670 | $.each(category.entries, (j, entry) => { 671 | if (!entry.offline) { 672 | delete window.Menu[i].entries[j]; 673 | } else if (!{}.hasOwnProperty.call(cacheStatus, i) 674 | || !{}.hasOwnProperty.call(cacheStatus[i], j)) { 675 | delete window.Menu[i].entries[j]; 676 | } 677 | }); 678 | if ($.isEmptyObject(window.Menu[i].entries)) { 679 | delete window.Menu[i]; 680 | } 681 | }); 682 | } 683 | 684 | // Try to autoload 685 | triggerAutoload(); 686 | 687 | // Build HTML 688 | buildHTML(); 689 | 690 | // Load preselected page based on URI hash and redirect to category if there is only one. 691 | if (window.location.hash) { 692 | if (decodeURIComponent(window.location.hash.substr(1)) in window.Menu) { 693 | displayCategory(decodeURIComponent(window.location.hash.substr(1))); 694 | } else { 695 | displayHome(); 696 | } 697 | } else if (Object.keys(window.Menu).length === 1) { 698 | displayCategory(Object.keys(window.Menu)[0]); 699 | } else { 700 | displayHome(); 701 | } 702 | 703 | // --- Handlers --------------------------------------------------------- 704 | 705 | $(window).on('keyup', (event) => { 706 | if (event.keyCode === 27) { 707 | clearFrame(); 708 | clearOverlays(); 709 | if ($('.modal').is(':visible')) { 710 | $('.modal').modal('hide'); 711 | } else { 712 | displayHome(); 713 | } 714 | } 715 | if (event.keyCode === 118) { 716 | $('.modal').modal('hide'); 717 | if ($('#settings-modal').is(':visible')) { 718 | $('#url-modal').modal('show'); 719 | } else { 720 | $('#settings-modal').modal('show'); 721 | } 722 | } 723 | }); 724 | 725 | $('.category-button').on('click', (event) => { 726 | displayCategory($(event.target).data('category')); 727 | }); 728 | 729 | $('.entry-button').on('click', (event) => { 730 | if (window.Menu[$(event.target).data('category')].entries[$(event.target).data('entry')].params) { 731 | // This way works but requires putting the param.html into the meta.json, thus always loading it into the browser 732 | let paramCompiled = window.Menu[$(event.target).data('category')].entries[$(event.target).data('entry')].params.replace(/{{EXPLOIT_LOCATION}}/g, `${getBasePath()}/exploits/${$(event.target).data('category')}/${$(event.target).data('entry')}/index.html`); 733 | paramCompiled = paramCompiled.replace(/\/\/ {{LOADER}}/g, '$(\'#param-modal\').modal(\'hide\');showLoader();'); 734 | $('#param-modal-title').text($(event.target).data('entry')); 735 | $('#param-modal-body').html(paramCompiled); 736 | $('#param-modal').modal('show'); 737 | /* This way is "better" but doesn't work currently. When offline the getDataAsync gets an error even though things like getAsyncMenu works... 738 | getDataAsync(`${getBasePath()}/exploits/${$(event.target).data('category')}/${$(event.target).data('entry')}/params.html`, (paramResponse) => { 739 | if (paramResponse) { 740 | let paramCompiled = paramResponse.replace(/{{EXPLOIT_LOCATION}}/g, `${getBasePath()}/exploits/${$(event.target).data('category')}/${$(event.target).data('entry')}/index.html`); 741 | paramCompiled = paramCompiled.replace(/\/\/ {{LOADER}}/g, '$(\'#param-modal\').modal(\'hide\');showLoader();'); 742 | $('#param-modal-title').text($(event.target).data('entry')); 743 | $('#param-modal-body').html(paramCompiled); 744 | $('#param-modal').modal('show'); 745 | } else { 746 | $('#param-modal-title').text($(event.target).data('entry')); 747 | $('#param-modal-body').html('

ERROR: Could not retrieve param options!

'); 748 | $('#param-modal').modal('show'); 749 | } 750 | }, false); 751 | */ 752 | } else { 753 | exploitLoader($(event.target).data('category'), $(event.target).data('entry')); 754 | } 755 | }); 756 | 757 | $('.about-button').on('click', (event) => { 758 | if ($(event.target).data('entry')) { 759 | entryMeta($(event.target).data('category'), $(event.target).data('entry')); 760 | } else { 761 | categoryMeta($(event.target).data('category')); 762 | } 763 | }); 764 | 765 | $('.autoload-button').on('click', (event) => { 766 | startAutoload($(event.target).data('category'), $(event.target).data('entry')); 767 | }); 768 | 769 | $('.cache-button').on('click', (event) => { 770 | if ($(event.target).data('entry')) { 771 | cacheEntry($(event.target).data('category'), $(event.target).data('entry')); 772 | } else { 773 | cacheCategory($(event.target).data('category')); 774 | } 775 | }); 776 | 777 | $('.cache-all-button').on('click', (event) => { 778 | if ($(event.target).data('category')) { 779 | cacheCategory($(event.target).data('category')); 780 | } else { 781 | cacheAll(); 782 | } 783 | }); 784 | 785 | $('.refresh-button').on('click', () => { 786 | window.location.reload(true); 787 | }); 788 | 789 | $('.back-button').on('click', () => { 790 | displayHome(); 791 | }); 792 | 793 | $('#settings-modal').on('show.bs.modal', settingsModal); 794 | $('#url-modal').on('show.bs.modal', urlModal); 795 | } else { 796 | $(document).prop('title', 'Menu Error | Exploit Host by Al Azif'); 797 | 798 | $('#title').text('Menu Error'); 799 | $('#header').text(''); 800 | 801 | let htmlString = '
'; 802 | htmlString += '
'; 803 | htmlString += ''; 804 | htmlString += '
'; 805 | htmlString += '
'; 806 | htmlString += ''; 807 | htmlString += '
'; 808 | htmlString += '
'; 809 | $('#buttons').html(htmlString); 810 | } 811 | }); 812 | } 813 | 814 | // eslint-disable-next-line no-unused-vars 815 | function cacheInterface(callback) { 816 | let matches; 817 | let categoryMatch; 818 | let entryMatch; 819 | 820 | if (callback === 'ondownloading') { 821 | $('#bar-text').html('Caching...'); 822 | showCaching(); 823 | } else if (callback === 'ondownloading-theme') { 824 | $('#bar-text').html('Caching Theme...'); 825 | showCaching(); 826 | } else { 827 | const iFrameURL = String($('#ifr')[0].contentDocument.URL); 828 | const typePattern = /\/cache\/(theme|category|entry|all)\/.*index\.html$/; 829 | const categoryPattern = /\/cache\/category\/(.*)\/index\.html$/; 830 | const entryPattern = /\/cache\/entry\/(.*)\/(.*)\/index\.html$/; 831 | const typeMatch = typePattern.exec(iFrameURL); 832 | if (typeMatch[1] === 'category') { 833 | matches = categoryPattern.exec(iFrameURL); 834 | categoryMatch = decodeURIComponent(matches[1]); 835 | } else if (typeMatch[1] === 'entry') { 836 | matches = entryPattern.exec(iFrameURL); 837 | categoryMatch = decodeURIComponent(matches[1]); 838 | entryMatch = decodeURIComponent(matches[2]); 839 | } 840 | 841 | clearFrame(); 842 | $('#ifr').one('load', () => { 843 | clearOverlays(); 844 | if (callback === 'oncached') { 845 | myAlert('success', 'Cached Successfully'); 846 | addCacheStatus(typeMatch[1], categoryMatch, entryMatch); 847 | triggerAutoload(); 848 | } else if (callback === 'onupdateready') { 849 | myAlert('success', 'Cache updated'); 850 | addCacheStatus(typeMatch[1], categoryMatch, entryMatch); 851 | triggerAutoload(); 852 | } else if (callback === 'onnoupdate') { 853 | myAlert('primary', 'No update available'); 854 | addCacheStatus(typeMatch[1], categoryMatch, entryMatch); 855 | triggerAutoload(); 856 | } else if (callback === 'onerror') { 857 | myAlert('danger', 'Error caching resources'); 858 | removeCacheStatus(typeMatch[1], categoryMatch, entryMatch); 859 | triggerAutoload(); 860 | } else if (callback === 'onobsolete') { 861 | myAlert('danger', 'Manifest returned a 404, cache was deleted'); 862 | removeCacheStatus(typeMatch[1], categoryMatch, entryMatch); 863 | triggerAutoload(); 864 | } else if (callback === 'oncached-theme' || callback === 'onnoupdate-theme') { 865 | buildAfterCaching(); 866 | } else if (callback === 'onupdateready-theme') { 867 | deleteCookie('newsDate'); 868 | window.location.reload(true); 869 | } else if (callback === 'onerror-theme') { 870 | buildAfterCaching(); 871 | myAlert('danger', 'Error caching theme resources'); 872 | } else if (callback === 'onobsolete-theme') { 873 | buildAfterCaching(); 874 | myAlert('danger', 'Manifest returned a 404, theme cache was deleted'); 875 | } else if (callback === 'onerror-appcache-theme') { 876 | buildAfterCaching(); 877 | myAlert('danger', 'Browser does not support AppCache, theme was not cached'); 878 | } else if (callback === 'onerror-appcache') { 879 | buildAfterCaching(); 880 | myAlert('danger', 'Browser does not support AppCache, nothing was cached'); 881 | removeCacheStatus('all', undefined, undefined); 882 | triggerAutoload(); 883 | } 884 | }); 885 | } 886 | } 887 | 888 | // eslint-disable-next-line no-unused-vars 889 | function cacheProgress(percent) { 890 | $('#bar-load').width(`${percent}%`); 891 | $('#bar-load').html(`${percent}%`); 892 | } 893 | 894 | // --- On Ready --------------------------------------------------------------- 895 | 896 | $(() => { 897 | if (window.history.state === null) { 898 | window.history.replaceState({}, null, window.location.hash ? window.location.hash : ' '); 899 | if (window.history.state === null && getCookie('session-warning') !== 'true') { 900 | document.cookie = `session-warning=true; domain=${window.location.hostname}; path=${window.location.pathname};`; 901 | // eslint-disable-next-line no-alert 902 | alert('This session is bugged. The circle button will close the browser rather than going back in the menu. Use the on screen controls.'); 903 | } 904 | } 905 | 906 | window.Failsafe = window.history.state === null; 907 | 908 | const setTheme = getCookie('theme'); 909 | if (setTheme === undefined) { 910 | setCookie('theme', 'Default', 100 * 365); 911 | } else if (setTheme !== 'Default') { 912 | window.location.search += `${setTheme}`; 913 | } 914 | 915 | randomBackground(); 916 | const customBackgroundImage = getStorage('background-image'); 917 | const customCSS = getStorage('custom-css'); 918 | const customJS = getStorage('custom-js'); 919 | 920 | if (customBackgroundImage) { 921 | $('body').css('background-image', `url(${customBackgroundImage})`); 922 | } 923 | if (customCSS) { 924 | $('head').append(``); 925 | } 926 | if (customJS) { 927 | $('head').append(``); 928 | } 929 | 930 | // Blank out iFrame 931 | $('#ifr').attr('src', `${getBasePath()}/blank.html`); 932 | 933 | // Cache theme 934 | $('#ifr').one('load', () => { 935 | if (navigator.onLine) { 936 | cacheTheme(); 937 | } else { 938 | buildAfterCaching(); 939 | } 940 | }); 941 | }); 942 | /* 943 | Copyright (c) 2017-2022 Al Azif, https://github.com/Al-Azif/ps4-exploit-host 944 | 945 | Permission is hereby granted, free of charge, to any person obtaining 946 | a copy of this software and associated documentation files (the 947 | "Software"), to deal in the Software without restriction, including 948 | without limitation the rights to use, copy, modify, merge, publish, 949 | distribute, sublicense, and/or sell copies of the Software, and to 950 | permit persons to whom the Software is furnished to do so, subject to 951 | the following conditions: 952 | 953 | The above copyright notice and this permission notice shall be 954 | included in all copies or substantial portions of the Software. 955 | 956 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 957 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 958 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 959 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 960 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 961 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 962 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 963 | */ 964 | --------------------------------------------------------------------------------