Skip to content

Instantly share code, notes, and snippets.

@miukoba
Created October 10, 2012 09:40
Show Gist options
  • Save miukoba/3864399 to your computer and use it in GitHub Desktop.
Save miukoba/3864399 to your computer and use it in GitHub Desktop.
全inputに文字列を入力するテスト用のブックマークレット
javascript:(function(){var str=prompt('テスト文字列を入力して下さい。',"<script>alert('XSS');</script>");if(str!=""&&str!=null){var text=document.getElementsByTagName("input");for(var i=0,l=text.length;i<l;i++){if(text[i].type=='text'){text[i].value=str}}var textarea=document.getElementsByTagName("textarea");for(var i=0,l=textarea.length;i<l;i++){textarea[i].value=str}}}())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment