lib/micro_blitz/attacks/eraser.rb
# Eraser is exactly what the name implies, it erases things.
# There are multiple abilities it has such as; deleting a whole file,
# deleting half a file, etc.
#
# This is a relatively easy error to trace down in production. All that is
# required is a login to the prod server and verify if the file is there or
# not. Slightly more tricky is if only deleting half the file. Visually, the
# engineer won't notice anything unless they open the file.
Eraser is exactly what the name implies, it erases things.
There are multiple abilities it has such as; deleting a whole file,
deleting half a file, etc.

This is a relatively easy error to trace down in production. All that is
required is a login to the prod server and verify if the file is there or
not. Slightly more tricky is if only deleting half the file. Visually, the
engineer won't notice anything unless they open the file.
Eraser is exactly what the name implies it erases things . There are multiple abilities it has such as ; deleting a whole file deleting half a file etc . This is a relatively easy error to trace down in production . All that is required is a login to the prod server and verify if the file is there or not . Slightly more tricky is if only deleting half the file . Visually the engineer won ' t notice anything unless they open the file .
def delete_half
      contents ||= file_contents
       Alternatively, we could do some basic binary searching. We'd have to keep
       a counter for the start of each method `def` and match it to its
       corresponding `end`. Not sure, coming back to this later. Or we can just
       delete the `def initialize` function ¯\_(ツ)_/¯
    end
def delete_half contents ||= file_contents end
Eraser is exactly what the name implies, it erases things.
Eraser is exactly what the name implies it erases things .
# Able to get contents of the file. Have the ability to count # of lines # within the file. This would allows us the ability to do n/2 where n is # the number of lines in the file. Given the bottom half the file we could # then delete it. However, it's not that simple. One option is to do some # actual parsing like the complier does but that is significantly more work. # # Alternatively, we could do some basic binary searching. We'd have to keep # a counter for the start of each method `def` and match it to its # corresponding `end`. Not sure, coming back to this later. Or we can just # delete the `def initialize` function ¯\_(ツ)_/¯