From db176c4c886f9dbd00c876319ecdf7d59d5d2141 Mon Sep 17 00:00:00 2001 From: yvesf Date: Fri, 29 May 2009 21:58:59 +0000 Subject: iblbha git-svn-id: http://xapek.org/svn/common/omegle@1050 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- Documentation.txt | 8 ++++++++ injector.py | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/Documentation.txt b/Documentation.txt index 0dcf566..b598928 100644 --- a/Documentation.txt +++ b/Documentation.txt @@ -1,3 +1,10 @@ +====== Tools +omegle.py - OmegleChat class and simple client +chat.py - more advanced client +proxy.py - connects two chats +injector.py - same as above + = do note abuse these tools, the following information = + ====== API Documentation ==== Connection URL: http://omegle.com/ @@ -72,3 +79,4 @@ RETURNS: 1234 1234 is the number of users online + diff --git a/injector.py b/injector.py index 0934b1b..6383804 100644 --- a/injector.py +++ b/injector.py @@ -117,6 +117,46 @@ class InjectorWindow(object): def on_column2_disconnect(self,*args): self.add_message("DEBUG: on_column2_disconnect") + +from omegle import OmegleChat +class Chat(OmegleChat): + def __init__(self,injector): + OmegleChat.__init__(self) + self.injector = injector + self.name = name + def on_message(self,msg): + #XXX handle linking + injector.add_message("%s %s : %s" % (1, self.name, msg) + class Injector(InjectorWindow): - pass + def __init__(self): + InjectorWindow.__init__(self) + self.omegle1 = Chat(self,"A") + self.omegle2 = Chat(self,"B") + def on_column1_send(self,message): + if self.omegle1.is_confirmed: + self.omegle1.send(message) + else: + self.add_message("Column 1 not connected") + def on_column2_send(self,message): + if self.omegle1.is_confirmed: + self.omegle2.send(message) + else: + self.add_message("Column 2 not connected") + def on_column1_disconnect(self,*args): + if self.omegle1.is_connected: + self.omegle1.disconnect() + self.add_message("Column1 disconnected") + else: + self.comegle1.start() + self.add_message("Connect Column1") + def on_column2_disconnect(self,*args): + if self.omegle2.is_connected: + self.omegle2.disconnect() + self.add_message("Column2 disconnected") + else: + self.comegle2.start() + self.add_message("Connect Column2") + + Injector().main() -- cgit v1.2.1