Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from selenium import webdriver
- cipher = "00 0c 3a 1e 52 02 53 02 51 0c 5d 56 51 5a 5f 5f 5a 51 00 05 53 56 0a 5e 00 52 05 03 51 50 55 03 04 52 04 0f 0f 54 52 57 03 52 04 4e"
- profile=webdriver.FirefoxProfile()
- driver=webdriver.Firefox(profile)
- charsets = "}abcdef1234567890"
- s1 = "<h1>Smart Cipher System</h1>"
- driver.get('http://bow.chal.mmactf.link/~scs/crypt5.cgi')
- flag = "MMA{"
- while 1:
- for c in charsets:
- name = driver.find_element_by_name('s')
- name.clear()
- name.send_keys(flag+c)
- name.submit()
- source = driver.page_source
- hex_text = source[353:353-1+3*len(flag)] # 353 la vi tri tai hex thu 2 tro di trong source
- if hex_text == cipher[:len(hex_text)]:
- flag = flag+c
- if c == "}":
- print flag
- exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement