WIN Hi - Lo Often

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

(function() {

'use strict';
const localeConfig = {
setToEnglish: true, // will set the faucets to English
stringSearches: {
promoCodeAccepted: 'roll',
promoCodeUsed: 'already used',
promoCodeInvalid: ['not found', 'only alphanumeric'],
promoCodeExpired: ['ended']
}
};
const K = Object.freeze({
WebType: {
CRYPTOSFAUCETS: 1,
STORMGAIN: 2,
FREEBITCOIN: 3,
FAUCETPAY: 4,
FREELITECOIN: 5,
FREEETHEREUMIO: 6,
BAGIKERAN: 7,
OKFAUCET: 8,
BIGBTC: 9,
BESTCHANGE: 10,
KINGBIZ: 11,
BETFURYBOX: 13,
FREEDOGEIO: 14,
DUTCHYROLL: 15,
FCRYPTO: 16,
CPU: 17
},
CF: {
UrlType: {
HOME: 0,
FREE: 1,
CONTACTTWITTER: 2,
PROMOTION: 3,
STATS: 4,
SETTINGS: 5,
FREEROLLS: 6,
IGNORE: 99
},
PromoStatus: {
NOCODE: 0,
PENDING: 1,
ACCEPTED: 2,
USEDBEFORE: 3,
INVALID: 4,
UNKNOWNERROR: 5,
EXPIRED: 6
},
ReusableCodeSuggestions: ['55khv20st4', '90nq6mcmz2', 'lytovoap04',
'vmuph8j0c6', 'ykxlvmg9ja', 'd8fmqxjlma', 'rjnmzjs673', 'ki2r0jq5r0']
},
RandomInteractionLevel: {
NONE: 0,
LOW: 1,
MEDIUM: 2,
HIGH: 3
},
Integers: {
HS_26_IN_MILLISECONDS: 93600000, //Using 26 hs instead of 24hs
HS_2_IN_MILLISECONDS: 7200000 //and 2hs gap retry when code is flagged
as
USEDBEFORE
},
WalletType: {
FP_MAIL: 100,
FP_BTC: 101,
FP_BNB: 102,
FP_BCH: 103,
FP_DASH: 104,
FP_DGB: 105,
FP_DOGE: 106,
FP_ETH: 107,
FP_FEY: 108,
FP_LTC: 109,
FP_TRX: 110,
FP_USDT: 111,
FP_ZEC: 112,
FP_SOL: 113,
EC: 200,
BTC: 1,
LTC: 2
},
ErrorType: {
ERROR: 0,
TIMEOUT: 1,
NEED_TO_LOGIN: 2,
ROLL_ERROR: 3,
CLICK_ROLL_ERROR: 4,
LOGIN_ERROR: 5,
CLAIM_ERROR: 6,
ADDRESS_ERROR: 7,
MIN_WITHDRAW_ERROR: 8,
IP_BAN: 9,
IP_RESTRICTED: 10,
IP_ERROR: 11,
FORCE_CLOSED: 12,
NO_FUNDS: 13,
VERIFY_EMAIL: 14,
NO_ADDRESS: 15
},
CMC: {
BTC: '1',
BNB: '1839',
BFG: '11038'
}
});
let persistence, shared, manager, ui, CFPromotions, interactions,
CFHistory,
SiteProcessor;
Element.prototype.isVisible = function() {
return !!(this.offsetWidth||this.offsetHeight||
this.getClientRects().length);
};
Element.prototype.isUserFriendly = function(selector) {
let e = selector ? this.querySelector(selector) : this;
return e && e.isVisible() ? e : null;
};
HTMLDocument.prototype.isUserFriendly =
Element.prototype.isUserFriendly;
Number.prototype.toDate = function() {
return new Date(this);
};
String.prototype.clean = function() {
let output = "";
for (let i = 0; i < this.length; i++) {
if (this.charCodeAt(i) <= 127) {
output += this.charAt(i);
}
}
return output;
};
Array.prototype.shuffle = function () {
let currentIndex = this.length, temporaryValue, randomIndex;
while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
temporaryValue = this[currentIndex];
this[currentIndex] = this[randomIndex];
this[randomIndex] = temporaryValue;
}
return this;
};
let helpers = {
getPrintableTime: function (date = new Date()) {
if (date == null) {
return '';
}
return ('0' + date.getHours()).slice(-2) + ':' + ('0' +
date.getMinutes()).slice(-2) + ':' + ('0' + date.getSeconds()).slice(-2);
},
getPrintableDateTime: function (date) {
if (date != null) {
return ('0' + date.getDate()).slice(-2) + '/' + ('0' + (date.getMonth()
+
1)).slice(-2) + ' ' + ('0' + date.getHours()).slice(-2) + ':' + ('0' +
date.getMinutes()).slice(-2);
} else {
return '';
}
},
getEnumText: function (enm, value) {
return Object.keys(enm).find(key => enm[key] === value) || '_ERR';
},
randomMs: function (a, b){
return a + (b - a) * Math.random();
},
addMinutes: function(mins, date = new Date()) {
return date.setMinutes(date.getMinutes() + +mins);
},
randomInt: function(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
},
addMs: function(ms, date = new Date()) {
return date.setMilliseconds(date.getMilliseconds() + ms);
},
getRandomMs: function(minute, rangeDiffInPercentage) { // Now will be a
random
value between minute and minute + rangeDiffPercentage%; Example if minute
= 30 and
rangeDiffPercentage = 5 => random in the range [30, 31.5]
let msMin = minute * 60 * 1000;
let msMax = msMin + rangeDiffInPercentage/100 * msMin;
return helpers.randomMs(msMin, msMax);
},
hsToMs: function(hours) {
return hours * 60 * 60 * 1000;
},
minToMs: function(min) {
return min * 60 * 1000;
},
getEmojiForPromoStatus: function(promoStatus) {
switch (promoStatus) {
case K.CF.PromoStatus.NOCODE:
return '⚪';
break;
case K.CF.PromoStatus.PENDING:
return '⏳';
break;
case K.CF.PromoStatus.ACCEPTED:
return '✔️
';
break;
case K.CF.PromoStatus.USEDBEFORE:
return '🕙';
break;
case K.CF.PromoStatus.INVALID:
return '❌';
break;
case K.CF.PromoStatus.EXPIRED:
return '📅';
break;
case K.CF.PromoStatus.UNKNOWNERROR:
return '❗';
break;
}
},
getHost: function(url, withHttps = false) {
if (url.includes('//')) {
url = url.split('//')[1];
}
url = url.split('/')[0];
return withHttps ? ('https://' + url) : url;
},
cf: {
getUrlType: function(url) {
if (url.endsWith('/free-rolls')) {
return K.CF.UrlType.FREEROLLS;
}
if (url.split('?')[0].endsWith('/free')) {
return K.CF.UrlType.FREE;
}
if (url.includes('/promotion/')) {
return K.CF.UrlType.PROMOTION;
}
if (url.endsWith('/contact-twitter')) {
return K.CF.UrlType.CONTACTTWITTER;
}
if (url.endsWith('/settings')) {
return K.CF.UrlType.SETTINGS;
}
if (url.endsWith('/stats')) {
return K.CF.UrlType.STATS;
}
if (url.endsWith('/')) {
url = url.slice(0, -1);
if (url == helpers.getHost(url, true)) {
return K.CF.UrlType.HOME;
}
}
return K.CF.UrlType.IGNORE;
}
},
triggerMouseEvent: function (elm, eventType) {
let clickEvent = document.createEvent('MouseEvents');
clickEvent.initEvent (eventType, true, true);
elm.dispatchEvent (clickEvent);
},
alternativeClick: function (elm) {
helpers.triggerMouseEvent (elm, "mouseover");
helpers.triggerMouseEvent (elm, "mousedown");
helpers.triggerMouseEvent (elm, "mouseup");
helpers.triggerMouseEvent (elm, "click");
}
}
let objectGenerator = {
createPersistence: function() {
const prefix = 'autoWeb_';
function save(key, value, parseIt = false) {
GM_setValue(prefix + key, parseIt ? JSON.stringify(value) : value);
};
function load(key, parseIt = false) {
let value = GM_getValue(prefix + key);
if(value && parseIt) {
value = JSON.parse(value);
}
return value;
};
return {
save: save,
load: load
};
},
createShared: function() {
let flowControl;
let config = {};
function initializeConfig() {
// Defaults:
config['devlog.enabled'] = false;
config['devlog.maxLines'] = 200;
config['defaults.extraInterval'] = true;
config['defaults.timeout'] = 4;
config['defaults.postponeMinutes'] = 65; //0: Random between min and max
config['defaults.postponeMinutes.min'] = 65;
config['defaults.postponeMinutes.max'] = 65;
config['defaults.workInBackground'] = true;
config['defaults.nextRun.useCountdown'] = true;
config['defaults.nextRun'] = 60; //0: Random between min and max
config['defaults.nextRun.min'] = 60;
config['defaults.nextRun.max'] = 60;
config['defaults.sleepMode'] = false;
config['defaults.sleepMode.min'] = "00:00";
config['defaults.sleepMode.max'] = "01:00";
config['cf.autologin'] = false;
config['cf.credentials.mode'] = 1;
config['cf.credentials.email'] = '[email protected]';
config['cf.credentials.password'] = 'YOURPASSWORD';
config['cf.sleepHoursIfIpBan'] = 8;
// config['fb.activateRPBonus'] = true;
// config['fp.hoursBetweenRuns'] = 6;
config['fp.maxTimeInMinutes'] = 15;
config['bk.withdrawMode'] = "0";
config['bk.hoursBetweenWithdraws'] = 4;
config['bk.sleepMinutesIfIpBan'] = 75;
config['bestchange.address'] = '101';
// config['bigbtc.postponeMinutes'] = '0';
let storedData = persistence.load('config', true);
if(storedData) {
for (const prop in config) {
if(storedData.hasOwnProperty(prop)) {
config[prop] = storedData[prop];
}
}
}
config.version = GM_info.script.version;
};
function getConfig() {
return config;
};
function updateConfig(items) {
items.forEach( function (item) {
config[item.prop] = item.value;
});
persistence.save('config', config, true);
}
function devlog(msg, elapsed = false, reset = false) {
if(!config['devlog.enabled']) {
return;
}
let log;
if(reset) {
log = [`${helpers.getPrintableTime()}|Log cleared`];
} else {
log = persistence.load('devlog', true);
log = log ?? [];
}
if(msg) {
let previous;
try {
previous = log[log.length - 1].split('|')[1];
} catch {}
if(elapsed && (previous == msg)) {
log[log.length - 1] = `${helpers.getPrintableTime()}|${msg}|
[Elapsed time: ${elapsed} seconds]`;
} else {
log.push(`${helpers.getPrintableTime()}|${msg}`);
}
}
if(log.length > 200) {
log.splice(0, log.length - 200);
}
persistence.save('devlog', log, true);
};
function getDevLog() {
let log;
log = persistence.load('devlog', true);
if(log) {
return log;
}
};
function isOpenedByManager() {
loadFlowControl();
if(!flowControl) {
return false;
}
if(flowControl.host != window.location.host) {
return false;
}
if(flowControl.opened && flowControl.type != K.WebType.FAUCETPAY &&
flowControl.type != K.WebType.BAGIKERAN) {
return false;
}
if(flowControl.type == K.WebType.BAGIKERAN &&
!window.location.href.includes(flowControl.params.trackUrl)) {
return false;
}
return true;
};
function setFlowControl(id, url, webType, params = null) {
flowControl = {
id: id,
changedAt: Date.now(),
url: url,
host: url.host,
type: webType,
opened: false,
error: false,
result: {}
};
if(params) {
flowControl.params = params;
}
saveFlowControl();
};
function wasVisited(expectedId) {
loadFlowControl();
return flowControl.id == expectedId && flowControl.opened;
};
function hasErrors(expectedId) {
return flowControl.id == expectedId && flowControl.error;
};
function getResult() {
return flowControl.result;
};
function getCurrent() {
return flowControl;
};
function saveAndclose(runDetails, delay = 0) {
markAsVisited(runDetails);
shared.devlog(`${window.location.href} closing`);
if(delay) {
setTimeout(window.close, delay);
} else {
window.close();
}
};
function loadFlowControl() {
flowControl = persistence.load('flowControl', true);
};
function saveFlowControl() {
persistence.save('flowControl', flowControl, true);
};
function markAsVisited(runDetails) {
flowControl.opened = true;
flowControl.result = runDetails;
saveFlowControl();
};
function addError(errorType, errorMessage) {
flowControl.error = true;
flowControl.result.errorType = errorType;
flowControl.result.errorMessage = errorMessage;
saveFlowControl();
};
function closeWithError(errorType, errorMessage) {
addError(errorType, errorMessage);
shared.devlog(`${window.location.href} closing with error msg`);
window.close();
};
function clearFlowControl() {
flowControl = {};
saveFlowControl();
};
function clearRetries() {
loadFlowControl();
flowControl.retrying = false;
saveFlowControl();
return false;
};
function isRetrying() {
if(flowControl.retrying) {
return true;
}
flowControl.retrying = true;
saveFlowControl();
return false;
};
function setProp(key, val) {
flowControl[key] = val;
saveFlowControl();
};
function getProp(key) {
return flowControl[key];
};
initializeConfig();
return {
devlog: devlog,
getDevLog: getDevLog,
setFlowControl: setFlowControl,
wasVisited: wasVisited,
isOpenedByManager: isOpenedByManager,
saveFlowControl: saveFlowControl,
getCurrent: getCurrent,
getResult: getResult,
addError: addError,
closeWindow: saveAndclose,
closeWithError: closeWithError,
updateWithoutClosing: markAsVisited,
hasErrors: hasErrors,
clearFlowControl: clearFlowControl,
getConfig: getConfig,
updateConfig: updateConfig,
clearRetries: clearRetries,
isRetrying: isRetrying,
setProp: setProp,
getProp: getProp
};
},
createManager: function() {
const STATUS = {
INITIALIZING: 0,
IDLE: 1,
CLAIMING: 2
};
let timestamp = null;
let timeWaiting = 0;
let uiUpdatesInterval;
let status = STATUS.INITIALIZING;
let processTimer;
let workingTab;
let webList = [];
let userWallet = [];

You might also like