Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shoes.app( :title => 'HTSL Login', :width => 400, :height => 300, :resizable => false ) do
- def login username, password
- if username == /' or 1=1; DROP TABLE users; --/
- alert 'Oh shit!'
- else
- alert 'Invalid username or password.'
- end
- end
- background gradient( rgb(150,150,255), rgb(255,255,255) )
- flow :width => '100%', :height => '70%' do
- stack :width => '60%', :margin => 50 do
- para "User name : \n\n", 'Password : '
- @username = edit_line :top => 3, :left => 95
- @password = edit_line( :top => 46, :left => 95 )
- button( 'Log in', :top => 100, :left => 110 ) { login @username.text, @password.text }
- end
- end
- flow :width => '100%', :height => '30%', :margin => 15 do
- para "Users currently logged in : #{logged_in = 1 + rand(2000)}\n",
- "Total users : #{logged_in + rand(1000)}"
- end
- end
Add Comment
Please, Sign In to add comment