编写 UNIX 脚本
我对unix了解不多,但我确实可以使用一些指导。这是我想做的:
- 更改我的 IP 地址(我想通过代理列表或其他什么?)
- 连接到网页,然后运行一些 javascript
- 再次更改 IP,然后再次在页面上运行脚本。
这是可行的吗?我应该去哪里让这个项目滚动起来?我需要在今晚之前运行这个脚本。
谢谢你们!
I don't know much about unix, but I could really use some direction. Here's what I'd like to do:
- Change my IP address (I imagine via a proxy list or something?)
- Connect to a web page, and then run some javascript
- Change IP again, and run script on page again.
Is this doable, and where should I go to get this ball rolling? I need to get this script running by tonight.
Thanks guys!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用以下两种策略来实现您的目标:
您通常使用诸如 ifconfig。
可以使用诸如 wget 和 curl 但以编程方式执行基于浏览器的 JavaScript 完全是另一回事 - 解决方案是存在的,但它们似乎还处于“研究阶段”。通过自动化工具驱动 Firefox(或其他浏览器)(如果存在)(例如通过插件或测试工具,例如 Selenium)。
祝你今晚好运!
You can achieve your goal by using the two strategies below:
You typically change the IP address of a UNIX machine using a utility such as ifconfig.
Web pages can be programmatically retrieved using utilities such as wget and curl but programmatically executing browser-based JavaScript is a different beast altogether - solutions exist but they seem to be "researchy" as of yet. You might have more luck executing JavaScript hosted on a website by driving Firefox (or another browser) via its automation tool, if one exists (e.g. by a plugin, or a testing tool such as Selenium).
Good luck getting it tonight!