index.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!doctype html>
  2. <html lang="ru">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  6. <link href="/static/bootstrap.min.css" rel="stylesheet">
  7. <link href="/static/index.css" rel="stylesheet">
  8. <link href="/static/intlTelInput.min.css" rel="stylesheet">
  9. <title>b0mb3r 💣</title>
  10. </head>
  11. <body>
  12. <div id="block-ui">
  13. <div id="loader"></div>
  14. </div>
  15. <div id="main">
  16. <h1 class="no-select">b0mb3r 💣</h1>
  17. <p class="lead" id="sms">Доступно SMS-сервисов: <span
  18. class="badge badge-pill badge-primary no-select">{{sms}}</span></p>
  19. <form action="/sms" id="phone-form" method="post">
  20. <div class="form-row">
  21. <div class="col">
  22. <label for="phone"></label>
  23. <input aria-describedby="phonesHelp" class="form-control" id="phone" name="phone"
  24. pattern="\d*" placeholder="Номер" required type="number">
  25. </div>
  26. <div class="col">
  27. <label for="count"></label>
  28. <input class="form-control" id="count" max="1000" min="1" name="count" placeholder="Повторы"
  29. required type="number" value="1">
  30. </div>
  31. <div class="col">
  32. <label for="smsText"></label>
  33. <input class="form-control" id="smsText" max="1000" min="1" name="smsText" placeholder="Текст SMS"
  34. type="text">
  35. </div>
  36. </div>
  37. <div class="form-group form-check">
  38. <input class="form-check-input" id="call" name="call" type="checkbox" value="true">
  39. <input name="call" type="hidden" value="false"/>
  40. <label class="form-check-label" for="call">Звонки (beta)</label>
  41. </div>
  42. <small class="form-text text-muted" id="phonesHelp"></small>
  43. <button class="btn btn-primary btn-lg" type="submit">Начать атаку</button>
  44. </form>
  45. </div>
  46. <div class="mt-auto py-3 footer" id="footer">
  47. <span class="text-muted">Made with ❤️ by crinny.</span>
  48. </div>
  49. <script src="/static/jquery-3.4.1.min.js"></script>
  50. <script src="/static/intlTelInput.min.js"></script>
  51. <script type="text/javascript">
  52. let tips = ['b0mb3r работает с российскими номерами лучше всего', 'вы можете предложить новый SMS-сервис <a href="https://github.com/crinny/b0mb3r/issues/new?labels=enhancement&title=%D0%94%D0%BE%D0%B1%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%20SMS-%D1%81%D0%B5%D1%80%D0%B2%D0%B8%D1%81%D0%B0">здесь</a>'];
  53. let input = document.querySelector('#phone');
  54. let tip = document.querySelector('#phonesHelp');
  55. let intltelinput = undefined;
  56. $(document).ready(function () {
  57. tip.innerHTML = 'Совет: ' + tips[Math.random() * tips.length >> 0];
  58. intltelinput = intlTelInput(input, {
  59. onlyCountries: ['ru', 'ua', 'kz', 'by'],
  60. initialCountry: 'ru',
  61. });
  62. });
  63. $('#phone-form').submit(function (e) {
  64. e.preventDefault();
  65. $('#main').css({'animation': 'blur', 'animation-duration': '0.6s', 'animation-fill-mode': 'both'});
  66. $('#footer').css({'animation': 'blur', 'animation-duration': '0.6s', 'animation-fill-mode': 'both'});
  67. setTimeout(function () {
  68. $('#block-ui').css('display', 'block');
  69. }, 600);
  70. let data = $('#phone-form').serializeArray();
  71. data.push({name: "country", value: intltelinput.getSelectedCountryData().iso2});
  72. $.ajax({
  73. url: '/sms',
  74. type: 'post',
  75. data: data,
  76. success: function () {
  77. setTimeout(function () {
  78. $('#block-ui').css('display', 'none');
  79. }, 600);
  80. $('#main').css({
  81. 'animation': 'blur',
  82. 'animation-duration': '0.6s',
  83. 'animation-fill-mode': 'both',
  84. 'animation-direction': 'reverse'
  85. });
  86. $('#footer').css({
  87. 'animation': 'blur',
  88. 'animation-duration': '0.6s',
  89. 'animation-fill-mode': 'both',
  90. 'animation-direction': 'reverse'
  91. });
  92. }
  93. });
  94. });
  95. </script>
  96. </body>
  97. </html>