This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this checks for "unsafe query risks in active record" by reading your | |
# db/schema.rb file, according to | |
# https://groups.google.com/forum/#!topic/rubyonrails-security/8CVoclw-Xkk | |
class MockTable | |
@@tables = {} | |
def self.tables | |
@@tables | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
GRUB_CFG = "/mnt/boot_loader/boot/grub/grub.cfg" | |
def read_menu_entries(cfg_file) | |
menu_entries = [] | |
File.readlines(cfg_file).each do |line| | |
next if !line.include?("menuentry") | |
entry = line.match(/menuentry.*['"](.*)['"].*/)[1] | |
menu_entries << entry |
NewerOlder