LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Python is Cool for hacking or Ruby ? (https://www.linuxquestions.org/questions/programming-9/python-is-cool-for-hacking-or-ruby-4175546107/)

hack3rcon 06-22-2015 01:23 PM

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.

Habitual 06-22-2015 01:53 PM

Use full words and not phone-speak.
Try google.

Good luck.

dugan 06-22-2015 02:09 PM

Both are good.

sundialsvcs 06-22-2015 07:41 PM

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.

hack3rcon 06-23-2015 12:04 AM

Thus, Why many Hacking tools written by Python and not Ruby? If Ruby have good library !

dugan 06-23-2015 12:13 AM

Quote:

Originally Posted by hack3rcon (Post 5381426)
Thus, Why many Hacking tools written by Python and not Ruby? If Ruby have good library !

There really isn't a reason.

hack3rcon 06-23-2015 08:05 AM

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 !!

TobiSGD 06-23-2015 08:57 AM

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

hack3rcon 06-23-2015 02:13 PM

In your idea, any program that written in Python can be write in ruby too?

dugan 06-23-2015 02:14 PM

Quote:

Originally Posted by hack3rcon (Post 5381852)
In your idea, any program that written in Python can be write in ruby too?

Yes.

TobiSGD 06-23-2015 02:33 PM

Quote:

Originally Posted by hack3rcon (Post 5381852)
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.

Ranamon 06-23-2015 05:21 PM

Quote:

Originally Posted by hack3rcon (Post 5381212)
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.

rhubarbdog 06-23-2015 10:46 PM

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

dijetlo 06-23-2015 11:43 PM

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?

a4z 06-24-2015 01:00 AM

Quote:

Originally Posted by hack3rcon (Post 5381426)
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


All times are GMT -5. The time now is 03:01 AM.