Any good tool(s) for Automating remote logging - automation

I need to write a script, that can automate few things:
a) telnet to a router
b) issue configuration commands.
c) check for status(success/error)
What language/framework should I use?
I only know about "expect".
What are other better alternatives?

If you don't want to use expect, you're probably going to end up using some more standard scripting language which is less specifically well-suited to the task. If you get into that realm, the proper answer is "anything you feel comfortable with", be that bash, python, or whatever else.
It's a pretty general problem, so use whatever produces an easy-to-maintain system.

you can make use of Jcraft an open source tool.

You can try using Ganymed SSH2 a Java Open Source API to connect to Remote Machines. I used it for secured remote login. You may even check my blog for referene
http://allianceglobalservices.com/blog/terminal-window-automation-using-ganymedssh-2-api

Related

GTest `--gtest_stream_result_to` how does it work?

Looking through the --help on any gtest unittest, I see the --gtest_stream_result_to option.
Presumably, I can stream my test results, yeah!
But the more I look at it, there is absolutely no documentation on the format of the streaming endpoints or the protocol. I setup the fake server to see what it does, and now I'm making slow progress with seeing things like this:
code 400, message Bad request syntax ('gtest_streaming_protocol_version=1.0')
How do I use this feature? Is the spec for gtest_streaming_protocol_version something that is published? Any help would be awesome!
This feature was put in to facilitate communicating test results to Eclipse. You can reverse engineer the protocol from the source code. If you need more info on event listeners in general in order to better understand StreamingListener, the documentation has a section on it.

How to Check FTP Connection via NSTask?

I want to write a cocoa application that checks if my ftp server is still up and running.
So far I learned that CFFTP could be used but this is not object oriented code so a no go for me. Also some people recommend ConnectionKit but that won't build on 10.7.
So my idea was to use terminal commands in my application with the help of NSTask.
The problem is: there are multiple commands that need to be executed, the first being
ftp ftp.foobar.com. Then I need to check if the response is ok or not. After that I will have to put in my username and password and also evaluate that output of that.
Does anyone know how the entire ftp connection handshake can be accomplished in Objective C via NSTask?
You could run
ftp -N /path/to/a/netrcfile
and try to parse the output.
I agree with #Rob Keniger in the comments, though - why not go for the C API? I am sure there is plenty of sample code out there to learn[*] from.
[*] Read: copy, then try to figure out why it does what it does

Is there an Objective-C client for Cassandra?

I want to access a Cassandra instance in an Iphone application and i need an objectiveC client
for that. I couldnt find one, Thrift is supposed to support ObjectiveC but I couldnt figure out how to do that. If anyone has any knowledge on the subject it is very much appriciated.
Apache Thrift has a generator for ObjC. (Complete list).
If you will distribute the application I would considered the alternative to create a server with simple interface (eg. http) that in turns access the cassandra database.
But if you are the only user it could work with direct database access.
If you're not sure about how to get Thrift to generate the bindings then go with what Schildmeijer posted. Use a simple web server running php + phpcassa or any language of your choice that comes with a high level client library -- list here: High level clients.
You can use some open source libraries to expose resources from Cassandra as JSON or XML then use NSURLRequests to do the work. If you go with XML then Google's GDataXML is an excellent choice of parser, if you go with JSON then json-library on Google Code is another great choice.
Have fun!

Using the RDP control to login to a Vista machine that requires Network Level Authentication

I'm trying to use the mstscax.dll (Microsoft Remote Desktop Control) to login to a Vista machine that requires Network Level Authentication.
I've played around with all the methods in IMsRdpClientNonScriptable4, IMsRdpClientAdvancedSettings4 and IMsRdpClient6. There are a slew of functions that appear that the might enable this.
EnableCredSspSupport
PromptForCredentials
PromptForCredsOnClient
NegotiateSecurityLayer
Unfortunately the MSDN documentation is pratacily useless and I can find no examples for any of these on the web. I know that it's possible because a product called "Royal TS" can connect this way.
One hint is that both "Royal TS" and Vista's Remote Desktop create a authoriztion prompt that looks like the one from CredUIPromptForWindowsCredentials, this makes me belive that i might be able to use a function like that to get the credential and then possibly use PublisherCertificateChain to tell RDP about it.
Any ideas would be helpful.
So if other people find this:
All that needs to be done is EnableCredSspSupport=true, the problem I had was that I was loading the mstscax.dll manually and the version I was using supported the IMsRdpClientNonScriptable4 interface but simply didn't work. If you just load the control normally just setting EnableCredSspSupport=true works fine.
This property maybe help you
RDPControl.AdvancedSettings8.EnableCredSspSupport = true;
In addition, It also depend on your OS support Network Level Authentication or not.
Reference (http://technet.microsoft.com/en-us/library/ff393716(v=ws.10).aspx)
I've never tried to do what you're doing but I suggest you take a look at the following article:
Multi Remote Desktop Client .NET
The projects uses mstscax.dll.

Up and download directly - no waiting

I would want to program something where you upload a file on the one side and the other person can download it the moment I start uploading. I knew such a service but can't remember the name. If you know the service I'd like to know the name if its not there anymore I'd like to program it as an opensource project.
And it is supposed to be a website
What you're describing sounds a lot like Bit Torrent.
You might be able to achieve this by uploading via a custom ISAPI filter (if you use IIS) -- all CGI implementations won't start to run your script until the request has completed, which makes sense, as you won't have been told all the values just yet, I'd suspect ISAPI may fall foul of this as well.
So, your next best bet is to write a custom HTTP server, that can handle the serving of files yet to finish uploading.
pipebytes.com I found it :)