Skip to main content

Good Old HTTP Test on Windows with VBScript

Deploying a Point-Of-Sale system on a large store with existing security protocols is not a walk in the park. Processes that can be easily done in a test environment can be prohibitive in the actual production setup. ( TL;DR Scroll further down for the script)

Scenario

You are implementing a new electronic payment system in store ABC. Hardware replacement went well, installation went well, then its time to test. That easy, just run a few transactions and you will be out of the site in no time. Then it hits, the PINPad system had an issue downloading the configuration file from the server across the internet. The device routes its request to the POS so it will be easy testing the connection. The lengthy documentation tells you to just send a get request to a URL address in the Internet Explorer. Great! What Windows machine doesn't have IE? None you know of! But the system administrator is wise enough to disable it, avoiding possible vulnerabilities that might jeopardize their accreditation. Possible solutions:
  1. Wish that your friend "curl" from MacOS is in Windows. Unfortunately, none.
  2. Download curl for Windows. Ooops !  They don't allow you to install new software on the machine.
  3. Well, let us just call the IT support and make them watch our network traffic. Must have been the best resort, but there's a bureaucracy-like system in place, it will take you days to get this going.
  4. Do you know VBSCRIPT and sure that it will run on the system with no issues?  You can follow the steps below if you answered yes.
Create a VBSCRIPT file (e.g. httptest.vbs) with the content below and save it.
Dim request
Set request = CreateObject("MSXML2.XMLHTTP")
request.open "GET", "http://your.url.com", False
request.send
Wscript.Echo request.responseText

Then, run the following on the command prompt.
C:\>yourdirectory\ start httptest.vbs
Windows will alert you with a message box showing the response text. Mine is a little expressive, your systems prompt may not.


I guess your fate will depend on what the system will tell you. Good luck!





Comments

Popular posts from this blog

Getting Started with Stateless : A Lightweight Workflow Library Alternative for .NET

Image Credit: https://www.pioneerrx.com A year ago, I was looking for a simple workflow manager for a project I was working. Its a medium sized application that involves tracking the state of assets in the system. Back in 2008, Microsoft (MS) introduced new technologies along with the release of Visual Studio 2008: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), and  Windows Workflow Foundation (WF). Having worked in a company utilizing mostly MS products for development, my first option was to go with WF. After doing some time reading and studying the library, I paused and decided it was too complex for my requirement. Using WF would be an overkill and the fact that it has, a rather, steep learning curve, there has to be another option. My mind toyed with the idea of developing a simple workflow library myself. It would be a learning experience but it might end up consuming a lot of time. Why reinvent the wheel? So I started querying the inte

Hiding Unwanted Python Folders and Files in Visual Studio Code

Visual Studio Code is a universal editor and pretty good at it. However, the explorer view maybe cluttered with the automatically generated folders and files confusing developers. Python is no different. Below are example files and folders generated by Python. The __pycache__ folder and *.pyc files  are totally unnecessary to the developer. To hide these files from the explorer view, we need to edit the settings.json for VSCode. Add the folder and the files as shown below: Copy and paste the lines below : "**/*.pyc" : { "when" : "$(basename).py" }, "**/__pycache__" : true

My First Blog for 2009

Im starting 2009 with a blog on foods. Since my 4 months voluntary exile in the US (hahaha), I started cooking ( full time! ) so Google is my cookbook and I am the chef ( sort of ). Yesterday , I was looking forward for another experiment on the kitchen lab (it gets messy sometimes) . What I have ? Pork belly , Chinese Okra , Squash . I was having doubts on whether the Chinese Okra is the same thing as the vegetable I know from the province , "kabatiti" . So after searching for "kabatiti" on the net , Google returned some informative links on some Ilocano Foods which made my day . Listed below are some Ilocano food worth mentioning . Abrao or Inabrao - assorted seasonal vegetables, typically malunggay, and that quintessentially Ilocano vegetable, saluyot, boiled in a bagoong and fish broth Ipon—tiny fish in season during the cold months Poki-Poki (also poqui-poqui), an innocent omelet made of eggplant sautéed with garlic, onions, tomatoes, and eggs Kabat