dongtang5229 2019-03-16 19:27
浏览 42

如何从iPhone发送页面源到PHP帖子

Copied a JavaScript 10 years ago from somewhere what I been using to track certain elements found on a website. The webpage where information is collected are required 2 factors authentication so passing information is complicated. Back in the days decided to just use a JavaScript to send the entirety webpage from the user device to a php page where php looks for certain elements and extract information. The JavaScript saved on the user smartphones and when logged in to the website the user select the bookmark. Very simple concept but stoped working yesterday.

The code based on this found in a article what is still working but the modified wersion not working anymore.

“Working fine to display page source”

javascript: (function() {
  var a = window.open('about:blank').document;
  a.write('Source of ' + location.href + '');
  a.close();
  var b = a.body.appendChild(a.createElement('pre'));
  b.style.overflow = 'auto';
  b.style.whiteSpace = 'pre-wrap';
  b.appendChild(a.createTextNode(document.documentElement.innerHTML))
})();

No longer working, getting error 413.

javascript: (function() {
  var d = window.open('about:blank'),
    a = d.document;
  a.write('<!DOCTYPE html><html><head><title>Loading Source</title></head><body></body></html>');
  a.close();
  var b = a.body.appendChild(a.createElement('form'));
  b.setAttribute('method', 'post');
  b.setAttribute('action', 'https://webpageextract/extraction.php/?uri=' + location.href);
  var c = b.appendChild(a.createElement('input'));
  c.setAttribute('type', 'hidden');
  c.setAttribute('name', 'DOM');
  c.setAttribute('value', encodeURIComponent(document.documentElement.innerHTML));
  b.submit()
})()
  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题
    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败
    • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
    • ¥15 找一位技术过硬的游戏pj程序员
    • ¥15 matlab生成电测深三层曲线模型代码