Skip to content

Scramjet modifies toString to return an invalid value #103

@VillainsRule

Description

@VillainsRule

I was writing an anti-tamper implementation when I discovered that Scramjet modifies how toString works. Not on the first level, but on the second level.

In a normal browser:

top.constructor.toString.toString()

returns:

'function toString() { [native code] }'

However, in Scramjet, for some reason the same script returns:

'function () { [native code] }'

Now, you will not in fact find this in the console. You'll only find this if Scramjet rewrites the page with "scramjet top", causing this weird behavior.

No idea if this is worth fixing, but it's an interesting discovery nonetheless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions