Skip to content

Instantly share code, notes, and snippets.

@alpaca-tc
Created September 18, 2013 10:22
Show Gist options
  • Select an option

  • Save alpaca-tc/6607218 to your computer and use it in GitHub Desktop.

Select an option

Save alpaca-tc/6607218 to your computer and use it in GitHub Desktop.

ヒント

上司A「Array#include?と、マッチ(=~)をうまく使えば結果が分かるかもしれない」

my_domains = { 
  'www.hitparade.jp/wp/wp-login.php' => 'Nothing',
  'www.voxofjoy.com/wp-login.php' => 'Nothing',
}
target_list.each do |line|
  # ドメインを抜き出す処理
  domain = ...

  if # 自社ドメインが含まれる場合
    if # 攻撃が成功している場合
      my_domains[domain] = 'Success'
    else
      my_domains[domain] = 'Failure'
    end
  end
end

my_domains.each do |domain, result|
  puts "#{result}: #{domain}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment