tamperlock
v1.1.0
Published
Detect DOM tampering, DevTools access, and JS variable modifications
Maintainers
Readme
🔐 TamperLock
TamperLock is a lightweight JavaScript security library that detects:
- DOM text tampering
- Global variable changes
- DevTools opening
- Monkey-patching of critical functions
📦 Installation
npm install tamperlock
⚙️ Usage
import TamperLock from 'tamperlock';
TamperLock.watchElement('#price', '$99.00', (selector, newVal) => {
alert(`Tampering detected on ${selector}: ${newVal}`);
});
TamperLock.watchVar('isAdmin', false, (varName, newVal) => {
alert(`Variable changed: ${varName} = ${newVal}`);
});
TamperLock.detectDevTools(() => {
alert('DevTools detected!');
});
TamperLock.preventConsoleOverride();
TamperLock.lockFunction(window, 'fetch');