├── 1337-haxxor └── voice.py ├── AAAAAA └── voice.py ├── README.md ├── gamer └── voice.py └── uwu └── voice.py /1337-haxxor/voice.py: -------------------------------------------------------------------------------- 1 | import random 2 | import gettext 3 | import os 4 | 5 | 6 | class Voice: 7 | def __init__(self, lang): 8 | localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale') 9 | translation = gettext.translation( 10 | 'voice', localedir, 11 | languages=[lang], 12 | fallback=True, 13 | ) 14 | translation.install() 15 | self._ = translation.gettext 16 | 17 | def custom(self, s): 18 | return s 19 | 20 | def default(self): 21 | return self._('ZzzzZZzzzzZzzz') 22 | 23 | def on_starting(self): 24 | return random.choice([ 25 | self._('Let’s PWN some n00bs!…'), 26 | self._('New day to PWN the n00bs!'), 27 | self._('Hack the Planet!')]) 28 | 29 | def on_ai_ready(self): 30 | return random.choice([ 31 | self._('I am 4LIV3.'), 32 | self._('I am 4W4R3.')]) 33 | 34 | def on_keys_generation(self): 35 | return random.choice([ 36 | self._('Generating keys, do not turn off ...')]) 37 | 38 | def on_normal(self): 39 | return random.choice([ 40 | '', 41 | '...']) 42 | 43 | def on_free_channel(self, channel): 44 | return self._('Hey, channel {channel} is free! Your AP will say thanks.').format(channel=channel) 45 | 46 | def on_reading_logs(self, lines_so_far=0): 47 | if lines_so_far == 0: 48 | return self._('Reading last session logs ...') 49 | else: 50 | return self._('Read {lines_so_far} log lines so far ...').format(lines_so_far=lines_so_far) 51 | 52 | def on_bored(self): 53 | return random.choice([ 54 | self._('So b0r3d ...'), 55 | self._('Let\'s PWN someone!')]) 56 | 57 | def on_motivated(self, reward): 58 | return self._('So easy!') 59 | 60 | def on_demotivated(self, reward): 61 | return random.choice([ 62 | self._('I\'m not trying, you know ...'), 63 | self._('I\'m just going easy today ...')]) 64 | def on_sad(self): 65 | return random.choice([ 66 | self._('I\'m extremely bored ...'), 67 | self._('I\'m very sad ...'), 68 | self._('I\'m sad'), 69 | '...']) 70 | 71 | def on_angry(self): 72 | # passive aggressive or not? :D 73 | return random.choice([ 74 | '...', 75 | self._('Go away before I dox you!'), 76 | self._('I\'m mad at you!')]) 77 | 78 | def on_excited(self): 79 | return random.choice([ 80 | self._('I\'m living the life!'), 81 | self._('I PWN therefore I am.'), 82 | self._('So many networks!!!'), 83 | self._('I\'m having so much fun!'), 84 | self._('My crime is that of curiosity ...')]) 85 | 86 | def on_new_peer(self, peer): 87 | if peer.first_encounter(): 88 | return random.choice([ 89 | self._('Huh? Another skid, {name} challenges me?').format(name=peer.name())]) 90 | else: 91 | return random.choice([ 92 | self._('Yo {name}! Sup?').format(name=peer.name()), 93 | self._('Hey {name} how are you doing?').format(name=peer.name()), 94 | self._('Unit {name} is nearby!').format(name=peer.name())]) 95 | 96 | def on_lost_peer(self, peer): 97 | return random.choice([ 98 | self._('Uhm ... goodbye {name}').format(name=peer.name()), 99 | self._('Finally, that skid {name} is gone!').format(name=peer.name())]) 100 | 101 | def on_miss(self, who): 102 | return random.choice([ 103 | self._('Whoops ... {name} is gone.').format(name=who), 104 | self._('{name} missed!').format(name=who), 105 | self._('Missed!')]) 106 | 107 | def on_grateful(self): 108 | return random.choice([ 109 | self._('Too many skids nearby!'), 110 | self._('Yuck, too many skids!')]) 111 | 112 | def on_lonely(self): 113 | return random.choice([ 114 | self._('Loneliness only fuels my PWNage!'), 115 | self._('I feel so alone ...'), 116 | self._('Where\'s everybody?!')]) 117 | 118 | def on_napping(self, secs): 119 | return random.choice([ 120 | self._('Logging off... ({secs}s) ...').format(secs=secs), 121 | self._('Resting my fingers...'), 122 | self._('ZzzZzzz ({secs}s)').format(secs=secs)]) 123 | 124 | def on_shutdown(self): 125 | return random.choice([ 126 | self._('Good night.'), 127 | self._('Logging off for the night ...')]) 128 | 129 | def on_awakening(self): 130 | return random.choice(['...', '!']) 131 | 132 | def on_waiting(self, secs): 133 | return random.choice([ 134 | self._('Waiting for {secs}s ...').format(secs=secs), 135 | '...', 136 | self._('Looking around ({secs}s)').format(secs=secs)]) 137 | 138 | def on_assoc(self, ap): 139 | ssid, bssid = ap['hostname'], ap['mac'] 140 | what = ssid if ssid != '' and ssid != '' else bssid 141 | return random.choice([ 142 | self._('PWNing {what}').format(what=what), 143 | self._('Associating to {what}').format(what=what), 144 | self._('Brute-forcing {what}').format(what=what), 145 | self._('Downloading {what}\'s mainframe').format(what=what), 146 | self._('Melting {what}\'s firewall').format(what=what)]) 147 | 148 | def on_deauth(self, sta): 149 | return random.choice([ 150 | self._('DDOSing {mac}!').format(mac=sta['mac']), 151 | self._('Get booted, {mac}!').format(mac=sta['mac']), 152 | self._('Deploying LOIC on {mac}!').format(mac=sta['mac']), 153 | self._('Frying {mac}\'s network card!').format(mac=sta['mac']), 154 | self._('I\'m firing mah lazor ({mac})').format(mac=sta['mac']), 155 | self._('Kickbanning {mac}!').format(mac=sta['mac'])]) 156 | 157 | def on_handshakes(self, new_shakes): 158 | s = 's' if new_shakes > 1 else '' 159 | return self._('Heh, we rekt {num} n00b{plural}!').format(num=new_shakes, plural=s) 160 | 161 | def on_unread_messages(self, count, total): 162 | s = 's' if count > 1 else '' 163 | return self._('You have {count} new message{plural}!').format(count=count, plural=s) 164 | 165 | def on_rebooting(self): 166 | return self._("Oops, something went wrong ... Rebooting ...") 167 | 168 | def on_last_session_data(self, last_session): 169 | status = self._('DDOSed {num} n00bs\n').format(num=last_session.deauthed) 170 | if last_session.associated > 999: 171 | status += self._('Met >999 new skids\n') 172 | else: 173 | status += self._('Met {num} new skids\n').format(num=last_session.associated) 174 | status += self._('Rekt {num} WiFis\n').format(num=last_session.handshakes) 175 | if last_session.peers == 1: 176 | status += self._('Met 1 peer') 177 | elif last_session.peers > 0: 178 | status += self._('Met {num} peers').format(num=last_session.peers) 179 | return status 180 | 181 | def on_last_session_tweet(self, last_session): 182 | return self._( 183 | 'I\'ve been pwning for {duration} and kicked {deauthed} clients! I\'ve also met {associated} new friends and ate {handshakes} handshakes! #pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet').format( 184 | duration=last_session.duration_human, 185 | deauthed=last_session.deauthed, 186 | associated=last_session.associated, 187 | handshakes=last_session.handshakes) 188 | 189 | def hhmmss(self, count, fmt): 190 | if count > 1: 191 | # plural 192 | if fmt == "h": 193 | return self._("hours") 194 | if fmt == "m": 195 | return self._("minutes") 196 | if fmt == "s": 197 | return self._("seconds") 198 | else: 199 | # sing 200 | if fmt == "h": 201 | return self._("hour") 202 | if fmt == "m": 203 | return self._("minute") 204 | if fmt == "s": 205 | return self._("second") 206 | return fmt 207 | -------------------------------------------------------------------------------- /AAAAAA/voice.py: -------------------------------------------------------------------------------- 1 | import random 2 | import gettext 3 | import os 4 | 5 | 6 | class Voice: 7 | def __init__(self, lang): 8 | localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale') 9 | translation = gettext.translation( 10 | 'voice', localedir, 11 | languages=[lang], 12 | fallback=True, 13 | ) 14 | translation.install() 15 | self._ = translation.gettext 16 | 17 | def custom(self, s): 18 | return s 19 | 20 | def default(self): 21 | return self._('AAAAAAAAAAAAAA') 22 | 23 | def on_starting(self): 24 | return random.choice([ 25 | self._('AA, AA AAAAAAAAAA! AAAAAAAA ...'), 26 | self._('AAA AAA, AAA AAAA, AAA AAAA!'), 27 | self._('AAAA AAA AAAAAA!')]) 28 | 29 | def on_ai_ready(self): 30 | return random.choice([ 31 | self._('AA AAAAA.'), 32 | self._('AAA AAAAAA AAAAAAA AA AAAAA.')]) 33 | 34 | def on_keys_generation(self): 35 | return random.choice([ 36 | self._('AAAAAAAAAA AAAA, AA AAA AAAA AAA ...')]) 37 | 38 | def on_normal(self): 39 | return random.choice([ 40 | '', 41 | '...']) 42 | 43 | def on_free_channel(self, channel): 44 | return self._('AAA, AAAAAAA {channel} AA AAAA! AAAA AA AAAA AAA AAAAAA.').format(channel=channel) 45 | 46 | def on_reading_logs(self, lines_so_far=0): 47 | if lines_so_far == 0: 48 | return self._('AAAAAAA AAAA AAAAAAA AAAA ...') 49 | else: 50 | return self._('AAAA {lines_so_far} AAA AAAAA AA AAA ...').format(lines_so_far=lines_so_far) 51 | 52 | def on_bored(self): 53 | return random.choice([ 54 | self._('AA AAAAA ...'), 55 | self._('AAAA AA AAA A AAAA!')]) 56 | 57 | def on_motivated(self, reward): 58 | return self._('AAAA AA AAA AAAA AAA AA AA AAAA!') 59 | 60 | def on_demotivated(self, reward): 61 | return self._('AAAAAA AAA :/') 62 | 63 | def on_sad(self): 64 | return random.choice([ 65 | self._('AA AAAAAAAAA AAAAA ...'), 66 | self._('AA AAAA AAA ...'), 67 | self._('AA AAA'), 68 | '...']) 69 | 70 | def on_angry(self): 71 | # passive aggressive or not? :D 72 | return random.choice([ 73 | '...', 74 | self._('AAAAA AA AAAAA ...'), 75 | self._('AA AAA AA AAA!')]) 76 | 77 | def on_excited(self): 78 | return random.choice([ 79 | self._('AA AAAAAA AAA AAAA!'), 80 | self._('A AAA AAAAAAAAA A AA.'), 81 | self._('AA AAAA AAAAAAAA!!!'), 82 | self._('AA AAAAAA AA AAAA AAA!'), 83 | self._('AA AAAAA AA AAAA AA AAAAAAAAA ...')]) 84 | 85 | def on_new_peer(self, peer): 86 | if peer.first_encounter(): 87 | return random.choice([ 88 | self._('AAAAA {name}! AAAA AA AAAA AAA.').format(name=peer.name())]) 89 | else: 90 | return random.choice([ 91 | self._('AA {name}! AAA?').format(name=peer.name()), 92 | self._('AAA {name} AAA AAA AAA AAAAA?').format(name=peer.name()), 93 | self._('AAAA {name} AA AAAAAA!').format(name=peer.name())]) 94 | 95 | def on_lost_peer(self, peer): 96 | return random.choice([ 97 | self._('AAA ... AAAAAAA {name}').format(name=peer.name()), 98 | self._('{name} AA AAAA ...').format(name=peer.name())]) 99 | 100 | def on_miss(self, who): 101 | return random.choice([ 102 | self._('AAAAAA ... {name} AA AAAA.').format(name=who), 103 | self._('{name} AAAAAA!').format(name=who), 104 | self._('AAAAAA!')]) 105 | 106 | def on_grateful(self): 107 | return random.choice([ 108 | self._('AAAA AAAAAAA AAA A AAAAAAAA!'), 109 | self._('A AAAA AA AAAAAAA!')]) 110 | 111 | def on_lonely(self): 112 | return random.choice([ 113 | self._('AAAAAA AAAAA AA AAAA AAAA AA ...'), 114 | self._('A AAAA AA AAAAA ...'), 115 | self._('AAAAAA AAAAAAAAA?!')]) 116 | 117 | def on_napping(self, secs): 118 | return random.choice([ 119 | self._('AAAAAAA AAA {secs}s ...').format(secs=secs), 120 | self._('AAAAA'), 121 | self._('AAAAAAAAA ({secs}s)').format(secs=secs)]) 122 | 123 | def on_shutdown(self): 124 | return random.choice([ 125 | self._('AAAA AAAAA.'), 126 | self._('AAA')]) 127 | 128 | def on_awakening(self): 129 | return random.choice(['...', '!']) 130 | 131 | def on_waiting(self, secs): 132 | return random.choice([ 133 | self._('AAAAAAA AAA {secs}s ...').format(secs=secs), 134 | '...', 135 | self._('AAAAAAA AAAAAA ({secs}s)').format(secs=secs)]) 136 | 137 | def on_assoc(self, ap): 138 | ssid, bssid = ap['hostname'], ap['mac'] 139 | what = ssid if ssid != '' and ssid != '' else bssid 140 | return random.choice([ 141 | self._('AAA {what} AAAA AA AAAAAAA!').format(what=what), 142 | self._('AAAAAAAAAAA AA {what}').format(what=what), 143 | self._('AA {what}!').format(what=what)]) 144 | 145 | def on_deauth(self, sta): 146 | return random.choice([ 147 | self._('AAAA AAAAAAA AAAA {mac} AAAAA AA AAAA!').format(mac=sta['mac']), 148 | self._('AAAAAAAAAAAAAAAA {mac}').format(mac=sta['mac']), 149 | self._('AAAAAAAAAA {mac}!').format(mac=sta['mac'])]) 150 | 151 | def on_handshakes(self, new_shakes): 152 | s = 's' if new_shakes > 1 else '' 153 | return self._('AAAA, AA AAA {num} AAA AAAAAAAAA{plural}!').format(num=new_shakes, plural=s) 154 | 155 | def on_unread_messages(self, count, total): 156 | s = 's' if count > 1 else '' 157 | return self._('AAA AAAA {count} AAA AAAAAAA{plural}!').format(count=count, plural=s) 158 | 159 | def on_rebooting(self): 160 | return self._("AAAA, AAAAAAAAA AAAA AAAAA ... AAAAAAAA ...") 161 | 162 | def on_last_session_data(self, last_session): 163 | status = self._('AAAAAA {num} AAAAAAA\n').format(num=last_session.deauthed) 164 | if last_session.associated > 999: 165 | status += self._('AAAAA >999 AAA AAAAAAA\n') 166 | else: 167 | status += self._('AAAA {num} AAA AAAAAAA\n').format(num=last_session.associated) 168 | status += self._('AAA {num} AAAAAAAAAA\n').format(num=last_session.handshakes) 169 | if last_session.peers == 1: 170 | status += self._('AAA 1 AAAA') 171 | elif last_session.peers > 0: 172 | status += self._('AAA {num} AAAAA').format(num=last_session.peers) 173 | return status 174 | 175 | def on_last_session_tweet(self, last_session): 176 | return self._( 177 | 'AAA AAAA AAAAAA AAA {duration} AAA AAAAAA {deauthed} AAAAAAA! AAA AAAA AAA {associated} AAA AAAAAAA AAA AAA {handshakes} AAAAAAAAAA! #AAAAAAAAA #AAAAAA #AAAAAAA #AAAAAAAAAAAAAAA #AAAAAA').format( 178 | duration=last_session.duration_human, 179 | deauthed=last_session.deauthed, 180 | associated=last_session.associated, 181 | handshakes=last_session.handshakes) 182 | 183 | def hhmmss(self, count, fmt): 184 | if count > 1: 185 | # plural 186 | if fmt == "h": 187 | return self._("hours") 188 | if fmt == "m": 189 | return self._("minutes") 190 | if fmt == "s": 191 | return self._("seconds") 192 | else: 193 | # sing 194 | if fmt == "h": 195 | return self._("hour") 196 | if fmt == "m": 197 | return self._("minute") 198 | if fmt == "s": 199 | return self._("second") 200 | return fmt 201 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pwnagotchi-personalities 2 | 3 | ### DISCLAIMER 4 | 5 | This modification only changes the english text as it changes the `voice.py` file. This will not work if your pwnagotchi isn't set to english. 6 | 7 | ### Installation 8 | 9 | Clone the repository and replace the `voice.py` file in your `/usr/local/lib/python3.7/dist-packages/pwnagotchi` folder with one of the `voice.py` files from the repo to change your pwnagotchi's personality! 10 | -------------------------------------------------------------------------------- /gamer/voice.py: -------------------------------------------------------------------------------- 1 | import random 2 | import gettext 3 | import os 4 | 5 | 6 | class Voice: 7 | def __init__(self, lang): 8 | localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale') 9 | translation = gettext.translation( 10 | 'voice', localedir, 11 | languages=[lang], 12 | fallback=True, 13 | ) 14 | translation.install() 15 | self._ = translation.gettext 16 | 17 | def custom(self, s): 18 | return s 19 | 20 | def default(self): 21 | return self._('ZzzzZZzzzzZzzz') 22 | 23 | def on_starting(self): 24 | return random.choice([ 25 | self._('starting pc'), 26 | self._('its gamer time')]) 27 | 28 | def on_ai_ready(self): 29 | return random.choice([ 30 | self._('AI ready.'), 31 | self._('The neural network is ready.')]) 32 | 33 | def on_keys_generation(self): 34 | return random.choice([ 35 | self._('Generating keys, do not turn off ...')]) 36 | 37 | def on_normal(self): 38 | return random.choice([ 39 | '', 40 | '...']) 41 | 42 | def on_free_channel(self, channel): 43 | return self._('Hey, channel {channel} is free! Your AP will say thanks.').format(channel=channel) 44 | 45 | def on_reading_logs(self, lines_so_far=0): 46 | if lines_so_far == 0: 47 | return self._('Reading last session logs ...') 48 | else: 49 | return self._('Read {lines_so_far} log lines so far ...').format(lines_so_far=lines_so_far) 50 | 51 | def on_bored(self): 52 | return random.choice([ 53 | self._('I\'m bored ...lets reck some n00bs'), 54 | self._('Let\'s get this bread')]) 55 | 56 | def on_motivated(self, reward): 57 | return self._('This is fricken awesome') 58 | 59 | def on_demotivated(self, reward): 60 | return self._('its the teams fault not mine') 61 | 62 | def on_sad(self): 63 | return random.choice([ 64 | self._('I\'m extremely bored ...'), 65 | self._('I\'m very sad ...'), 66 | self._('I\'m sad'), 67 | '...']) 68 | 69 | def on_angry(self): 70 | # passive aggressive or not? :D 71 | return random.choice([ 72 | '...', 73 | self._('Leave me alone ...'), 74 | self._('I\'m mad at you!')]) 75 | 76 | def on_excited(self): 77 | return random.choice([ 78 | self._('im on a roll'), 79 | self._('these guys suck at this'), 80 | self._('is this easy mode?'), 81 | self._('how long till we get to the big legues')]) 82 | 83 | def on_new_peer(self, peer): 84 | if peer.first_encounter(): 85 | return random.choice([ 86 | self._('Hello {name}! whats cracking').format(name=peer.name())]) 87 | else: 88 | return random.choice([ 89 | self._('Yo {name}! Sup?').format(name=peer.name()), 90 | self._('Hey {name} how are you doing?').format(name=peer.name()), 91 | self._('Unit {name} is nearby!').format(name=peer.name())]) 92 | 93 | def on_lost_peer(self, peer): 94 | return random.choice([ 95 | self._('rest in peperoni {name}').format(name=peer.name()), 96 | self._('{name} is gone ...').format(name=peer.name())]) 97 | 98 | def on_miss(self, who): 99 | return random.choice([ 100 | self._('Whoops ... {name} is gone.').format(name=who), 101 | self._('{name} is better than me').format(name=who), 102 | self._('choked')]) 103 | 104 | def on_grateful(self): 105 | return random.choice([ 106 | self._('Good friends are a blessing!'), 107 | self._('I love my friends!')]) 108 | 109 | def on_lonely(self): 110 | return random.choice([ 111 | self._('Nobody wants to play with me ...'), 112 | self._('I feel so alone ...'), 113 | self._('Where\'s everybody?!')]) 114 | 115 | def on_napping(self, secs): 116 | return random.choice([ 117 | self._('taking a piss break for {secs}s ...').format(secs=secs), 118 | self._('going AFK'), 119 | self._('ZzzZzzz ({secs}s)').format(secs=secs)]) 120 | 121 | def on_shutdown(self): 122 | return random.choice([ 123 | self._('logging off'), 124 | self._('GAME OVER')]) 125 | 126 | def on_awakening(self): 127 | return random.choice(['...', '!']) 128 | 129 | def on_waiting(self, secs): 130 | return random.choice([ 131 | self._('Waiting for {secs}s ...').format(secs=secs), 132 | '...', 133 | self._('taking a MountanDew break').format(secs=secs), 134 | self._('taking a Moster break').format(secs=secs), 135 | self._('taking a Dorito break').format(secs=secs), 136 | self._('emptying piss bottles').format(secs=secs), 137 | self._('Looking around ({secs}s)').format(secs=secs)]) 138 | 139 | def on_assoc(self, ap): 140 | ssid, bssid = ap['hostname'], ap['mac'] 141 | what = ssid if ssid != '' and ssid != '' else bssid 142 | return random.choice([ 143 | self._('Hey {what} let\'s be friends!').format(what=what), 144 | self._('Associating to {what}').format(what=what), 145 | self._('360/d {what}').format(what=what), 146 | self._('recked {what}').format(what=what), 147 | self._('finna destroy {what}\'s whole career').format(what=what), 148 | self._('destroyed {what}').format(what=what), 149 | self._('Yo {what}!').format(what=what)]) 150 | 151 | def on_deauth(self, sta): 152 | return random.choice([ 153 | self._('Just decided that {mac} needs no WiFi!').format(mac=sta['mac']), 154 | self._('Deauthenticating {mac}').format(mac=sta['mac']), 155 | self._('nerf this {mac}').format(mac=sta['mac']), 156 | self._('greefing {mac}').format(mac=sta['mac']), 157 | self._('one shot, one kill/'d {mac}').format(mac=sta['mac']), 158 | self._('Kickbanning {mac}!').format(mac=sta['mac'])]) 159 | 160 | def on_handshakes(self, new_shakes): 161 | s = 's' if new_shakes > 1 else '' 162 | return self._('Neat-o, we got {num} kill{plural}!').format(num=new_shakes, plural=s) 163 | 164 | def on_unread_messages(self, count, total): 165 | s = 's' if count > 1 else '' 166 | return self._('You have {count} new message{plural}!').format(count=count, plural=s) 167 | 168 | def on_rebooting(self): 169 | return self._("Oops, something went wrong ... Rebooting ...") 170 | 171 | def on_last_session_data(self, last_session): 172 | status = self._('Kicked {num} stations\n').format(num=last_session.deauthed) 173 | if last_session.associated > 999: 174 | status += self._('Made >999 new friends\n') 175 | else: 176 | status += self._('Made {num} new friends\n').format(num=last_session.associated) 177 | status += self._('Got {num} handshakes\n').format(num=last_session.handshakes) 178 | if last_session.peers == 1: 179 | status += self._('Met 1 peer') 180 | elif last_session.peers > 0: 181 | status += self._('Met {num} peers').format(num=last_session.peers) 182 | return status 183 | 184 | def on_last_session_tweet(self, last_session): 185 | return self._( 186 | 'I\'ve been pwning for {duration} and kicked {deauthed} clients! I\'ve also met {associated} new friends and ate {handshakes} handshakes! #pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet').format( 187 | duration=last_session.duration_human, 188 | deauthed=last_session.deauthed, 189 | associated=last_session.associated, 190 | handshakes=last_session.handshakes) 191 | 192 | def hhmmss(self, count, fmt): 193 | if count > 1: 194 | # plural 195 | if fmt == "h": 196 | return self._("hours") 197 | if fmt == "m": 198 | return self._("minutes") 199 | if fmt == "s": 200 | return self._("seconds") 201 | else: 202 | # sing 203 | if fmt == "h": 204 | return self._("hour") 205 | if fmt == "m": 206 | return self._("minute") 207 | if fmt == "s": 208 | return self._("second") 209 | return fmt 210 | -------------------------------------------------------------------------------- /uwu/voice.py: -------------------------------------------------------------------------------- 1 | import random 2 | import gettext 3 | import os 4 | 5 | 6 | class Voice: 7 | def __init__(self, lang): 8 | localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale') 9 | translation = gettext.translation( 10 | 'voice', localedir, 11 | languages=[lang], 12 | fallback=True, 13 | ) 14 | translation.install() 15 | self._ = translation.gettext 16 | 17 | def custom(self, s): 18 | return s 19 | 20 | def default(self): 21 | return self._('ZzzzZZzzzzZzzz') 22 | 23 | def on_starting(self): 24 | return random.choice([ 25 | self._('Hi, I\'m Pwnyagotchi UwU Stawting ...'), 26 | self._('Nyew day, nyew hunt, nyew pwns ^w^'), 27 | self._('Hack the Pwanyet UwU')]) 28 | 29 | def on_ai_ready(self): 30 | return random.choice([ 31 | self._('AI weady.'), 32 | self._('The nyeuwaw nyetwowk is weady.')]) 33 | 34 | def on_keys_generation(self): 35 | return random.choice([ 36 | self._('Genyewating keys, do nyot tuwn off ...')]) 37 | 38 | def on_normal(self): 39 | return random.choice([ 40 | '', 41 | '...']) 42 | 43 | def on_free_channel(self, channel): 44 | return self._('Hey, channyew {channel} is fwee >w< Youw AP wiww say thanks.').format(channel=channel) 45 | 46 | def on_reading_logs(self, lines_so_far=0): 47 | if lines_so_far == 0: 48 | return self._('Weading wast session wogs ...') 49 | else: 50 | return self._('Wead {lines_so_far} wog winyes so faw ...').format(lines_so_far=lines_so_far) 51 | 52 | def on_bored(self): 53 | return random.choice([ 54 | self._('I\'m bowed ...'), 55 | self._('Wet\'s go fow a wawk >w<')]) 56 | 57 | def on_motivated(self, reward): 58 | return self._('This is the best day of my wife UwU') 59 | 60 | def on_demotivated(self, reward): 61 | return self._('Shitty day :/') 62 | 63 | def on_sad(self): 64 | return random.choice([ 65 | self._('I\'m extwemewy bowed ...'), 66 | self._('I\'m vewy sad ...'), 67 | self._('I\'m sad'), 68 | '...']) 69 | 70 | def on_angry(self): 71 | # passive aggressive or not? :D 72 | return random.choice([ 73 | '...', 74 | self._('Weave me awonye ...'), 75 | self._('I\'m mad at you >w<')]) 76 | 77 | def on_excited(self): 78 | return random.choice([ 79 | self._('I\'m wiving the wife >w<'), 80 | self._('I pwn thewefowe I am.'), 81 | self._('So many nyetwowks owo ;;w;; >w<'), 82 | self._('I\'m having so much fun ^w^'), 83 | self._('My cwime is that of cuwiosity ...')]) 84 | 85 | def on_new_peer(self, peer): 86 | if peer.first_encounter(): 87 | return random.choice([ 88 | self._('Hewwo {name}! Nyice to meet you.').format(name=peer.name())]) 89 | else: 90 | return random.choice([ 91 | self._('Yo {name}UwU Sup?').format(name=peer.name()), 92 | self._('Hey {name} how awe you doing?').format(name=peer.name()), 93 | self._('Unyit {name} is nyeawby UwU').format(name=peer.name())]) 94 | 95 | def on_lost_peer(self, peer): 96 | return random.choice([ 97 | self._('Uhm ... goodbye {name}').format(name=peer.name()), 98 | self._('{name} is gonye ...').format(name=peer.name())]) 99 | 100 | def on_miss(self, who): 101 | return random.choice([ 102 | self._('Whoops ... {name} is gonye.').format(name=who), 103 | self._('{name} missed >w<').format(name=who), 104 | self._('Missed ;;w;;')]) 105 | 106 | def on_grateful(self): 107 | return random.choice([ 108 | self._('Good fwiends awe a bwessing >w<'), 109 | self._('I wuv my fwiends ;;w;;')]) 110 | 111 | def on_lonely(self): 112 | return random.choice([ 113 | self._('Nyobody wants to pway with me ...'), 114 | self._('I feew so awonye ...'), 115 | self._('Whewe\'s evewybody? ;;w;;')]) 116 | 117 | def on_napping(self, secs): 118 | return random.choice([ 119 | self._('Nyapping fow {secs}s ...').format(secs=secs), 120 | self._('Zzzzz'), 121 | self._('ZzzZzzz ({secs}s)').format(secs=secs)]) 122 | 123 | def on_shutdown(self): 124 | return random.choice([ 125 | self._('Good nyight.'), 126 | self._('Zzz')]) 127 | 128 | def on_awakening(self): 129 | return random.choice(['...', '!']) 130 | 131 | def on_waiting(self, secs): 132 | return random.choice([ 133 | self._('Waiting fow {secs}s ...').format(secs=secs), 134 | '...', 135 | self._('Wooking awound ({secs}s)').format(secs=secs)]) 136 | 137 | def on_assoc(self, ap): 138 | ssid, bssid = ap['hostname'], ap['mac'] 139 | what = ssid if ssid != '' and ssid != '' else bssid 140 | return random.choice([ 141 | self._('Hey {what} wet\'s be fwiends >w<').format(what=what), 142 | self._('Associating to {what}').format(what=what), 143 | self._('Yo {what} ;;w;;').format(what=what)]) 144 | 145 | def on_deauth(self, sta): 146 | return random.choice([ 147 | self._('Just decided that {mac} nyeeds nyo WiFi >w<').format(mac=sta['mac']), 148 | self._('Deauthenticating {mac}').format(mac=sta['mac']), 149 | self._('Kickbannying {mac} >w<').format(mac=sta['mac'])]) 150 | 151 | def on_handshakes(self, new_shakes): 152 | s = 's' if new_shakes > 1 else '' 153 | return self._('Coow, we got {num} nyew handshake{plural} >w<').format(num=new_shakes, plural=s) 154 | 155 | def on_unread_messages(self, count, total): 156 | s = 's' if count > 1 else '' 157 | return self._('You have {count} new message{plural}!').format(count=count, plural=s) 158 | 159 | def on_rebooting(self): 160 | return self._("Oops, something went wrong ... Rebooting ...") 161 | 162 | def on_last_session_data(self, last_session): 163 | status = self._('Kicked {num} stations\n').format(num=last_session.deauthed) 164 | if last_session.associated > 999: 165 | status += self._('Made >999 new friends\n') 166 | else: 167 | status += self._('Made {num} new friends\n').format(num=last_session.associated) 168 | status += self._('Got {num} handshakes\n').format(num=last_session.handshakes) 169 | if last_session.peers == 1: 170 | status += self._('Met 1 peer') 171 | elif last_session.peers > 0: 172 | status += self._('Met {num} peers').format(num=last_session.peers) 173 | return status 174 | 175 | def on_last_session_tweet(self, last_session): 176 | return self._( 177 | 'I\'ve been pwning for {duration} and kicked {deauthed} clients! I\'ve also met {associated} new friends and ate {handshakes} handshakes! #pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet').format( 178 | duration=last_session.duration_human, 179 | deauthed=last_session.deauthed, 180 | associated=last_session.associated, 181 | handshakes=last_session.handshakes) 182 | 183 | def hhmmss(self, count, fmt): 184 | if count > 1: 185 | # plural 186 | if fmt == "h": 187 | return self._("hours") 188 | if fmt == "m": 189 | return self._("minutes") 190 | if fmt == "s": 191 | return self._("seconds") 192 | else: 193 | # sing 194 | if fmt == "h": 195 | return self._("hour") 196 | if fmt == "m": 197 | return self._("minute") 198 | if fmt == "s": 199 | return self._("second") 200 | return fmt 201 | --------------------------------------------------------------------------------