mirror of https://github.com/hak5/ToorChat.git
parent
cf72a8c6f6
commit
29811079c6
|
@ -31,19 +31,15 @@ class ToorChatProtocol():
|
|||
|
||||
def change_channel(self, channel):
|
||||
''' This is used to change the channel that the user operates in '''
|
||||
self.device.setChannel(int(channel))
|
||||
if channel != int
|
||||
return None
|
||||
else
|
||||
return channel
|
||||
if isinstance(channel, int):
|
||||
self.device.setChannel(int(channel))
|
||||
|
||||
|
||||
def change_frequency(self, frequency):
|
||||
''' This is used to change the frequency that the user operates in '''
|
||||
self.device.setFreq(int(change_frequency))
|
||||
if frequency != int
|
||||
return None
|
||||
else
|
||||
return frequency
|
||||
if isinstance(frequency, int):
|
||||
self.device.setFreq(int(frequency))
|
||||
|
||||
def send_web_request(self, site = ""):
|
||||
'''This is used to attempt to get anyone who is registered as a server to load a website on your behalf '''
|
||||
if site != "":
|
||||
|
|
|
@ -64,7 +64,7 @@ class Visualizer():
|
|||
self.last_message_index = 0
|
||||
while True:
|
||||
self.screen_max_y, self.screen_max_x = self.screen.getmaxyx()
|
||||
self.screen.addstr(0, 1, "[S] Send Message [U] Set User Name [C] Set Channel [F] Set Frequency [W] Load Webpage")
|
||||
self.screen.addstr(0, 1, "[S] Message [U] Username [C] Channel [F] Frequency [W] Load Webpage")
|
||||
self.__add_message_to_screen__()
|
||||
entry = self.screen.getch()
|
||||
if entry == curses.KEY_RESIZE:
|
||||
|
@ -92,6 +92,8 @@ class Visualizer():
|
|||
self.screen.nodelay(0)
|
||||
user_input = self.screen.getstr(1, 1, 60)
|
||||
self.frequency = self.protocol.change_frequency(user_input)
|
||||
self.screen.nodelay(1)
|
||||
self.screen.addstr(1,1," "*(self.screen_max_x-3))
|
||||
if entry == ord('w'):
|
||||
self.screen.nodelay(0)
|
||||
user_input = self.screen.getstr(1, 1, 60)
|
||||
|
|
Loading…
Reference in New Issue