Wscript and Tor Browser - wsh

so I'm new to all of this and I need to know if wscripts would work with tor browser, and what would that code look like. i need the bot to go to a website and click a button and then go to another different website, and all on tor browser. I was wonder if that's possible and what I would have to write for it to work.

No. Tor Browser uses Firefox which does not support Microsoft VBScript, and the default security settings may not permit it even if it did.
The only way it may work is if a user configures an old version of Internet Explorer to use Tor's SOCKS proxy. Edge doesn't support VBScript at all.
This article also points out that Microsoft killed VBScript by default in IE in August 2019. What is VBScript, and Why Did Microsoft Just Kill It?

Try something like this:
Option Explicit
Dim s
Set s = CreateObject("WScript.Shell")
s.Run "torbrowsername"
WScript.Sleep (16000)
s.SendKeys "^{T}"
WScript.Sleep (1000)
s.SendKeys "website1.example"
s.SendKeys "{ENTER}"
WScript.Sleep (4000)
s.SendKeys "{TAB}"
s.SendKeys "{SPACE}"
WScript.Sleep (4000)
s.SendKeys "^{T}"
s.SendKeys "website2.example"
s.SendKeys "{ENTER}"

Related

Will workndows script host run script in Chrome browser

Dim Wsh
Set objShell =CreateObject("WScript.Shell")
Set objExec = objShell.Exec("C:\Program Files\Google\Chrome\Application\chrome.exe https://<internal company VPN address>")
Wscript.Sleep 1000
objShell.AppActivate("<Title page>")
Wscript.Sleep 1000
Wsh.SendKeys "<username>"
Wscript.Sleep 1000
Wsh.SendKeys "{TAB}"
Wsh.Sendkeys "<password>"
Wscript.Sleep 1000
Wsh.SendKeys "{ENTER}"
I am getting a WSH "objectRequired ." runtime error on trying to run the following script.
What happens is :
Chrome Browser opens up correctly to Chrome and the
included https address ( internal vpn address )
However it stops with the stated runtime error just prior to the
because the cursor is not focused in that text box.
My understanding is that WSH cannot treat Chrome browser and an object and that
java script would work however I need advice or starte code to help me along.
Objective is to
1 . set focus on the username text box then
tab to password text box then hit the
enter key and log in

What would cause InternetExplorerMedium to work on one machine but not another?

I have a VBA script in Access that logs onto a website and downloads some data, I built it using a laptop and use the code of
Dim objIE As InternetExplorerMedium 'special object variable representing the IE browser
Dim aEle As HTMLLinkElement 'special object variable for an <a> (link) element
Dim element As HTMLLinkElement
Set objIE = New InternetExplorerMedium
On Error GoTo Errorhandler
objIE.Visible = False
DoCmd.Hourglass (True) 'navigate IE to this web page
objIE.navigate www.google.com ' google just for example
Then it inputs the login info into the proper boxes and logs in.
Which works fine, however I installed this front end on another user's PC and it no longer works, it just opens the page but fills in no info.
However, if I change,
Set objIE = New InternetExplorerMedium
to
Set objIE = CreateObject("InternetExplorer.Application")
then it works on their PC. But this change does not work on my laptop.
What would cause this issue and how could I standardize this so I can install on any windows machine without worry of this occurring.
Notes:
We are both on the company LAN, and both are running windows 10 Home.
It was something incredibly simple, I just had to add the website I was accessing as a trusted site in Internet Explorer.

How do I prevent message flooding with open_port?

I'm trying to read a 100gb file through stdin one line at a time using
Port = open_port({fd, 0, 1}, [in, binary, {line, 4096}]),
but this floods my system with messages until I run out of ram. Is there a away to make it like {active, once} with ports? There is also io:get_line() but I was wondering if this could work.
No, there is not flow control over ports so if you can't process fast enough you should use another method of processing. You can set binary mode on STDIN using
ok = io:setopts(standard_io, [binary]),
and then you can read it using file:read_line(standard_io) if you are using version 17 or newer (there was performance impacting bug).

Access nsIDOMChromeWindow from Services.jsm or similar, for XUL to Add-ons-SDK migration

Migrating an old Add-on from XUL to Add-ons-SDK in preparation for WebExtensions. Would still like to support some older browsers with this add-on, so that is why I am not jumping right to WebExtensions.
What I'd like to do is control minimize, maximize full screen and restore functions. These seem to be implemented right on the window object, since FF 45.0, which is great, but no help when trying to support older browsers. Not sure if that functionality existed before, or how to access it in a XUL-migration friendly context ( Step 1: use Services.jsm ). See Migrate from XUL Overlay to Restartless.
To best I could find is to use Components.interfaces.nsIDOMChromeWindow.windowState of the STATE_* attributes to detect the minimized, maximized, normal or fullscreen states, and then issue the methods minimize(), maximize() and restore() found on the same object ( nsIDOMChromeWindow ).
But I can't seem to find the precise way to load the equivalent
Components.interfaces.nsIDOMChromeWindow.windowState
using a resource:// like Services.jsm.
For example, the old add-on also used:
Components.interfaces.nsIPrefBranchInternal
which was later renamed to
Components.interfaces.nsIPrefBranch2
and later folded into
Components.interfaces.nsIPrefBranch
which can now be accessed by:
Components.utils.import( 'resource://gre/modules/Services.jsm' );
var prefsService = Services.prefs;
See Services.jsm on MDN for options.
| Service accessor | Service interface | Service name |
|-------------------|----------------------|-------------------------|
| domStorageManager | nsIDOMStorageManager | DOM Storage Manager |
| DOMRequest | nsIDOMRequestService | DOMRequest service |
| wm | nsIWindowMediator | Window mediator service |
| ww | nsIWindowWatcher | Window watcher service |
There's two things that start with nsIDOM* (Request and Storage), but don't seem to be related, or have any path to the desired object. nsIWindow* (Mediator and Watcher) both have some methods that return a similarly named nsIDOMWindow object (deprecated in FF 44), including a confusingly named getChromeForWindow() method, but that is NOT THE SAME OBJECT, and indeed, doesn't have any of the desired state attributes or window management toggle methods.
I am not sure what I am missing here. Is this simply one of the things the developers decided was "low level" and thus refused to provide any high level access via Services.jsm? Or is the access there but documentation incomplete? Or is it documented but buried? Or is it blogged about somewhere? I could only find one single post on all of StackOverflow that even had nsIDOMChromeWindow in it!
As I initially stated, I know there's a simple way to do this in both the "old" style XUL/Overlay, as well as the "new" FF >= 45, but I am looking to support that in-between area, at least for another year or two, until they absolutely drop XUL. By then, I will have the Add-ons-SDK version ready to go, and the WebExtensions well underway.

Media Temple php.ini saving

So I am working on my client's website and in order to integrate twitter posts into the website I need to include the following line in PHP.ini:
allow_url_fopen = On;
So now my PHP.ini looks like this:
; Rename this file to php.ini and uncomment or add directives.
; For a complete list of valid directives, visit:
; http://us2.php.net/manual/en/ini.php
[PHP]
; We highly recommend that you leave this options enabled
cgi.fix_pathinfo=1
; Increase maximum post size
;post_max_size = 20M
; Increase execution time
;max_execution_time = 300
; pull in EGPCS [Environment, GET, POST, Cookie, Server] variables as globals
;register_globals = true
; For performance reasons, (mt) does not load all of the modules that are available
; into PHP. You may uncomment any one of the following "extension" lines to enable
; the desired module
; Salblotron XSLT
;extension=xslt.so
; save in local tmp
session.save_path=/home/65994/data/tmp
allow_url_fopen = On;
upload_max_filesize = 20M
For some reason it works... but only for about 15 mins or so before it breaks and comes up with an error.
Nevertheless if I take the line added to php.ini and move it around... and resave, it works again...
ODD...
Does anyone know why or how to fix this?
MT disables insecure php functions by default now, so there's a good chance that your issue may be due to something causing a timeout even though you've re-enabled the 'offensive' option. Try setting the
default_socket_timeout
option to something longer http://php.net/manual/en/filesystem.configuration.php
As an aside, you'll probably save yourself some grief if you switch to cURL with Twitter OAuth instead of direct url open.

Resources