Commit a9b9f0542fabb1d340598c9ad723a2653bcb9936

Authored by Thomas Pointhuber
1 parent e557cb1b02
Exists in master

Rev 7

Showing 2 changed files with 33 additions and 6 deletions Side-by-side Diff

  1 +
  2 +## Connect to badge
  3 +```
  4 +$ miniterm.py /dev/ttyUSB0 115200
  5 +```
  6 +
  7 +## Remove paradoxis ransomware
  8 +
  9 +Connect to tty using usb and press Ctrl+C, then enter the following commands:
  10 +
  11 +```
  12 +import badge, appglue
  13 +badge.nvs_set_str('boot','splash','splash')
  14 +appglue.home()
  15 +```
  16 +
  17 +## Update and test app with real virus
  18 +
  19 +```
  20 +import badge, appglue, wifi, woezel
  21 +wifi.init()
  22 +woezel.install('virus')
  23 +woezel.install('another_hack_simulator')
  24 +woezel.install('ascii_porn')
  25 +woezel.install('devlol_antivirus')
  26 +appglue.start_app('devlol_antivirus')
  27 +```
1 1 import os, appglue, dialogs
2 2  
3   -known_signatures = ['ascii_porn', 'the_legend_of_zelda', 'internship', '1p0rn', 'another_hack_simulator']
  3 +known_signatures = ['ascii_porn', 'the_legend_of_zelda', 'internship', '1p0rn', 'another_hack_simulator', 'Internship']
4 4  
5 5 known_src_signatures = ['install(\'Internship\')', '92.222.19.24', 'paradoxis.nl', 'ransom_', 'heldhostage!', 'virus']
6 6  
7 7 def uninstall_ransomware(program):
8   - ok = dialogs.prompt_boolean('Do you want to remove: %s?' % program)
9   -
10   - if ok:
  8 + if dialogs.prompt_boolean('Do you want to remove: %s?' % program):
11 9 path = '/lib/' + program
12 10 for files in os.listdir(path):
13 11 os.remove(path + "/" + files)
... ... @@ -49,7 +47,7 @@
49 47  
50 48 removed_viruses = 0
51 49 for program in installed_software:
52   - if program == 'ransomware_decrypter': # we don't want to delete ourself
  50 + if program == 'devlol_antivirus': # we don't want to delete ourself
53 51 continue
54 52  
55 53 path = '/lib/' + program
... ... @@ -67,7 +65,8 @@
67 65  
68 66 if viruscount != 0:
69 67 dialogs.notice('{} virus removed'.format(viruscount), 'Ransomware Remover')
70   - # TODO: reinstall all software, if a virus was found
  68 + if dialogs.prompt_boolean('It\'s recommended to reinstall all apps when a virus was found'):
  69 + appglue.start_app('update_all')
71 70 else:
72 71 dialogs.notice('no virus removed', 'Ransomware Remover')
73 72