How do I fetch files with HTTP using Progress ABL? - http

Is there an easy way to fetch a file using an HTTP URL with Progress ABL 10.1B without external dependencies? If so, what is the most elegant way of doing so?
I tried the documentation, but didn't seem to contain anything like that.

I couldn't link through, but you can use sockets for this. Take a look at the doc here.

Related

Get API response under the Network Tab of Browser using Karate [duplicate]

I am writing UI automation script using karate DSL. In this at certain point I need to get value from network call in chrome. I want to interact with one of the webservice call in chrome devtools network tab and get the json response of that webservice.
I need this because I have to extract the value from that particular call and pass it on to the next step in my automation script.
I have seen the question related to sessionStorage(Is there a way of getting a sessionStorage using Karate DSL?) but I wonder how to do the same for network call using script command or any other way?
The first thing I would recommend is don't forget that Karate is an API testing tool at its core. Maybe all you need to do is manually make that call and get the response. You should be able to scrape the HTML and get the host and parameters needed.
That said - there's a new feature (only for Chrome) which is documented here: https://github.com/intuit/karate/tree/develop/karate-core#intercepting-http-requests - and is available in 0.9.6.RC2
It may not directly solve for what you want, but in a Karate mock, you should be able to set a value for use later e.g. by using a Java singleton or writing to a temp-file.
If there is something oddly more specific you need, please contribute code to Karate. Finally, there is an experimental way in which you can actually make raw requests to the Chrome DevTools session: https://github.com/intuit/karate/tree/develop/examples/ui-test#devtools-protocol-tips - it is for advanced users, but maybe you are one :)

How to Identify malicious code inside lua scripts that may be obfuscated/encrypted

I am part of a popular forum that is all about sharing/selling Lua scripts, some are open source, some are not.
I would like to know if there is an automated way of identifying if a certain Lua script contains malicious code, for example : os.execute('format C:') , or just any os.execute command.
Because, even if we require the user to provide the moderators with a open source copy of his script, how can we be sure if it's the same? or he changes the link to his script.
Thanks in advance.
Run the scripts inside a sandbox and only allow for the safe commands to be executed. For example, disable os.execute. See Lua SandBoxes wiki page for Lua-specific details.
If you need to allow calls like os.execute, but need to filter out some calls, then there is probably not much chance to secure it based on code review. What if the code includes something like os.execute('for'..'mat C'..string.char(58))? You can't even detect that it's 'format C:' without some code execution.

Are minimongoid hooks done server side?

I'm using minimongoid on my meteor project and I don't know if before Create and validations are done server side or client. Does anyone know ?
From its package.js file it looks like both! Also mentioned in the github readme.
So you can share the model files between the client and server. I'm not absolutely certain however that if you insert a model on the client and its been fiddled with by a hacker or something that it will be validated on the server automagically.
You might have to also validate it on the server too. The best place to do this would be in your collection's .allow method. Looking at the source of minimongoid there isn't anything tied up to .allow or .deny so you will need to validate it on the server with these.

Multiple files download in asp.net

I have some scenario in my application where i need to give multiple download functionality.
As much i come to know that multiple download is not possible using HTTP.Either we have to use multiple popup with javascript or we can do using web client.
I want to know that is there any other way to this.
Can we use FTP for multiple download in asp.net?
if yes, then how?
Check out this JQuery plug-in that does most of the work for you (and doesn't require you to ZIP all files):
https://github.com/biesiad/jquery-multidownload/ (fixed link)
No you can't use FTP in ASP.NET, however you could add all files to a single zip-file and let the user download that file (containing all files).
I would be tempted to zip the files on the server and send them down that way. Is that possible?
Alternatively you could try emailing the files to them.
Via HTTP you would probably need to use AJAX or iframes. The iframe option would be akin to making new windows just the user wouldnt need to see them. In this way you would have multiple http requests. I'm not sure how all of the browsers would deal with this though at the minute I am just speculating.
Most modern websites solve this problem by sending you the collection of files in a zipped package, sites like Google Drive for example. This is a perfect solution especially if you are expecting a large number of files.
However, if you expect a relatively low fixed number of files, and these files are statically stored in the server (meaning not generated at run-time), you can develop a client-side ajax script (jquery presumably) that will download the files one by one.
Initially this script would request a list of files to download (in json format for example), once received then it will enumerate through the result, firing an asynchronous request for the file one by one.

Can Anthill Beanshell script make a HTTP connection?

I use Anthill Pro for build and deployment management. I'm attempting to configure Anthill to make a HTTP POST or GET to a web server after a deployment has completed. I'm passing basic information regarding the deployment to a web application.
It looks like writing a Beanshell script is the way to do this in Anthill (I'm open to suggestions), but the documentation does not seem to offer an obvious way to do this.
Can a Beanshell script from Anthill make a HTTP connection to accomplish this, or is there a better way?
Example of the connection I'm trying to make:
http://myServer/myScript/?param1=deployValue1&param2=deployValue2
Any help is appreciated.
Are you just trying to hit a URL and validate that some text on it is there? If so we have a plugin baking that does this sort of thing. Shoot me a mail at eric#urbancode.com (or file a support ticket) and we can get that over to you.

Resources