LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-22-2015, 01:23 PM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post Python is Cool for hacking or Ruby ?


Hello.
Please let me know your idea about Python and Ruby for hackers. Which one is good for writing tools?
Python seems have more library but how about Ruby? Metasploit Written in Ruby.


Tnx.
 
Old 06-22-2015, 01:53 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Use full words and not phone-speak.
Try google.

Good luck.
 
Old 06-22-2015, 02:09 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Both are good.
 
Old 06-22-2015, 07:41 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Both of these are excellent tools that have been used to write many tools. You are certainly correct that "the library" is the most-important part of any language, but both of these languages have excellent ones.
 
Old 06-23-2015, 12:04 AM   #5
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Thus, Why many Hacking tools written by Python and not Ruby? If Ruby have good library !
 
Old 06-23-2015, 12:13 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by hack3rcon View Post
Thus, Why many Hacking tools written by Python and not Ruby? If Ruby have good library !
There really isn't a reason.
 
Old 06-23-2015, 08:05 AM   #7
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Can you tell me why? Do you sense Python syntax is easier than Ruby?
Both languages are Slow but I guess Ruby is faster than Python !!
 
Old 06-23-2015, 08:57 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Python in general is more popular than Ruby, which is mostly used for web development, simple as that. A hacker (and FWIW, any programmer) will choose what is available and sufficient for the job at hand, but first and foremost, what he is proficient with. If someone knows Python already than Ruby is not the better language, and the other way around.
Regarding execution speed, you will find that for some tasks Ruby is faster, while for others Python is faster: http://benchmarksgame.alioth.debian.org/u64q/ruby.php
 
Old 06-23-2015, 02:13 PM   #9
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
In your idea, any program that written in Python can be write in ruby too?
 
Old 06-23-2015, 02:14 PM   #10
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by hack3rcon View Post
In your idea, any program that written in Python can be write in ruby too?
Yes.
 
Old 06-23-2015, 02:33 PM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by hack3rcon View Post
In your idea, any program that written in Python can be write in ruby too?
Both languages are Turing complete, so yes, any program that can be written in one of them can be written in the other, too, and in any other Turing complete language.
 
Old 06-23-2015, 05:21 PM   #12
Ranamon
Member
 
Registered: Feb 2013
Location: Land of Hopenchange
Distribution: Slackware
Posts: 45

Rep: Reputation: Disabled
Quote:
Originally Posted by hack3rcon View Post
Hello.
Please let me know your idea about Python and Ruby for hackers. Which one is good for writing tools?
Python seems have more library but how about Ruby? Metasploit Written in Ruby.


Tnx.
Ruby looks good, but it's very slow. Doing a simple graphical program with the Ruby bindings for the FOX toolkit was so slow that when it started, you'd see a blank rectangle drawn on the screen. Then it would fill with the various widgets. Clicking on a button would take a second or so before the click animation, then wait some more for it to actually do anything.

Rewriting the app in Python produced an app that behaved normally: the whole screen appeared at once, and button clicks responded as you'd expect. That was the last I had to do with Ruby. so far as scripting languages go, I'm sticking with Python.
 
Old 06-23-2015, 10:46 PM   #13
rhubarbdog
Member
 
Registered: Apr 2015
Location: Yorkshire, England
Distribution: Linux Mint
Posts: 145

Rep: Reputation: Disabled
Python is Cool for hacking or Ruby ?

it depends on what sense you mean hacking. if your using it a slang for coding or reverse engineering. when choosing any language it always s trade off between running speed, readability and development time
 
Old 06-23-2015, 11:43 PM   #14
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Python, with an extensive set of modules, is installed and running on every Unix/Linux OS deployed since the mid 2000s
Ruby doesn't work unless you've installed the base set and any gems you might want to use (and even then, a lot of the functionality people associate with it is actually an add-on toolkit you'd have to install on a target machine in order to leverage it.
If your strategy is to trick people into installing ruby so you can hack them, go for it, but whatever you do don't use python (cause it might actually work and then you'd be hunted by the law).

To the Group:
Is there some reason we're running script kiddie classes now?
Did I miss the memo?
It's not like this guy is an actual threat, he lacks basic skills (the use of the word "metasploit" is proof of that) , but why are we encouraging him? Are we looking for another round of " I know lots and lots of programming languages, someone please teach me to hack!!!!" posts?

Last edited by dijetlo; 06-23-2015 at 11:55 PM.
 
Old 06-24-2015, 01:00 AM   #15
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by hack3rcon View Post
Thus, Why many Hacking tools written by Python and not Ruby? If Ruby have good library !
some time ago some people at google where enthusiastic about Python, so it hyped
and so the Ruby creator did not work for google, while the Python creator did.
the Ruby creator is from Japan, a lot of discussion about Ruby is not just not in English but not even in latin alphabet
Python philosophie is there is one way to solve a problem, and that's why it is used by many people that are not programmers but need some code do calculate/do something, why ruby is more rich on how to solve problems
the result is this: http://grokcode.com/746/dear-python-...e-you-so-ugly/
but also some highly specialised libraries (math)
if you want to create a DSL, you take ruby and not python
both make fun, which one you like more is personal preference,
bot are old and therefore mature, and have therefore some problems
python is reference counted, ruby has a garbage collector
there are many other scripting languages that make also fun
I am sure I have forgotten something
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python or Ruby? jokar.mohsen Programming 10 10-06-2012 04:13 PM
Perl vs. Ruby vs. Python vargadanis Programming 53 12-31-2010 12:37 PM
Python, C++ or Ruby Garry | K | E Programming 51 11-19-2009 03:51 PM
Perl or Ruby or Python? Or something else? MasterOfTheWind Programming 18 05-07-2009 12:43 PM
LXer: Wicked Cool Ruby Scripts LXer Syndicated Linux News 0 02-07-2009 06:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration