-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What are the assumption of it #5
Comments
JScrewIt assumes that predefined objects are not overwritten and that no changes are made to their prototype chains. So if we set
|
Yet [no changes on predefined objects' prototype] may be not so universal. Is it enough that predefined prototypes remain unchanged and [][[]] be undefined? |
@837951602 No, that's not enough. For example, if Note though that these restrictions only apply to the time the code is loaded, not to the time the code runs. It's perfectly ok to mess up with prototypes in your screwed code or in some other code that runs after your screwed code has been loaded. |
@fasttime I meant that if a prototype is predefined(or to say, not undefined at the beginning), it's assumed to remain unchanged, thus Function.prototype.toString being destroyed doesn't fit |
@837951602 That's correct, but predefined objects like |
|
@837951602 this is correct, and it's because of the order the expressions are evaluated. When this happens to be a problem it can be addressed using a code type generation other than "express". There is no option for this in the UI, but it can be done in JavaScript (maybe in the browser console). JScrewIt.encode("!a()+!a()", { runAs: "eval" }); // eval("!a()+!a()") or if the return value is not needed JScrewIt.encode("!a()+!a()", { runAs: "call" }); |
JScrewIt turns "undefined" into "[][[]]" but undefined may be 3 while [][[]] may be 4
The text was updated successfully, but these errors were encountered: