.

Which script language do you prefer?

<<

caissyd

User avatar

Hero Member
Hero Member

Posts: 894

Joined: Thu Dec 31, 2009 11:20 am

Location: Ottawa, Canada

Post Wed Feb 24, 2010 7:59 am

Which script language do you prefer?

Hi,

I was wondering what script language you guys prefer to use to automate repetitive or boring tasks.

We can use shell scripts, perl, python, ruby and many others.

I personally know how to write shell scripts and I am currently learning ruby since it is used in Metasploit.

So, what you guys usually use? Do you use more than one?
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
(aka H1t.M0nk3y)
<<

zeroflaw

User avatar

Full Member
Full Member

Posts: 208

Joined: Fri Feb 12, 2010 10:41 am

Location: Holland, Den Helder

Post Wed Feb 24, 2010 8:07 am

Re: Which script language do you prefer?

I've been using Perl for a while on Linux, sometimes prefer Bash. And I'm pretty much a Ruby guy when it comes to Windows. I usually prefer to write C\C++ programs unless the task is easier/faster to do in a scripting language.

Hmm, I need to learn Python sometime :)

ZF
Last edited by zeroflaw on Wed Feb 24, 2010 8:10 am, edited 1 time in total.
ZF
<<

hayabusa

User avatar

Hero Member
Hero Member

Posts: 1662

Joined: Mon Jan 29, 2007 2:59 pm

Post Wed Feb 24, 2010 8:12 am

Re: Which script language do you prefer?

Ruby and Python are my tools of choice.  Mainly because I'm comfortable with both, and both are heavily used in many of the newer tools from the security community, so it helps to understand their logic and workings, when I want to integrate my own code with theirs.
~ hayabusa ~ 

"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'


OSCE, OSCP , GPEN, C|EH
<<

caissyd

User avatar

Hero Member
Hero Member

Posts: 894

Joined: Thu Dec 31, 2009 11:20 am

Location: Ottawa, Canada

Post Wed Feb 24, 2010 8:15 am

Re: Which script language do you prefer?

Hayabusa,

Since you know both scripting languages, when would you choose python over ruby or vice-versa? I don't know much about both of them to understand the pros/cons of each.

I am definitively a Java guy, but it is often overkill for small tasks.
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
(aka H1t.M0nk3y)
<<

blackazarro

User avatar

Sr. Member
Sr. Member

Posts: 368

Joined: Sun Aug 13, 2006 5:31 pm

Post Wed Feb 24, 2010 11:00 am

Re: Which script language do you prefer?

I use Python for all my automated Windows tasks. I especially love the wmi module for connecting to remote hosts and querying for specific data. Thanks Tim Golden for his hard work on creating this library.

http://timgolden.me.uk/python/wmi/index.html

And also, I'll like to add that the Python communities are great and there's a lot of people that are willing to help if you get stuck with a piece of Python code.
Security+, OSCP, CEH
<<

hayabusa

User avatar

Hero Member
Hero Member

Posts: 1662

Joined: Mon Jan 29, 2007 2:59 pm

Post Wed Feb 24, 2010 11:26 am

Re: Which script language do you prefer?

H1t M0nk3y wrote:Hayabusa,

Since you know both scripting languages, when would you choose python over ruby or vice-versa? I don't know much about both of them to understand the pros/cons of each.

I am definitively a Java guy, but it is often overkill for small tasks.


While I work in both, I'm no self-proclaimed 'expert' in either.  Ultimately, Python tends to be my down-n-dirty language, if I need something fast, as I've got more time and experience with it, and can often even find someone else's code and modify / 'hack-it-up' it quickly, if needed.  But that alone is not a differentiator.  If I have more time, I might choose Ruby over Python, for some projects, too.

Honestly, for me, it's just a matter of preference, and which tool I feel I can work with, quickly and efficiently, for the task at hand.  I can't really give you a solid 'This is why I chose this one, today, versus that one', aside of the fact, like I'd said, that it sometimes depends on the tool I'm going to use my code WITH, if any at all (Metasploit, Core, CANVAS, etc...)

As nebu10z mentioned, the community for Python is VERY helpful, if you're starting out, and I tend to find them easier to discuss things with than the folks backing Ruby (in my opinion and from my experiences, not speaking for everyone.)  For me, before I knew either, I found Python to be easier to work into, as if you're already familiar with programming languages like Perl, etc, it's kind of 'more of the same.'  Ruby's 'object-oriented' approach is slightly different  from Python's (although once I got comfortable with it, I find it more 'elegant' and have found my 'objects' / chunks of code more portable and easier to move around, in Ruby, for different things,) and there are both similarities and differences between them.

For general differences and comparisons, check out:

http://www.wikivs.com/wiki/Python_vs_Ruby

What I can tell you is that Ruby seems to be the wave, as far as commercial security tools go, these days.  Rails' capabilities, added to it for ease of porting to the web, really are making it a nice language to work with.  I'm only in the beginning stages with Rails, and have a LONG way to go, but so far, I like it a lot, too.

Hope my objective opinion helps, but obviously be sure to get others, as some folks have differing opinions, tastes, preferences and needs.  That's the nice thing about 'community,' as you don't have to choose one or the other, without first getting many folks' sides of the equation, and make a judgement based on what YOU feel comfortable with, in the end.  Additionally, try things out, and see what style you like the best.  I do think, however, that if you're currently working to learn Ruby, then you're investing your time well.

PS - as zeroflaw also pointed out, C/C++ comes in very handy.  But I find that for quick needs, if one of the scripting languages suffices, I use them, before C/C++
~ hayabusa ~ 

"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'


OSCE, OSCP , GPEN, C|EH
<<

Ketchup

User avatar

Hero Member
Hero Member

Posts: 1021

Joined: Fri Jul 04, 2008 7:44 pm

Location: Philadelphia, PA

Post Wed Feb 24, 2010 4:31 pm

Re: Which script language do you prefer?

I usually turn to plain shell scripting in both Linux and Windows for most of my scripting needs.  Sometimes I will use perl on Linux or VBS in Windows.  Those are my choices primarily because I don't need to install anything to get my scripts to work, making them very portable.  For anything more involved, or when I need OOP, I usually go to C++ or even VB.net. 
~~~~~~~~~~~~~~
Ketchup
<<

caissyd

User avatar

Hero Member
Hero Member

Posts: 894

Joined: Thu Dec 31, 2009 11:20 am

Location: Ottawa, Canada

Post Wed Feb 24, 2010 8:58 pm

Re: Which script language do you prefer?

It's very interesting that almost everyone has is preferences.

To me, the bottom line is that it doesn't really matter. You pick the language of the tool you use or the one you prefer.

Thanks guys
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
(aka H1t.M0nk3y)
<<

partek

Newbie
Newbie

Posts: 27

Joined: Thu Feb 28, 2008 6:15 pm

Post Wed Feb 24, 2010 9:15 pm

Re: Which script language do you prefer?

I typically default to Perl when I need to do something that I can't do in a simple shell script.

I've been been wanting to get a little more into Python and Ruby, but I'm usually in a situation where time is of the essence, so throwing in a new programming language isn't an option.

I did do a project in Ruby recently and really enjoyed the syntax even though it felt very awkward at first after working with perl for so many years. I can totally understand why ruby on rails has caught on in the web development arena.
CISSP, CISM, CISA, CCNA Security, OSCP, CEH

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software