Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #3

Open
wants to merge 212 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
5e8cb2b
add
Jun 23, 2022
35104b7
Merge branch 'main' of github.com:maikonweber/automatebet into main_
Jun 23, 2022
36061ee
add
Jun 23, 2022
3d7d687
add
Jun 23, 2022
6b887ba
new
maikonweber Jun 23, 2022
dd9bae5
new line
Jun 23, 2022
059f0d9
ConsumerRoletaX
Jun 23, 2022
d2b1038
add new query db
Jun 23, 2022
09a2be4
add
Jun 23, 2022
b2027b4
add
Jun 23, 2022
c58b502
add
Jun 23, 2022
d8066f5
add
Jun 23, 2022
c116508
add new
Jun 23, 2022
f2f1cf6
add
Jun 23, 2022
0767ad6
resolving 18strategia
Jun 23, 2022
4494dfa
Resolving new errros
Jun 23, 2022
150cdca
new
Jun 23, 2022
99afa92
add lol
Jun 23, 2022
13eeff1
new pool
Jun 23, 2022
ba56989
resolving
Jun 23, 2022
c7bd1c3
restart
Jun 23, 2022
302e718
add
Jun 23, 2022
851877e
add
Jun 23, 2022
b931d97
add push
Jun 23, 2022
d33a484
add
maikonweber Jun 24, 2022
ed8885d
add
maikonweber Jun 24, 2022
56492b1
add new codes and clean code
Jun 24, 2022
0696784
new features
Jun 24, 2022
b06dbea
add new server card
Jun 24, 2022
7220e0e
new database
Jun 24, 2022
e879b89
new hash
maikonweber Jun 25, 2022
679d7f6
add
maikonweber Jun 25, 2022
d44e400
add
maikonweber Jun 26, 2022
9e8c095
FeaturesAndBugs[Implementation a Zero for expect result and try catc…
maikonweber Jun 26, 2022
e22f96c
New Features Version 01
maikonweber Jun 26, 2022
29e6d6a
new lint
maikonweber Jun 26, 2022
f6af6f5
features{'localhos'}
maikonweber Jun 26, 2022
be9172a
add features
maikonweber Jun 27, 2022
d22ca1a
new
maikonweber Jun 27, 2022
6962608
add
maikonweber Jun 28, 2022
326e980
add
maikonweber Jun 28, 2022
67941cf
add
Jun 28, 2022
f4648f7
add delete msg
Jun 28, 2022
25ee0f6
New lines add
Jun 28, 2022
2810137
add
Jun 28, 2022
891db6c
new features
Jun 29, 2022
58d1188
new libes
Jun 29, 2022
9181667
add
Jun 29, 2022
2edb27a
add
Jun 29, 2022
9412161
removing
Jun 29, 2022
feb5ed7
add new lines
Jun 29, 2022
b946884
new lines
Jun 29, 2022
bf0d58b
new line
Jun 29, 2022
a00595a
ad
Jun 29, 2022
7981b40
add
Jun 29, 2022
2633bed
add ne
Jun 29, 2022
711b392
new lines
Jun 29, 2022
5106f6e
new
Jun 29, 2022
ce752c1
add
Jun 29, 2022
199f15a
add
Jun 29, 2022
8d8b56a
add
Jun 29, 2022
de308bb
add
Jun 29, 2022
444e5be
new
Jun 29, 2022
408202c
new lines
Jun 30, 2022
8d09bd3
lol
Jun 30, 2022
775eb12
new lines
Jun 30, 2022
906e15e
new lines
Jun 30, 2022
1455921
add new
Jun 30, 2022
ecddb69
add new
Jul 1, 2022
914560d
add
Jul 1, 2022
5b0d71b
add new lines
Jul 1, 2022
eae9e53
add new lines
maikonweber Jul 2, 2022
42dd550
add
maikonweber Jul 3, 2022
9317387
add new lines
Jul 5, 2022
027aef7
add
Jul 5, 2022
49ba97a
add
Jul 5, 2022
e876fea
add
Jul 5, 2022
9c05798
add
Jul 5, 2022
092a27b
add
Jul 5, 2022
6a0fc9a
add
Jul 5, 2022
dc78932
add
Jul 5, 2022
2a68a03
add
Jul 5, 2022
4ae3df5
add
Jul 5, 2022
beae616
add
Jul 5, 2022
6f5490b
add
Jul 6, 2022
0edc17b
ad
Jul 6, 2022
ea79afd
add
Jul 6, 2022
42e249a
new lines
Jul 6, 2022
4c4a9d1
add new lines
Jul 7, 2022
742fdb9
add new workbook
Jul 8, 2022
b894c44
add
Jul 8, 2022
c7dc328
FInished
maikonweber Jul 9, 2022
e942a78
show a move
maikonweber Jul 9, 2022
43086ec
add
maikonweber Jul 9, 2022
d7dcf21
add
maikonweber Jul 9, 2022
838f438
add
maikonweber Jul 9, 2022
fa8a222
add
maikonweber Jul 9, 2022
a8bff9c
add
maikonweber Jul 9, 2022
9068796
add
maikonweber Jul 9, 2022
1a15807
add
maikonweber Jul 9, 2022
7d4d65a
add
maikonweber Jul 9, 2022
2fdf1f6
add
maikonweber Jul 9, 2022
ad38a0f
add
maikonweber Jul 9, 2022
abf69a0
add
maikonweber Jul 9, 2022
147e458
ad
maikonweber Jul 9, 2022
1d561cd
add
maikonweber Jul 9, 2022
e856b6d
add
maikonweber Jul 9, 2022
240eca1
add
maikonweber Jul 9, 2022
746148b
add
maikonweber Jul 10, 2022
e9a3964
add
maikonweber Jul 10, 2022
5db6b57
add new lines
Jul 11, 2022
b7299d3
add
Jul 11, 2022
6ed57ac
add
Jul 11, 2022
a1c475c
add
Jul 11, 2022
e27d714
add
Jul 11, 2022
9a0f66d
ad
Jul 11, 2022
3edade5
add
maikonweber Jul 12, 2022
3e8fafd
add
maikonweber Jul 12, 2022
d5a5ed8
add
maikonweber Jul 12, 2022
6c22dcb
ad
maikonweber Jul 12, 2022
8a2c901
add
maikonweber Jul 12, 2022
4386ae3
add
maikonweber Jul 12, 2022
38ac63b
add
maikonweber Jul 12, 2022
33db054
ad
maikonweber Jul 12, 2022
5c85a7c
add
maikonweber Jul 12, 2022
f9c390a
ad
maikonweber Jul 12, 2022
95b8a2a
add
maikonweber Jul 12, 2022
3b7c333
ad
maikonweber Jul 12, 2022
36c6f88
add
maikonweber Jul 12, 2022
9548305
add new
maikonweber Jul 12, 2022
b804955
add
maikonweber Jul 12, 2022
12e6907
add
maikonweber Jul 12, 2022
89ee356
add
maikonweber Jul 12, 2022
260a08c
add
maikonweber Jul 12, 2022
11c97ad
add
maikonweber Jul 13, 2022
e55e861
add
maikonweber Jul 13, 2022
f55bc73
add
maikonweber Jul 13, 2022
2d6bd5d
add
maikonweber Jul 13, 2022
fe7bc8e
add
Jul 13, 2022
7279602
ne
Jul 13, 2022
c5c6e0f
add
Jul 13, 2022
df962cf
add
Jul 13, 2022
5af4203
add
Jul 13, 2022
a5d82a0
add
Jul 13, 2022
d048663
add
Jul 13, 2022
f96cde4
add
Jul 13, 2022
1e918e8
add
Jul 13, 2022
938fcf5
add
Jul 13, 2022
2720e40
add
Jul 13, 2022
68daa50
ad
Jul 13, 2022
bc3fe6c
add
Jul 13, 2022
eca7a81
add
Jul 13, 2022
83f00b8
ad
Jul 13, 2022
88771d1
ad
Jul 13, 2022
4c4b7cc
::ad
Jul 13, 2022
e042968
add
Jul 13, 2022
6970b94
add
Jul 13, 2022
512301c
add
Jul 13, 2022
44958ed
add
Jul 13, 2022
42cfa2e
add
Jul 13, 2022
8d841b0
add
Jul 13, 2022
42813ec
add
Jul 13, 2022
7ffb033
add
Jul 13, 2022
86ca252
add
Jul 13, 2022
43af2da
add
Jul 14, 2022
972208e
add
Jul 14, 2022
21fe876
add
Jul 14, 2022
10b7a81
add
Jul 14, 2022
3b4da9d
add
Jul 14, 2022
19207e1
add
Jul 14, 2022
f388b9a
add
maikonweber Jul 16, 2022
cde49d1
add new lines
maikonweber Jul 16, 2022
6d3aa15
add new lines
maikonweber Jul 16, 2022
1db9af2
new lines
maikonweber Jul 16, 2022
f627370
Feature[ Add consumerCards ]
maikonweber Jul 17, 2022
0d08c4a
add new
maikonweber Jul 17, 2022
821175e
add new lines
maikonweber Jul 17, 2022
7fa1864
revision
maikonweber Jul 17, 2022
202bdff
add
maikonweber Jul 19, 2022
78548bb
ADD[New .env for next]
maikonweber Jul 19, 2022
4e63399
add
maikonweber Jul 19, 2022
201a992
resolving
maikonweber Jul 19, 2022
f9a0fa5
add
maikonweber Jul 20, 2022
3ee6bf0
add
maikonweber Jul 20, 2022
36faaef
add
maikonweber Jul 20, 2022
ab4bd15
add new line
maikonweber Jul 20, 2022
25fb8ff
Add new reload
maikonweber Jul 21, 2022
9544c32
add new
maikonweber Jul 21, 2022
b4d5975
add ecosystem config
maikonweber Jul 22, 2022
a2f906f
Add new line
maikonweber Jul 24, 2022
c0d08c6
add new lines
maikonweber Jul 24, 2022
9070b9c
add
maikonweber Jul 25, 2022
5bafbf2
add new lines
maikonweber Jul 25, 2022
e800e29
add
Jul 25, 2022
f990a70
new lines
Jul 25, 2022
459c760
add
Jul 25, 2022
fec313a
add
Jul 25, 2022
77d6b8a
add
Jul 25, 2022
3a08186
add
Jul 25, 2022
afc8763
add
Jul 25, 2022
9bd36f9
new consumer
Jul 25, 2022
1ab1614
add
Jul 25, 2022
674de8e
version_vps
Jul 25, 2022
55ed0b7
add
Jul 25, 2022
5e9c0ca
add
Jul 25, 2022
dd4d39c
add new line
Jul 25, 2022
7f9167a
add
Jul 25, 2022
38627bd
add
Jul 25, 2022
5aa6d9e
add
Jul 25, 2022
c3028d3
ad
Jul 25, 2022
8037aed
˜˜merge
Jul 25, 2022
033079d
add
Jul 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .consumer18strategy.js.swp
Binary file not shown.
Binary file added .ecosystem.config.swp
Binary file not shown.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
/node_modules
./node_modules
./node_modules
userData
/userData
./userData
344 changes: 234 additions & 110 deletions ConsumerY.js

Large diffs are not rendered by default.

Empty file added DOCKERFILE
Empty file.
44 changes: 22 additions & 22 deletions MafiaConsumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const input = require("input"); // npm i input
const { getStrategyFilter, getLastNumber18, getLastNumber } = require("./database");
const apiId = 17228434;
const apiHash = 'b05e1c84ad4dd7c77e9965204c016a36';
const stringSession = new StringSession('1AQAOMTQ5LjE1NC4xNzUuNTMBu0hSLIOFbU8aIIxTP3DyN8TpvvFzvhWTNyZpI9ab3wx4v99YYIosj0cYMeDFccmzjoAPIVlVgs/cpb+7J7hoablPmB6hQNqCJJfJgy1RgFy711OSiphW1BqXPaa8wwk2Bib+vWTcyPN88TL87cE2lbRHe/Nm8URGzoybg3HqXC6WFPtaRqpy0QJVgIS3vzxg3VskhnThUsRhVpB7cfi1+08TCCWXN0CzHk9m7Nq37BImjQv0+/xThM+8apPNMRH0Q6gtN7IEehczT0MSeDTG2S3vrmuZiRnR/NvpjP3+fjjRHsP8VzERZXu4nhW+GQL6NuY0KcdtEzHuIyUQPbD+fUM=');
const stringSession = new StringSession('1AQAOMTQ5LjE1NC4xNzUuNTkBu4wJn7a2aFmB8O1STHkyvsob81Tu2qFA5+xrilx/4dBq7w+Mf8Bmq2fQvbT8RstllplnDHFw2LbwaiVj1Y3uhJrYzYfV75b73Fe3o7B1jZvC3odx3eAefT22iFBK2Lyj6Fk/7XgngubsHBWRd3lmGY1Ly4N7S5bc7n4ncLFEQBQxRXq4WnaHPAUZQ5NEcAJtGjp+0S16OAlEJG2uSXITkUsNSavJg/++ibtGPs3H5CI/6mrNMY4DV3ZWv64EN7Mmp5lKEkVkXXsqIaMDNFIYVXe3u9lysIW6I2Tzsg4T4dPGCMIKhOcq2Ox7/hkCaFkTG5qJaSDdzLyZICMnaFRdLR0=');
const clientRedis = redis.createClient({
host: '127.0.0.1',
port: 6379,
Expand Down Expand Up @@ -37,12 +37,12 @@ const roleta =
const strategyx = [
'Repetição 11 vezes da Black',
'Repetição 11 vezes da Red',
'Repetiçao de 8 vezes do Bloco 3',
'Repetiçao de 8 vezes do Bloco 2',
'Repetiçao de 8 vezes do Bloco 1',
'Repetiçao de 8 vezes da Coluna 1',
'Repetiçao de 8 vezes da Coluna 2',
'Repetiçao de 8 vezes da Coluna 3',
'Repetição de 8 vezes do Bloco 3',
'Repetição de 8 vezes do Bloco 2',
'Repetição de 8 vezes do Bloco 1',
'Repetição de 8 vezes da Coluna 1',
'Repetição de 8 vezes da Coluna 2',
'Repetição de 8 vezes da Coluna 3',
'Repetição 9 vezes da 1 ou 18',
'Repetição 9 vezes da 19 ou 36',
'Impar 12 vezes',
Expand All @@ -54,12 +54,12 @@ const spectStrategy = [
'Repetição 10 vezes da Black',
'Repetição 8 vezes da 1 ou 18',
'Repetição 10 vezes da Red',
'Repetiçao de 7 vezes do Bloco 3',
'Repetiçao de 7 vezes do Bloco 2',
'Repetiçao de 7 vezes do Bloco 1',
'Repetiçao de 7 vezes da Coluna 1',
'Repetiçao de 7 vezes da Coluna 2',
'Repetiçao de 7 vezes da Coluna 3',
'Repetição de 7 vezes do Bloco 3',
'Repetição de 7 vezes do Bloco 2',
'Repetição de 7 vezes do Bloco 1',
'Repetição de 7 vezes da Coluna 1',
'Repetição de 7 vezes da Coluna 2',
'Repetição de 7 vezes da Coluna 3',
'Impar 11 vezes',
'Par 11 vezes'

Expand Down Expand Up @@ -237,7 +237,7 @@ async function sendMsg(sala, msg) {
}

async function saveMemorySend(sygnalBase, string) {
clientRedis.set(`${sygnalBase.roulleteName}_${sygnalBase.estrategiaDetect}`, JSON.stringify(sygnalBase), {
await clientRedis.set(`${sygnalBase.roulleteName}_${sygnalBase.estrategiaDetect}`, JSON.stringify(sygnalBase), {
EX: 180,
NX: true
})
Expand Down Expand Up @@ -292,6 +292,7 @@ async function sendMsg(sala, msg) {
await sendMsg(-1150553286, replaceForRed(stringred, resultadoAtual, sygnalBase))
await sendMsg(-1593932898, replaceForRed(stringred, resultadoAtual, sygnalBase))
}

}, 45000)

}
Expand Down Expand Up @@ -351,7 +352,7 @@ await client.start({
const replace5 = replace2.replace(/{expect}/g, expect)


const msg1 = await sendMsg(-1681921748,replace5)
await sendMsg(-1681921748,replace5)
await sendMsg(-1150553286, replace5)
await sendMsg(-1593932898, replace5)

Expand Down Expand Up @@ -382,24 +383,23 @@ await sub.subscribe('msg', async (message) => {
const strig = JSON.parse(message); // 'message'
const result = await clientRedis.get(`${strig.roulleteName}_${strig.estrategiaDetect}`)
if(!result) {
console.log('New Strategy')
console.log('New Strategy')
console.log(strig.roulleteName, strig.estrategiaDetect)
console.log(!result)

if(spectStrategy.includes(strig.estrategiaDetect) && roleta.includes) {
if(spectStrategy.includes(strig.estrategiaDetect) && roleta.includes(strig.roulleteName)) {
console.log('-------------------ALERT-------------------')
proccedAlert(strig, possivelAlert)
await proccedAlert(strig, possivelAlert)
return
}

if(strategyx.includes(strig.estrategiaDetect) && roleta.includes(strig.roulleteName)) {
console.log('Detect--------------------------------------------------')
proccedRoulletAndSend(strig, string3)
await proccedRoulletAndSend(strig, string3)
return
}
return
} else {
console.log("Nao processado sinal")
}
}
});

})();
155 changes: 60 additions & 95 deletions MafiaRoulleta/RobotObserverRoullet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const puppeteer = require('puppeteer');
const redis = require('redis');
const axios = require('axios')
// Create class js
class RobotObserverRoullet {
constructor(password, username) {
Expand Down Expand Up @@ -35,6 +36,7 @@ const redis = require('redis');
'--disable-extensions',
"--window-size=920,680",
"--window-position=500,0",
'--no-sandbox'

],
devTools: true,
Expand Down Expand Up @@ -74,80 +76,13 @@ const redis = require('redis');
await this.init();
const page = await this.login();
const page2 = await this.seeAllRoulletesPage();

// const page3 = await this.roulletpad(page2);


}


async mappingBoard (page) {
console.log("Mapping Board");
const thx = await page.$$('.green_color');
const ty = await page.$$('.red_color');
const tz = await page.$$('.black_color');
const t2 = await page.$$('.outsides_color');


ty.forEach(async element => {
console.log(await element.getProperties());


});



// })

// tz.forEach(async element => {
// await element.getAttribute('data-bet-spot-id').then(async (value) => {
// console.log(value);

// });

// })

// t2.forEach(async element => {
// await element.getAttribute('data-bet-spot-id').then(async (value) => {
// console.log(value);

// });
// })

}

async roulletpad (page) {
console.log("Roullet pad");
// Select all elements in the div root
const data = await page.evaluate(() => document.querySelector('*').outerHTML);
// SVG //*[@id="root"]/div[2]/div/div/div[2]/div/div[6]/div[2]/div/div[2]/div/div[1]/div/div[1]/div/svg
// Table Class #classicStandard-wrapper
// Element Class name is green_color , red_color, black_color
// Element Class name is green_color , red_color, black_color
// get Element by class name green_color
const element = await page.$$('#text--27a51 uppercase--1918b');
console.log(element[0]);
const thx = await page.$$('.green_color');
const ty = await page.$$('.red_color');
const tz = await page.$$('.black_color');
const ligthTraffic = await page. $$('.traffic-light--a7a04');
const textLigth = await page.$$('.text--27a51');
const w = await page.$x('//*[@id="root"]/div[2]/div/div/div[2]/div/div[6]/div[1]/div/div/div[2]')
console.log(w, 'w');
this.mappingBoard(page);


setInterval(async () => {
const text = await w[0].getProperty('textContent')
const l = await text.jsonValue();
console.log(l, 'l');
this.round = l;

}, 1000);


}


async seeAllRoulletesPage(page) {
await this.page.goto("https://player.smashup.com/player_center/goto_common_game/5941/1000000", {waitUntil: 'networkidle0'});
await this.page.waitForTimeout(15000);
Expand All @@ -161,41 +96,71 @@ const redis = require('redis');
console.log(element);
})

await this.page.goto('https://ezugi.evo-games.com/frontend/evo/r2/#category=game_shows&game=topcard&table_id=TopCard000000001')

await this.page.evaluate(()=> {
const element = document.querySelectorAll('.historyItem--a1907 isDesktop--8a099.largeMobileIcon--4dd9c.classicLayout--7cc42')
element.forEach(element => {
console.log(element)
})
console.log(element)
await this.page.goto('https://ezugi.evo-games.com/frontend/evo/r2/#category=game_shows&game=topcard&table_id=TopCard000000001', {waitUntil: 'networkidle0'})
const p = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(console.log('Walting for the next Signal!!!'))
}, 1500)
})






}

setInterval(async () => {

const elefant = await this.page.$$('.historyStatistic--c80d3.fourLines--c2f5f')
const orphan = await this.page.$eval('.text--27a51', el => el.innerText);

const AWAY = /AWAY/g
const HOME = /HOME/g
const DRAW = /DRAW/g

async openPage(name) {
this.page()
}

const home = {
result : 'H',
created : new Date().getTime()
}

waitForSecond (time) {
setTimeout(() => {
console.log('Iniciando um Timeout de ' + time + ' segundos');
}, [time]);
}
const draw = {
result : 'D',
created: new Date().getTime()
}

const away = {
result : 'A',
created : new Date().getTime()
}

}

const bot = new RobotObserverRoullet('ma128sio4', 'maikonweber1');
bot.routine();
if (AWAY.test(orphan)) {
console.log('detect')
return axios.post('http://localhost:3055/api/cards', away).then(
(result) => {
console.log('AWAY')
}
)

} else if (HOME.test(orphan)) {
console.log('detect')
return axios.post('http://localhost:3055/api/cards', home).then(
() => {
console.log('Home')
}
)
} else if (DRAW.test(orphan)) {
console.log('detect')
return axios.post('http://localhost:3055/api/cards', draw).then(
() => {
console.log('Draw')
}
)

} else {
console.log('No Sygnal')
return
}


}, 4000)
}
}

module.exports = RobotObserverRoullet;
const test = new RobotObserverRoullet('maikonweber1', 'ma128sio4')
test.routine()
Loading