mirror of https://github.com/hak5/ToorChat.git
Updates
parent
82724f2bc7
commit
81f54b75ee
|
@ -10,6 +10,7 @@ class ToorChatProtocol():
|
||||||
''' This is used to send a simple message over the toorchat protocol '''
|
''' This is used to send a simple message over the toorchat protocol '''
|
||||||
msg = ToorChatMessage(message, user)
|
msg = ToorChatMessage(message, user)
|
||||||
self.device.RFxmit(msg.to_string())
|
self.device.RFxmit(msg.to_string())
|
||||||
|
print msg.to_string()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_packet_start(cls):
|
def get_packet_start(cls):
|
||||||
|
|
|
@ -16,8 +16,8 @@ def main():
|
||||||
protocol = ToorChatProtocol(badge)
|
protocol = ToorChatProtocol(badge)
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
msg, timestamp = badge.RFrecv()
|
print badge.RFrecv()
|
||||||
print msg
|
# print msg
|
||||||
except ChipconUsbTimeoutException:
|
except ChipconUsbTimeoutException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
# msg, timestamp = badge.RFrecv()
|
# msg, timestamp = badge.RFrecv()
|
||||||
# print "enter a message"
|
# print "enter a message"
|
||||||
send = raw_input("Enter a message")
|
send = raw_input("Enter a message\n")
|
||||||
protocol.send_message(send)
|
protocol.send_message(send)
|
||||||
except ChipconUsbTimeoutException:
|
except ChipconUsbTimeoutException:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue