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¶m2=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.
Related
I am trying to get SQLMAP tool to test the possibilities of SQL injection on my asp.net web application which has forms authentication. But I am not getting any clear directions on this. I have tried my hands on numerous forums and found nothing concrete for ASP.NET web application. Most of the demos are provided for PHP sites, which does not work like ASP.NET.
When I try to run
sqlmap.py -u "https://test.XXXX_SIT/login.aspx" --dbs
command, I end up getting the below response from the SQLMAP console
I am new to this aspect of security testing and I am even open for any better and simple free tool that does the job for me.
Please let me know the possible solution or other better possibilities to achieve this.
Regards,
Krishna Samaga B.
You need parameters to test.
sqlmap.py -u "https://test.XXXX_SIT/login.aspx?login=1&pass=2" --dbs
for example login and pass are GET parameters.
or
sqlmap.py -u "https://test.XXXX_SIT/login.aspx" --data='login=1&pass=2' --dbs
if you're sending POST request with login and pass
I'm implementing a very light weight (embedded) OSGi framework which runs on a target piece of hardware. To attach a console I'm using org.apache.felix.gogo.shell and org.apache.felix.shell.remote.
To date, I've logged all custom messages using System.out.println which has worked fine, but now that I'm using the remote console I require something that will allow me to 'print' my messages to the OSGi console (and hopefully appear both on the target's console as well as the telnet console provided by felix.shell.remote).
I'm guessing there must be a way to get a handle to an OutputStream (or similar) to do this; My question is how? It seems that most people redirect their stdout etc. to solve problems like this.
I'm using declarative services, so I was hoping to be able to setup a component which attaches a referenced service (not important, but would make it nice and neat).
Any help is greatly appreciated.
The best way is to use logging for custom messages using the OSGi Log Service. That way you can get recent logs from the LogReader service from inside your shell or webconsole. If you insist on using popular frameworks like log4j etc. then you can get a bridge with Pax logging.
Alternatively, redirecting the output to a file in a known location works. You can then make a command in gogo that views that file or provide a tail function that continuously displays the new parts of the file.
I am trying to use cURL to automate some deployment tasks to an ASP.NET Application. But I am having some problems with it. The login part works perfectly but i guess the application for some reason has some sort of control for this kind of tools. These application was developed or an external company(real crappy app). Basically what i need to do is upload every month like 10 xml files by hand which is stupid!. I want to be able to automate this by using my own script(like ruby) and call cURL on the background to process the http requests.
Does any one know about any problems using cURL and an ASP.NET app?. May be should I write my own C# tool for this?.
Any ideas?
There's no problem with curl and ASP.NET. curl speaks HTTP and offers many different features and ways to send data, including multiport formpost uploads etc. You most likely just haven't figured out exactly how to mimic a browser when doing your command lines.
How to receive and parse a HTTP incoming request using python?
You can do:
python -m SimpleHTTPServer 8080
By default it serves the current working directory.
To get an idea of how this is put together/parses the requests or to work out how to build one for your own needs, look at the "SimpleHTTPServer.py" module in the lib directory of your python install.
You could also look at the built in webservers that the web frameworks like django, werkzeug, cherry-py provide. Stackoverflow has quite a few interesting questions.
There are dozens of solutions for this, of all kinds and flavors.
The most basic would be SimpleHTTPServer mentioned by #davey.
Other options would be:
http://webpy.org/ - simple, lightweight framework
http://www.tornadoweb.org/ - flexible and scalable web server
http://twistedmatrix.com/trac/wiki/TwistedWeb - single-threaded, event-driven server and framework
http://bottle.paws.de/ - single-file server and framework
I have a python script on a linux server that I can SSH into and I want to run the script on the linux server( and pass it parameters entered by the user) and get the output on an ASP.net webpage running on IIS. How would I be able to do that?
Would it be easier if I was running a wamp server?
Edit: The servers are in the same internal intranet.
Probably the best approach is the least coupled one. If you can determine a protocol that you're comfortable with the two (asp/python) talking in, it will go a long way to reducing headaches.
Let's say you pick XML.
Setup the python script to run as a WSGI application with either cherrypy or apache (or whatever). The script formats it's response in XML and passes that to WSGI which returns the XML over HTTP.
On the ASP.NET side of things, whenever you want to "run the script" you simply query the URL with the WebRequest class, then parse the results with LINQ-to-XML (which on a side note is a really cool technology).
Here's where this becomes relevant: Later on if either the ASP.NET implementation or the python implementation changes you don't have to re-code/refactor the other. Later if you realize that the ASP.NET app and some desktop app need to be able to do that, you've standardized on a protocol and implementing it should be easy and well supported.