pwd = '123321'
pub_key = '04a5ec8bd0c593a6384830ba34a5a54ceb853da080813437c15dc9736f6883af3303d92f14614849e3fdc5d24b1a517c2509b2fca766c37b2beca48806de540ff0'
url = "https://ipo.ebscn.com/obm-ipo/scripts/main.min.c79c5211.js"
rsa_script = "window = {};" << (RestClient.get url).body
rsa_script << "return [window.sm2Encrypt('#{pwd}','#{pub_key}',0)];"
rsa_script.force_encoding('utf-8')
ExecJS.exec rsa_script