|
发表于 2023-4-14 15:41:20
|
显示全部楼层
mlcq 发表于 2023-4-14 15:35
牛
https://hostloc.com/thread-1157408-1-1.html
很简单啦
这是ruby的脚本,其他语言大概看下就可以开干了,注意运行的ip要跟你netcup访问的ip一样
[ol]require 'http'require 'telegram/bot'def send_tg(msg) title=msg['title'].gsub(/\s/, '') url="https://**cup.eu/bestellen/produkt.php?produkt=#{msg['product_id']}&hiddenkey=#{msg['product_key']}" message = "*/*", "cache-control" => "no-cache", "cookie" => "替换成COOKIE", "referer" => "https://**cup.de/", "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"}ids = []reqest_urls = %w( / /hosting/ /vserver/ /vserver/vstorage.php /vserver/vps.php /bestellen/domainangebote.php /ssl-zertifikate/ /bestellen/softwareangebote.php /groupware/ /professional/ /professional/dedizierte-server/ /professional/managed-server/ /professional/colocation/ /professional/softwareentwicklung/ /jobs/ /ueber-netcup/ /support/)request_url_index = 0while true begin response = HTTP.headers(headers).post("https://**cup.de/api/eggs", form: { "requrl": reqest_urls[request_url_index % reqest_urls.size] }) if response.status.success? msg = JSON.parse(response.to_s)['eggs'][0] price = msg['price'].gsub('€', '').gsub(',', '.').to_f unless ids.include?("#{msg['id']}#{msg['product_key']}") send_tg(msg) ids.push("#{msg['id']}#{msg['product_key']}") end end rescue => exception puts exception.backtrace ensure request_url_index = request_url_index + 1 sleep 3 end[/ol]复制代码 |
|