2024-05-09 02:02:34 发布
网友
对不起,如果标题不够清楚,英语不是我的主要语言,我有困难写技术的东西
有一个网站: https://www.cleancss.com/javascript-obfuscate/index.php
我需要能够发送代码到这个网站模糊输入和接收其输出。我不知道该怎么做。我在考虑使用web浏览器模块,但我更希望这是在后台完成,所以没有浏览器窗口是打开的
请帮我找到解决办法
模糊代码位于id为packed的textarea中
packed
textarea
Javascript模糊API
import requests from bs4 import BeautifulSoup with open('file.js') as s: source= s.read() cookies = { 'PHPSESSID': 'foln2l1v1564o66vmbs19mk0j1', } headers = { 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0', 'Origin': 'https://www.cleancss.com', 'Upgrade-Insecure-Requests': '1', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3', 'Referer': 'https://www.cleancss.com/javascript-obfuscate/index.php', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-US,en;q=0.9,ta;q=0.8', } data = { 'ascii_encoding': '62^', 'fast_decode': 'on^', 'src': source } response = requests.post('https://www.cleancss.com/javascript-obfuscate/index.php', headers=headers, cookies=cookies, data=data) soup=BeautifulSoup(response.text,'lxml') with open('file2.js') as f: print(soup.select('#packed')[0].text,file=f)
模糊代码位于id为
packed
的textarea
中Javascript模糊API
相关问题 更多 >
编程相关推荐