question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Better Self Defender

See original GitHub issue

Okey, in #754 I has been misstake with title. What about create smarter defender not like the current?

For example: Create a hash of current code. If hash is different - broke code. Second way: Check length of current code. Third way: Create few hashes of few functions and check this hashes. (this way for too long code)

For example:

const kruzya = 0;

function getKruzya() { return kruzya +1}; // we get hash of this function (just for example)

console.log(getKruzya());

in obfuscate mode:

const hashes = [{function: _0x2, hash: "ABC"}]; // just example hash
const 0x1 = 0; 
function _0x2() {return 0x1 + 1};       // so if I edit this function, name, or body (content/context) of function - code just broke.
console.log( _0x2());
// just typo example
function check() {
const e = hashes[0];

if (typeof e.function !== "undefined") // check if func is exist ...
    const body = e.functionName;
   if (!body || !body.length) BROKE_CODE(); // note: just second check but I think this is optional.
  const newHash = getHash(body);
  const oldHash = e.hash;

  if (oldHash !== newHash) BROKE_CODE();
}
else BROKE_CODE(); // just typo example

and yep. This is all. I didn’t think about HOW TO CHECK HASH. But I hope this is simple 👀 My code is just example.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Sep 20, 2020

@sanex3339 lol. #755 (this) duplicate of #755? WAT 👀

Anyway, not in the nearest plans

Ok :c

The main problem is that such kind of code can be detected and removed. So right now I’m more focused on code transformations than on additional code helpers.

1reaction
sanex3339commented, Sep 20, 2020

Seems it’s a duplicate of https://github.com/javascript-obfuscator/javascript-obfuscator/issues/330

Anyway, not in the nearest plans

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling and disabling Self-Defense
The Self-Defense mechanism of Kaspersky Endpoint Security is enabled by default. You can disable Self-Defense, if necessary. To enable or disable Self-Defense:.
Read more >
15 Self-Defense Products Every Runner Should Know About
We hope you never need most of the products on this list, but with runner safety at a premium, here are some items...
Read more >
The Ultimate Self-Defense Guide: How to Keep Yourself Safe ...
1) Maintain Awareness. Any good self-defense instructor will tell you that the first and best self-protection tool you can employ is general situational ......
Read more >
Self-defense classes in high demand; Experts point to rising ...
INDIANAPOLIS, Ind.– Demand for self-defense classes are on the rise and experts point to rising violence across the nation as the reason.
Read more >
Surveillance Self-Defense Against the Trump Administration
Trump is about to have more tools of surveillance at his disposal than any tyrant ever has. Here's how to protect yourself.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found