mpcabete / bombcrypto-bot

This is a python bot that automatically logs in, clicks the new button, and sends heroes to work in the bombcrypto game. It is fully open source and free.
819 stars 540 forks source link

F bot? #94

Closed Hermanyo closed 2 years ago

Hermanyo commented 2 years ago

🚨SERVER MAINTENANCE🚨

Server maintenance from 3:00 to 4:00 AM (UTC): ⭐️Fix bugs. ⭐️Optimize some features ⭐️Added anti-BOT feature.

Hermanyo commented 2 years ago

It will need little more time to do it, 'cuz I noticed that gap do random movements, it's no static gap

THEBESTSZ commented 2 years ago

Alias, se quiser testar, dá pra testar o bot sem contas. Basta criar uma metamask nova e ir logar no jogo, vai pedir o captcha e dá pra realizar vários testes. Dica plus: sempre que for fazer uma conta nova, procura um mapa inicial com Jaula, ja fiz isso em 3 contas, 1 boneco free de inicio.

exatamente, isso que falei ali em cima só mandar F5

Como assim??? Se vc startar um mapa e não fizer nada e der o f5 troca de mapa?

tratorarabe commented 2 years ago

O pouco de tempo que eu tive pra conversar com um pessoal e ver como o captcha atua, tendo q colocar até o bot pra rodar pra ver como que isso toca, eu consegui descobrir 3 coisas

1- o captcha aparece quando voce vai conectar a carteira, quando voce vai mudar de herói, quando voce vai mudar de mapa e quando voce vai resetar as posições dos seus bombers

2- o captcha é orgânico e a única certeza até agora que observei que ele realmente sempre aparece é quando você vai conectar sua carteira

3- o caminho mais fácil seria fazer o bot reconhecer o xiado cinza que constantemente muda e fazer o bot mover o mouse no eixo x, alinhando no eixo y correspondente ao do espaço faltante e mover pra direita até cobrir o xiado (ideia do Hermanyo)

e iria dar um trabalhinho. 2000 linhas de código podendo reduzir uns 40% se você tiver já algo pré-feito pelo visto.

Espero q esse texto ajude quem vai desenvolver o bot e tire algumas dúvidas pertinentes.

reenkang commented 2 years ago

How about this ?

https://pythonmana.com/2021/02/20210223164623700z.html

ZeddEn commented 2 years ago

The little time I had to talk to some people and see how the captcha works, even having to put the bot to run to see how it plays, I managed to discover 3 things

1- the captcha appears when you are going to connect the wallet, when you are going to change heroes, when you are going to change maps and when you are going to reset the positions of your bombers

2- the captcha is organic and the only certainty so far that I've noticed that it really always appears is when you're going to connect your wallet

3- the easiest way would be to make the bot recognize the constantly changing gray slit and make the bot move the mouse on the x axis, aligning on the y axis corresponding to the missing space and move to the right until it covers the slit (Hermanyo's idea)

and it would be a little work. 2000 lines of code can reduce 40% if you already have something ready-made.

I hope this text helps those who will develop the bot and clear up some pertinent questions.

Sadly yhe y axis thing will not work a sometimes the puzzle has small drag and drop component so it is not aligned 100% with the y axis of the puzzle

Hermanyo commented 2 years ago

The little time I had to talk to some people and see how the captcha works, even having to put the bot to run to see how it plays, I managed to discover 3 things 1- the captcha appears when you are going to connect the wallet, when you are going to change heroes, when you are going to change maps and when you are going to reset the positions of your bombers 2- the captcha is organic and the only certainty so far that I've noticed that it really always appears is when you're going to connect your wallet 3- the easiest way would be to make the bot recognize the constantly changing gray slit and make the bot move the mouse on the x axis, aligning on the y axis corresponding to the missing space and move to the right until it covers the slit (Hermanyo's idea) and it would be a little work. 2000 lines of code can reduce 40% if you already have something ready-made. I hope this text helps those who will develop the bot and clear up some pertinent questions.

Sadly yhe y axis thing will not work a sometimes the puzzle has small drag and drop component so it is not aligned 100% with the y axis of the puzzle

But u don't need to align 100%

Hermanyo commented 2 years ago

How about this ?

https://pythonmana.com/2021/02/20210223164623700z.html

Our geetest captcha is random, the gap moves and has different gray colors

tratorarabe commented 2 years ago

The little time I had to talk to some people and see how the captcha works, even having to put the bot to run to see how it plays, I managed to discover 3 things 1- the captcha appears when you are going to connect the wallet, when you are going to change heroes, when you are going to change maps and when you are going to reset the positions of your bombers 2- the captcha is organic and the only certainty so far that I've noticed that it really always appears is when you're going to connect your wallet 3- the easiest way would be to make the bot recognize the constantly changing gray slit and make the bot move the mouse on the x axis, aligning on the y axis corresponding to the missing space and move to the right until it covers the slit (Hermanyo's idea) and it would be a little work. 2000 lines of code can reduce 40% if you already have something ready-made. I hope this text helps those who will develop the bot and clear up some pertinent questions.

Sadly yhe y axis thing will not work a sometimes the puzzle has small drag and drop component so it is not aligned 100% with the y axis of the puzzle

But u don't need to align 100%

melhor então. É que pra mim esse é o jeito mais eficiente de fazer sem quebrar muito a cabeça, mas vai do jeito de quem vai aplicar isso no bot, se é que é possível

torço pra que seja.

WuKuYang commented 2 years ago

Provide some ideas for reference

Use image processing algorithms (OpenCv)

  1. Identify the outline of the shape that needs to be dragged on the left
  2. Identify the shape of the hole on the right (according to the grayscale value), extract the Blob with the grayscale value, and then extract the contour
  3. PatternMatch for two contours
  4. Calculate the distance to be moved (X Axis)
  5. Press and hold the square on the left
  6. Drag over and add Y Axis coordinates randomly during the movement process to simulate human dragging behavior
  7. Complete verification
rodrigobragamg commented 2 years ago

Tem esse aqui também, que foi criado para resolver o jigsaw da Binance, que é semelhante ao do Bomb: https://gist.github.com/licensed/51f12b36bdef083cb3e37597fb62003b

rodrigobragamg commented 2 years ago

Acompanhar para ver se vai ter algo a mais durante o game tbm

O bot é muito mais orgânico do que mecânico. Eu digo isso pq ele aparece randomicamente no jogo, mas sempre aparece quando voce troca de aba. Eu digo orgânico pq vc pode trocar uma, duas, trinta vezes e só aparecer o captcha na trigésima uma, a unica certeza de comportamento mecânico que eu observei é que sempre que precisa entrar na carteira requer o captcha.

Quanto a isto não haveria muito problema. É só ser adicionado uma configuração de tempo pelo qual o script procuraria pelo puzzle através de prints da tela (igual ele procura pela tela de login). Aí só colocar algo de 1 em 1 ou 2 em 2 minutos.

cryptoenthusiast33 commented 2 years ago

https://filipvitas.medium.com/how-to-solve-geetest-slider-captcha-with-js-ac764c4e9905

this may also help somehow (?)

https://github.com/fvitas/geetest-slider-captcha-solver

Yanrs commented 2 years ago

Some topics:

The first step is to figure out a way to make openCV identify the missing piece, either by edge detection or by the movement it is doing (since it's the only moving element on the antibot screen)

image

EDIT: Changed my comment to English, to allow a better discussion

WuKuYang commented 2 years ago

What if we add time analysis to judge multiple images?

The primary goal is to find the floating gray blocks, and use the image subtraction method to find the floating areas. The image capture can be continuously captured within 2 seconds, and a total of 10 samples are sampled.

Combine the floating block features into the same Blob, and generate the smallest rectangle blob.

I think the width of this smallest rectangle box should be able to fit its size, will it be easier?

jackcheng54088 commented 2 years ago

https://user-images.githubusercontent.com/95417246/144414524-b3cb8112-747b-4e82-b714-b8cdaa09b511.mp4

Yanrs commented 2 years ago

1.mp4

nicely done, any gist?

chengyap98 commented 2 years ago

1.mp4

兄弟 你这个能私聊下不?

dudapickler commented 2 years ago

1.mp4 Hi mate, could you please share how are you doing to bypass this captcha?

ZeddEn commented 2 years ago

1.mp4

Any updates?

kimcavalcanti commented 2 years ago

1.mp4

兄弟 你这个能私聊下不?

Any updates?

marcusdaniel001 commented 2 years ago

1.mp4

Share with us my friend <3

CautionDelRey commented 2 years ago

Seems that the slider comes with a length variation.

cadumichelon commented 2 years ago

Some topics:

  • I timed here with two different windows and the anti bot appeared every 20min, regardless of the game screen.
  • OpenCV may have difficulty with the "flicking" part, and it keeps moving on the y axis a little up and a little down.
  • Most of the solutions sent try to trace the outline of the missing piece to fit, where the missing piece is just a cutout or the image with reduced alpha, because of this flicking, it is more difficult to replicate the same solution.

The first step is to figure out a way to make openCV identify the missing piece, either by edge detection or by the movement it is doing (since it's the only moving element on the antibot screen)

image

EDIT: Changed my comment to English, to allow a better discussion

Thats i think is the best way, target the center of the gray space, rembering the piece always will have an square side the center will be always that distance. After we target the central point we need to elaborate an point on the screen that matches the our reference.

We can't edit the html on captcha to just isolate the edges??

chengyap98 commented 2 years ago

1.mp4

兄弟能加个微信不?想要了解一下你的脚本操作。有偿!xiaoye_98

OumoulayOussama commented 2 years ago

guys anyone made some progress ?

Hermanyo commented 2 years ago

Some topics:

  • I timed here with two different windows and the anti bot appeared every 20min, regardless of the game screen.
  • OpenCV may have difficulty with the "flicking" part, and it keeps moving on the y axis a little up and a little down.
  • Most of the solutions sent try to trace the outline of the missing piece to fit, where the missing piece is just a cutout or the image with reduced alpha, because of this flicking, it is more difficult to replicate the same solution.

The first step is to figure out a way to make openCV identify the missing piece, either by edge detection or by the movement it is doing (since it's the only moving element on the antibot screen) image EDIT: Changed my comment to English, to allow a better discussion

Thats i think is the best way, target the center of the gray space, rembering the piece always will have an square side the center will be always that distance. After we target the central point we need to elaborate an point on the screen that matches the our reference.

We can't edit the html on captcha to just isolate the edges??

No, it's wasm game

mpcabete commented 2 years ago

image Por enquanto eu ja consegui escrever um script pra encontrar a localizaçao da pecinha faltando, o problema eh q n eh 1 pra 1 o slider laranja e a pecinha, dai ainda to tentando pensar em uma soluçao pra fazer o bot colocar a pecinha no lugar certo

petroShved commented 2 years ago

How you can calculate the percentage of slide slider, it has a different width.

viniciusfontao commented 2 years ago

não depende da resolução pra ser 1:1 ? notei que nas VMs com uma resolução menor de tela do que meu PC por exemplo aparenta ser diferente essa proporção

fcolnaghi commented 2 years ago

e se vc pegar a logica do cara q colocou os pontinhos ali ? por exemplo identifica o botao do Slider e marca a posicao central dele, dai identifica a posicao igual vc fez e marca o centro da peça q ta faltando, e faz arrastar a posicao central do bt do slide para a posicao central da peca q vc ta faltando!

kimcavalcanti commented 2 years ago

@mpcabete Script para achar a peça que está flutuando

def findCaptchaPiece():
    global captcha_piece
    captcha_piece = cv2.bitwise_not(captcha_piece)

    img = printSreen()
    blur = cv2.GaussianBlur(img,(3,3),0)
    img = cv2.Laplacian(blur,cv2.CV_64F)

    result = cv2.matchTemplate(img.astype(np.uint8), captcha_piece, cv2.TM_CCOEFF_NORMED)

    yloc, xloc = np.where(result >= 0.3)
    rectangles = []
    for (x, y) in zip(xloc, yloc):
        rectangles.append([int(x), int(y), int(w), int(h)])
        rectangles.append([int(x), int(y), int(w), int(h)])

    rectangles, weights = cv2.groupRectangles(rectangles, 1, 0.2)
    if (len(rectangles)==0):
        print('captcha not found')
        return [0, 0, 0, 0]

    return rectangles[0]
mpcabete commented 2 years ago

e se vc pegar a logica do cara q colocou os pontinhos ali ? por exemplo identifica o botao do Slider e marca a posicao central dele, dai identifica a posicao igual vc fez e marca o centro da peça q ta faltando, e faz arrastar a posicao central do bt do slide para a posicao central da peca q vc ta faltando!

essa era minha ideia inicial, mas da uma testada fazer isso no game, a pecinha anda mais, entao se fizer isso a peça vai mto pra direita

mpcabete commented 2 years ago

não depende da resolução pra ser 1:1 ? notei que nas VMs com uma resolução menor de tela do que meu PC por exemplo aparenta ser diferente essa proporção

axo q toda vez q ele aparece eh diferente a proporçao, mas n tenho ctz

kimcavalcanti commented 2 years ago

e se vc pegar a logica do cara q colocou os pontinhos ali ? por exemplo identifica o botao do Slider e marca a posicao central dele, dai identifica a posicao igual vc fez e marca o centro da peça q ta faltando, e faz arrastar a posicao central do bt do slide para a posicao central da peca q vc ta faltando!

essa era minha ideia inicial, mas da uma testada fazer isso no game, a pecinha anda mais, entao se fizer isso a peça vai mto pra direita

Talvez movendo o mouse e dando o match para ver se a posição da peça está na mesma posição da missing block. No caso o scroll horizontal seria devagar

mpcabete commented 2 years ago

img = cv2.Laplacian(blur,cv2.CV_64F)

eh bem parecido com o q eu tenho feito, soh esse q eu n usei, q q o Laplacian faz?

mpcabete commented 2 years ago

e se vc pegar a logica do cara q colocou os pontinhos ali ? por exemplo identifica o botao do Slider e marca a posicao central dele, dai identifica a posicao igual vc fez e marca o centro da peça q ta faltando, e faz arrastar a posicao central do bt do slide para a posicao central da peca q vc ta faltando!

essa era minha ideia inicial, mas da uma testada fazer isso no game, a pecinha anda mais, entao se fizer isso a peça vai mto pra direita

Talvez movendo o mouse e dando o match para ver se a posição da peça está na mesma posição da missing block. No caso o scroll horizontal seria devagar

axo q vai ser o jeito..

kimcavalcanti commented 2 years ago

img = cv2.Laplacian(blur,cv2.CV_64F)

eh bem parecido com o q eu tenho feito, soh esse q eu n usei, q q o Laplacian faz? O objetivo dessa normalização é deixar a peça assim, para eu conseguir ignorar qlqr desenho que tiver dentro dela.

image

kimcavalcanti commented 2 years ago

captcha-piece

mpcabete commented 2 years ago

oq eu fiz ta dando esse resultado image vou tentar fazer a logica pra arrastar o slider agora

Scolmes1 commented 2 years ago

@mpcabete você é realmente o cara!

ele é absurdo, sério msm, estou quase tirando meu primeiro pagamento e vou mandar uma parte a ele

viniciusfontao commented 2 years ago

@mpcabete mandei 20 dol, pede uma pizza pra ajudar :^)

paulinhop commented 2 years ago

Pessoal, só uma coisa para quem não viu, atualizaram as políticas do jogo: image

portelaz commented 2 years ago

Pessoal, só uma coisa para quem não viu, atualizaram as políticas do jogo: image

updated, but there's no way for them to identify, because the macro doesn't interfere with the game server, if that's why they'll ban even a common player who doesn't use macro

ZeddEn commented 2 years ago

Guys, just one thing for those who haven't seen it, they updated the game's policies: picture

I think we just need to add the random -/+ few seconds/coordinate to each wait/action and all's good :P

jotapepinheiro commented 2 years ago
def randomMouseMovement():
    effects = [
        pyautogui.easeInQuad, 
        pyautogui.easeOutQuad, 
        pyautogui.easeInOutQuad,
        pyautogui.easeInBounce,
        pyautogui.easeInElastic
        ]
    x = np.random.randint(0, c['screen_width'])
    y = np.random.randint(0, c['screen_height'])
    e = np.random.choice(effects)
    pyautogui.moveTo(x, y, np.random.randint(1,2), e)

acho que é valido um random antes/depois de cada processo

lucasluuucas commented 2 years ago

@mpcabete é uma lendaa. Já separei os bcoin aqui pra quando sair essa att hahahha vamos nessa

Hyroshima commented 2 years ago

estava verificando as variações da imagem de fundo e a parte do quebra-cabeça faltante, e agora a parte com o buraco se meche kk

I was checking the variations of the background image and the missing puzzle part, and now the part with the hole moves kk

https://i.imgur.com/2E476wZ.gif

rodrigobragamg commented 2 years ago

Pessoal, só uma coisa para quem não viu, atualizaram as políticas do jogo: image

Eles colocaram que não permitem macro porque vão soltar o VIP em 2022, que vai fazer o auto farm... E também, serve para uisar como desculpa pelo servidor pífio que caia diariamente.

paulinhop commented 2 years ago

Já mexia antes sim, mas não precisa encaixar direitinho no eixo Y que fica movendo e mesmo caso não de certo é só repetir no próximo até liberar.

Hyroshima commented 2 years ago

estava verificando como variações da imagem de fundo e a parte da quebra-cabeça faltante, e agora a parte com o buraco se meche kk Eu estava verificando as variações da imagem de fundo e a parte do quebra-cabeça que faltava, e agora a parte com o buraco se move kk https://i.imgur.com/2E476wZ.gif

Ela ja se mexia antes! acho que desde o inicio

hum, então poderia ser algum problema de visualzação do meu navegador pq ficava estático '-'