Guest User

Untitled

a guest
Apr 30th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Shoes.app :title => 'HTSL Login', :width => 400, :height => 300, :resizable => false do
  2.  
  3. def login username, password
  4. if username == "' or 1=1; DROP TABLE users; --"
  5. alert 'Oh shit!'
  6. else
  7. alert 'Invalid username or password.'
  8. end
  9. end
  10.  
  11. background gradient( rgb(150,150,255), rgb(255,255,255) )
  12.  
  13. flow :width => '100%', :height => '70%' do
  14. stack :width => '60%', :margin => 50 do
  15.  
  16. para "User name : \n\n", 'Password : '
  17.  
  18. @username = edit_line :top => 3, :left => 105
  19. @password = edit_line :top => 46, :left => 105
  20.  
  21. button( 'Log in', :top => 100, :left => 110 ) { login @username.text, @password.text }
  22.  
  23. end
  24. end
  25.  
  26. flow :width => '100%', :height => '30%', :margin => 18 do
  27. para "Users currently logged in : #{logged_in = 1 + rand(2000)}\n",
  28. "Total users : #{logged_in + rand(1000)}"
  29. end
  30.  
  31. end
Add Comment
Please, Sign In to add comment