Guest User

Untitled

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