Files
PSFree-Enhanced-Dockerized/src/alert.mjs
Al Azif 3ab19c3a0b Push updates...
1. Cleanup/Linting/Tweaks/Fixes/etc
  - Default Prettier config w/ 999 line length
  - Default eslint config "problems" list trimmed down
2. Fixed corrupt pointer cleanup by abc
3. Fixed `ip6po_rthdr` offset for PS5 by abc
4. Verified the number of blocking requests needed to be two by abc
5. Only run kernel exploit once by checking setuid by @JTAG7371
6. Kernel patches from pOOBs4 by @ChendoChap (Ported for 8.00-9.60)
7. Payload loader from pOOBs4 by @ChendoChap
8. Restore syscall 661 (`sys_aio_submit()`) after patching by @janisslsm
9. Add `PROT_READ`, `PROT_WRITE`, `PROT_EXEC` constants for payload loader by @janisslsm

The ONLY things that should need changes are the `/rop/ps4/*.mjs` files (850, 900, and 950).
Firmware 8.00 appears to be stable/have a good success rate now.
2025-06-01 03:46:23 -07:00

43 lines
1.7 KiB
JavaScript

/* Copyright (C) 2023-2025 anonymous
This file is part of PSFree.
PSFree is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
PSFree is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
// We can't just open a console on the ps4 browser, make sure the errors thrown
// by our program are alerted.
// We don't use a custom logging function to avoid a dependency on a logging
// module since we want this file to stand alone. We don't want to copy the
// log function here either for the sake avoiding dependencies since using
// alert() is good enough.
// We log the line and column numbers as well since some exceptions (like
// SyntaxError) do not show it in the stack trace.
addEventListener("unhandledrejection", (event) => {
const reason = event.reason;
alert(`Unhandled rejection\n${reason}\n${reason.sourceURL}:${reason.line}:${reason.column}\n${reason.stack}`);
});
addEventListener("error", (event) => {
const reason = event.error;
alert(`Unhandled error\n${reason}\n${reason.sourceURL}:${reason.line}:${reason.column}\n${reason.stack}`);
return true;
});
// we have to dynamically import the program if we want to catch its syntax
// errors
import("./psfree.mjs");