Git Product home page Git Product logo

breakbot's People

Contributors

ozbek avatar stenyak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breakbot's Issues

Problema con UTF8 desde el canal IRC

Hola

Hay un problema a la hora de detectar las "ñ" y las tíldes en el IRC. Al transcribirlas al wa aparecen como "interrogaciones blancas dentro de un rombo negro", que es un símbolo que imagino que utiliza cuando no tiene ni idea de lo que ve.

A mí se me ocurre que puede ser porque escribo en UTF8 en la sala de IRC, porque me ha pasado más veces.

Gracias señor con barba.

mgp25!

@mgp25,

what do you think about doing something like that? IRC>WhatsApp and WhatsApp>IRC

? :3

Trying to generate a multiple bot :P

Hey guys

just running 2 Whatsapp Bots.

My goal:

-> Both bots are in the same group
-> Both bots are in the same IRC channel
-> Generating a "spam" each other, to test whatsapp's anti-spam protection.

The problem is:

Every message, the message gets larger:

<WhatsAppB

Where can i edit the output of the bot?
It should just send the message, not from who

(so basicly: just remove the senders name)

Hi

next message

Hi

and contiunleys: thats bad!

It just should send "hi" :)

What to edit in the .py scripts?

ImportError: cannot import name warning

root@whatsappxploit:~/link103# ./bot.py
Traceback (most recent call last):
File "./bot.py", line 9, in
from log import info, error, warning
ImportError: cannot import name warning

Using latest versions.

Error onMessageReceived from whatsapp.

When I send a message from my whatsapp number to the whatsapp-bot phone number I get the following error:

Traceback (most recent call last):
File "/home/real/botw/catch_them_all.py", line 10, in wrapper
return function(_args, *_kwargs)
TypeError: onMessageReceived() takes exactly 7 arguments (8 given)

2014-04-14 17:33:19.354927 EE catch_them_all.py:12: Exception in function onMessageReceived
2014-04-14 17:33:48.581702 EE catch_them_all.py:12:
Traceback (most recent call last):
File "/home/real/botw/catch_them_all.py", line 10, in wrapper
return function(_args, *_kwargs)
TypeError: onMessageReceived() takes exactly 7 arguments (8 given)

2014-04-14 17:33:48.581702 EE catch_them_all.py:12: Exception in function onMessageReceived

Connections interrupts instantly

As soon as I start the bot, the connection closes "because of closed":

$ python ./bot.py
2015-06-20 09:21:33.482174 II bot.py:141: 3 contacts loaded from configuration file
2015-06-20 09:21:33.483149 II bot.py:49: Connecting IRC client ([email protected]:6667)
2015-06-20 09:21:33.490249 II irc_bot.py:122: Joining channels: #eroom
2015-06-20 09:21:33.528102 II irc_bot.py:140: Connected IRC client ([email protected]:6667)
2015-06-20 09:21:33.590026 II bot.py:52: Connecting WA client (492271XXXXXXX)
YowsupConnectionManager: >>>>>>>> AUTH CALLED
BinTreeNodeReader: Reader init
YowsupAuth: Connecting to c2.whatsapp.net
WAuth: Yowsup WAUTH-1 INIT
WAuth: Starting stream
WAuth: Sending Features
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:
stream:features
<receipt_acks>
</receipt_acks>
<w:profile:picture type="all">
/w:profile:picture
<w:profile:picture type="group">
/w:profile:picture




/stream:features

WAuth: Sending Auth
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:

WAuth: Read stream start
YowsupConnectionManager: Conn closed Exception
ReaderThread: Sending disconnected because of closed
2015-06-20 09:21:34.982389 II wa_bot.py:142: Disconnected WA client (492271XXXXXXX): closed

What am I doing wrong? The account creation with yowsup worked perfectly and I'm able to send messages with "yowsup-cli demos -c config -s 49123456789 "test""

TypeError: onMessageReceived() takes exactly 7 arguments (8 given)

I get the following error occasionally, and am trying to figure out what parameters are being passed that the receiving function accepts less arguments.

ReaderThread: Waiting, time to die: T-180 seconds
2013-08-30 14:05:32.738514 EE catch_them_all.py:12:
Traceback (most recent call last):
File "/home/whatsapp/breakbot-master/catch_them_all.py", line 10, in wrapper
return function(_args, *_kwargs)
TypeError: onMessageReceived() takes exactly 7 arguments (8 given)

2013-08-30 14:05:32.738514 EE catch_them_all.py:12: Exception in function onMessageReceived

Multiline support

Cannot forward a multiline whatsapp message to IRC. It stops at first new line.
2012-11-19 22:08:41.559791 II irc_bot.py:95: >>> Sending IRC message: #xxxxx: <xxxx> Line one. Line 2 Line 3
No exceptions are thrown, all looks good on the logs.

Server Messages/Actions cause Exceptions

2013-09-06 11:53:51.336778 II bot.py:76: <<< IRC 1378490031330690: dronechop in wabbot said to None: VERSION
2013-09-06 11:53:51.337105 EE catch_them_all.py:12:
Traceback (most recent call last):
File "/home/whatsapp/breakbot-master/catch_them_all.py", line 10, in wrapper
return function(_args, *_kwargs)
File "bot.py", line 80, in irc_msg_received
raise Exception("Private message sent to no one?")
Exception: Private message sent to no one?

2013-09-06 11:53:51.337105 EE catch_them_all.py:12: Exception in function irc_msg_received

Send Message to NON-Contacts

Hello,

what about sending Messages to numbers?

Instead of /msg Bot Nick: Hi

Just /msg Bot 01234566: Hi

So you can send to everyone and not have them in the config + restarting the bot everytime.

python yowsup/yowsup-cli -h.

01:19 ~ $ python yowsup/yowsup-cli -h.
Traceback (most recent call last):
File "yowsup/yowsup-cli", line 6, in
from yowsup.demos import cli, echoclient, sendclient
File "/home/clarityworld/yowsup/yowsup/demos/cli/init.py", line 1, in
from .stack import YowsupCliStack
File "/home/clarityworld/yowsup/yowsup/demos/cli/stack.py", line 2, in
from yowsup.layers.axolotl import YowAxolotlLayer
File "/home/clarityworld/yowsup/yowsup/layers/axolotl/init.py", line 1, in
from .layer import YowAxolotlLayer
File "/home/clarityworld/yowsup/yowsup/layers/axolotl/layer.py", line 2, in
from .protocolentities import SetKeysIqProtocolEntity
File "/home/clarityworld/yowsup/yowsup/layers/axolotl/protocolentities/init.py", line 3, in
from .iq_keys_get_result import ResultGetKeysIqProtocolEntity
File "/home/clarityworld/yowsup/yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py", line 3, in
from axolotl.state.prekeybundle import PreKeyBundle
ImportError: No module named axolotl.state.prekeybundle
01:20 ~ $

FIXED IT WITH
sudo pip install python-axolotl

Messages with emoji or text smileys entirely dropped

First off, this script is great, just what I was looking for. So thanks very much to the devs.

However I did run into a few bugs I thought I'd report:
The ASCII conversion doesn't pick up the emoji, wich is to be expected but instead of the emoji just being ignored the whole message including the regular text is dropped.

Also, technically unrelated but most text smileys contain a ":" which this script uses to signal a username and as a result the message is also dropped, for example, if someone sends the message "Smileys are great :D" the message shows up in IRC as "D". I use this mostly to connect a group chat to an IRC channel so this could be easily resolved by dropping the username detection from group chats but that isn't exactly the best solution.

Thanks in advance,
Hugo2607

Private Message

Hello,

to get private messaging worked, we need to set the NUMBER;NAME in the config.

Does it also work with only the number?

/msg Botname 192389381: hi

as example?

This would be really cool, because everytime i want to message another guy, i need to completly restart my scripts :<

Starting the bot. [Connect to IRC]

When I try to start the Bot,
Btw
I have set only the Irc connection infos in the jason to see if the bot can connect to the irc server

21:02 ~ $ cd breakbot
21:02 ~/breakbot (master)$ python bot.py
2015-01-08 21:02:20.196167 II bot.py:141: 8 contacts loaded from configuration file
2015-01-08 21:02:20.211618 II bot.py:49: Connecting IRC client ([email protected]:6667)
2015-01-08 21:02:21.377654 EE irc_bot.py:109:
Traceback (most recent call last):
File "/home/clarityworld/breakbot/irc_bot.py", line 107, in connect
self.conn.next()
File "/home/clarityworld/breakbot/oyoyo/client.py", line 140, in connect
self.socket.connect(("%s" % self.host, self.port))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(_args)
error: [Errno 111] Connection refused
2015-01-08 21:02:21.377654 EE irc_bot.py:109: Problems while connecting to IRC server: [Errno 111] Connection refused
2015-01-08 21:02:21.391435 II irc_bot.py:152: Disconnected IRC client ([email protected]:6667)
2015-01-08 21:02:21.393042 II bot.py:60: Bot stopping...
2015-01-08 21:02:21.393129 EE catch_them_all.py:12:
Traceback (most recent call last):
File "/home/clarityworld/breakbot/catch_them_all.py", line 10, in wrapper
return function(_args, **kwargs)
File "/home/clarityworld/breakbot/irc_bot.py", line 133, in run
self.connect()
File "/home/clarityworld/breakbot/irc_bot.py", line 105, in connect
raise Exception("Stopped while waiting for IRC connection")
Exception: Stopped while waiting for IRC connection
2015-01-08 21:02:21.393129 EE catch_them_all.py:12: Exception in function run
2015-01-08 21:02:21.476724 II bot.py:57: Main loop closing
2015-01-08 21:02:21.478092 II bot.py:60: Bot stopping...
2015-01-08 21:02:21.710751 II bot.py:60: Bot stopping...
2015-01-08 21:02:21.711400 II bot.py:155: Bot stopped.
21:02 ~/breakbot (master)$

does not start correctly with default setup and tutorial

The bot can't find Yowsup.connectionmanager.YowsupConnectionManager in it's default configuration. This is due to the Yowsup folder being named yowsup.git instead of Yowsup. it's pretty minor, but I just wanted to give you a heads-up

error on run bot.py

hey... i want ask. i got error after run bot.py i'm use blackbuntu and run with python 2.6.
this my error.

sniper@sniper-nux~/Desktop/breakbot$ python bot.py
Traceback (most recent call last):
File "bot.py", line 133, in
config = json.loads(f.read())
File "/usr/lib/python2.6/json/init.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.6/json/decoder.py", line 336, in raw_decode
obj, end = self._scanner.iterscan(s, **kw).next()
File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan
rval, next_pos = action(m, context)
File "/usr/lib/python2.6/json/decoder.py", line 183, in JSONObject
value, end = iterscan(s, idx=end, context=context).next()
File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan
rval, next_pos = action(m, context)
File "/usr/lib/python2.6/json/decoder.py", line 198, in JSONObject
raise ValueError(errmsg("Expecting property name", s, end - 1))
ValueError: Expecting property name: line 6 column 13 (char 146)

Issue runnning get_libs.sh

I ran into the following error when executing get_libs.sh

phiri@HP-ProBook-4520s:~/Projects/ossproj/breakbot$ ./get_libs.sh
A oyoyo/parse.py
A oyoyo/client.py
A oyoyo/init.py
A oyoyo/examplebot.py
A oyoyo/cmdhandler.py
A oyoyo/ircevents.py
A oyoyo/helpers.py
Checked out revision 55.
Cloning into 'yowsup.git'...
Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of '[email protected]:stenyak/yowsup.git' into submodule path 'yowsup.git' failed
phiri@HP-ProBook-4520s:~/Projects/ossproj/breakbot$ cat get_libs.sh

Need to strip ASCII Color/Underline/Reverse codes from IRC text.

Need to scrape the incoming IRC messages and strip the ASCII codes used for color and other formatting when bringing across to Whatsapp.

I'm guessing should be some simple regex like:
import re
//
regex = re.compile("\x0f|\x1f|\x02|\x03(?:\d{1,2}(?:,\d{1,2})?)?", re.UNICODE)
regex.sub('', msg)

Right now, the ascii shows up in Whatsapp like this:
[0mHostname [33m: [0mserver [33m - [0mOS [33m: [0mLinux 3.0.0-1-amd64/x86_64 [33m - [0mDistro [33m: [0mDebian 7.1 [33m - [0mCPU [33m: [0m4 x Intel Xeon (1995.065 MHz) [33m - [0mProcesses [33m: [0m187 [33m - [0mUptime [33m: [0m97d 8h 35m [33m - [0mUsers [33m: [0m23 [33m - [0mLoad Average [33m: [0m0.73 [33m - [0mMemory Usage [33m: [0m1834.04MB/3950.38MB (46.43%) [33m - [0mDisk Usage [33m: [0m35.36GB/49.16GB (71.93%)

Problem to run bot.py

013-11-23 02:02:31.340749 II bot.py:145: Program started
Traceback (most recent call last):
File "bot.py", line 146, in
b = Bot(cfg["wa_phone"], cfg["wa_password"], contacts, cfg["irc_server_name"], int(cfg["irc_server_port"]), cfg["bot_owner_nick"], cfg["log_file"])
File "bot.py", line 39, in init
irc_nick = contacts[wa_phone]
KeyError: u'5598XXXXXXXX'

How to solve this problem? I tried everything on config file.

Not joining channels

Hey guys,

the whatsapp bot does not join irc channels.
and:

can you set a irc channel for each private message user?

Greetings!

Since today: wa_bot.py:138: Auth Failed: invalid

Hello,

since today, all my related breakbot Bots response:

wa_bot.py:138: Auth Failed: invalid

Also: I registered a fresh new Number with WhatsApp, but Auth Failed, invalid still replys.
Looks like Mark Zuckerburg updated something!

Not receiving confirmation code

I think there is an error of Yowsup and not Breakbot, but sms/voice is not received!

En español, que me explico mejor, es que no se recibe ni el código sms ni llamada alguna, al querer registrar el número móvil en Whatsapp.

--requestcode sms|voice

status: sent

pero no se recibe nunca el código. En el github de yowsup alguien comentaba que deben ser los headers que usa Yowsup, que pueden ser detectados como obsoletos y por eso no se envía el código; cambiándo estos headers y 'falseando' la versión del dispositivo tampoco se consiguió nada, según un usuario!

Saludos y a ver si se puede solucionar,
enhorabuena por el trabajo!

Not an issue

Just wondering, is breakbot / yowsup / whatsapp working with Google Voice Numbers?

Automatic Update like codeRUS's API for breakbot?

Hey.

latest months - bots get killed when WhatsApp is changing their token / env informations.

tokenData = {
"v": "2.13.5",
"r": "S40-14.26",
"u": "WhatsApp/2.13.5 S40Version/14.26 Device/Nokia302",
"t": "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1442277896714{phone}",
"d": "Nokia302"
}

@CODeRUS has some cool feature for his API's. they check theirself for new token informations:

https://coderus.openrepos.net/whitesoft/whatsapp_version
https://coderus.openrepos.net/whitesoft/whatsapp_classes
https://coderus.openrepos.net/whitesoft/whatsapp_scratch

Can you build something like that into yowsup too, so it never gets killed by whatsapp? :p

Privatemessages not working

Hello,

just noticed that PrivateMessages to the Bot Owner does not work.

I've set everything correctly in the config.js - the Bot works in channels etc., but private messages doesnt come up. I've logged the action when i send a message to the Botnumber on Whatsapp:

2014-01-14 17:03:19.828210 EE catch_them_all.py:12:
Traceback (most recent call last):
File "/home/niko/breakbot/catch_them_all.py", line 10, in wrapper
return function(_args, *_kwargs)
File "/home/niko/breakbot/wa_bot.py", line 43, in onMessageReceived
messageContent = unicode(messageContent, "utf-8")
TypeError: decoding Unicode is not supported

2014-01-14 17:03:19.828210 EE catch_them_all.py:12: Exception in function onMessageReceived

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.