Files
metasploit-gs/dev/windows/license.rb
T
HD Moore 61b0364ae2 Windows installer files
git-svn-id: file:///home/svn/framework3/trunk@3790 4d416f70-5f16-0410-b530-b9f4589650da
2006-07-31 05:04:20 +00:00

39 lines
707 B
Ruby
Executable File

#!/usr/bin/env ruby
exit(0) if (File.exists?(".LICENSED"))
while (true)
$stdout.puts "You must agree to the license terms before using this software."
$stdout.write "Press enter to continue."
$stdin.gets
system("less -e LICENSE")
$stdout.puts ""
$stdout.write "Accept this license? (yes/no) > "
$stdout.flush
answer = $stdin.gets
$stdout.puts ""
if (answer and answer =~ /^yes/i)
fd = File.open(".LICENSED", "w")
fd.write(answer)
fd.close
exit(0)
end
if (answer and answer =~ /^no/i)
$stdout.puts ""
$stdout.puts "Sorry, you must accept the license to use this software."
$stdout.puts "Press enter to quit."
$stdin.gets
exit(1)
end
if (! answer)
exit(1)
end
end