Author Topic: Python is good for hacking or Ruby?  (Read 2909 times)

0 Members and 2 Guests are viewing this topic.

Offline hack3rcon

  • Peasant
  • *
  • Posts: 80
  • Cookies: -216
    • View Profile
Python is good for hacking or Ruby?
« on: July 11, 2015, 09:23:35 pm »
Hello.
Python is good for write hacking tools or Ruby? I see many programs written in Python and why not ruby? Is it because Python library and tools are more than Ruby or...?


Thank you.

Offline reqq456

  • /dev/null
  • *
  • Posts: 8
  • Cookies: -2
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #1 on: July 11, 2015, 10:30:53 pm »
I think its mostly because many "newbies" start to code with python, because it seems like an easy to learn programming language.
Personally I've never wrote one line of code in python.

But I see many beginner who are starting with it, I think that's why so much tools are written in it.

Offline HardCodedShadow

  • /dev/null
  • *
  • Posts: 18
  • Cookies: 0
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #2 on: July 11, 2015, 10:56:08 pm »
I'd recommend going for Python:
1) It has a bigger standard library
2) It's faster
3) It has a much bigger community (good for beginners)

Other than that they're pretty similar languages.

Also, some useful links:
https://www.blackhat.com/presentations/bh-usa-09/TRACY/BHUSA09-Tracy-RubyPentesters-PAPER.pdf
https://evilzone.org/ebooks/black-hat-python-python-programming-for-hackers-%28dec-2014%29/
https://evilzone.org/ebooks/violent-python-a-cookbook-for-hackers/
You may have seen me once, but you'll never forget who I am, even though I'm nobody.

Offline hack3rcon

  • Peasant
  • *
  • Posts: 80
  • Cookies: -216
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #3 on: July 12, 2015, 07:10:33 am »
They both have benefits but Python is better.


Can you tell me why?

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #4 on: July 12, 2015, 08:49:46 am »
Python over Ruby:
- easier to read
- bigger std lib
- more community libs
- used more ubiquitously
- installed by default on most unix-like systems
- more literature available that converges Python and hacking concepts specifically(i.e. grey hat python, black hat python, violent python)

Now I feel like we're beating a dead horse..

Offline hack3rcon

  • Peasant
  • *
  • Posts: 80
  • Cookies: -216
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #5 on: July 12, 2015, 10:19:39 am »
Python over Ruby:
- easier to read
- bigger std lib
- more community libs
- used more ubiquitously
- installed by default on most unix-like systems
- more literature available that converges Python and hacking concepts specifically(i.e. grey hat python, black hat python, violent python)

Now I feel like we're beating a dead horse..


You right but I guess special features exist in Ruby. For example, Metaprogramming.
Why Metasploit choose ruby?

Offline Phage

  • VIP
  • Overlord
  • *
  • Posts: 1280
  • Cookies: 120
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #6 on: July 12, 2015, 10:48:53 am »
Jesus guys...

The difference between Python and Ruby are not even remotely important for a beginner. Both languages has their charm and qualities, but overall they're both doing the same job. They're both scripting languages widely used across all systems.

@OP: Take a look at both and choose the one you enjoy the most. These two languages are so similar in their use, that it's not really worth getting into.
"Ruby devs do, in fact, get all the girls. No girl wants a python, but EVERY girl wants rubies" - connection

"It always takes longer than you expect, even when you take into account Hofstadter’s Law."

Offline hack3rcon

  • Peasant
  • *
  • Posts: 80
  • Cookies: -216
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #7 on: July 12, 2015, 02:05:23 pm »
a Program that written is Python can be written in Ruby? or vice verse?

Offline Phage

  • VIP
  • Overlord
  • *
  • Posts: 1280
  • Cookies: 120
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #8 on: July 12, 2015, 05:33:26 pm »

Generally Python is a lot faster than ruby in terms of executing. Python also has a lot more libraries not just for pentesting/ hacking but also for general use.
Ruby on the other hand (If I remember correctly) can be excuted locally but is generally used on web apps. It is lower level than Python but has less support and is more dated than Python.

Wrong on so many levels.

Both Python and Ruby are interpreted languages, they're running on the exact same level. Both Ruby and Python are used for creating websites (Python got Django and Flask and Ruby got Rails and Sinatra).

Also, Python was created in 1991 and Ruby in 1995, so Python is actually older than Ruby.

Stating Python is a lot faster? Take a look at this. https://benchmarksgame.alioth.debian.org/u64q/ruby.html

Now, Python has a bit more traction towards the scientific field (due to history and the Ruby community being more focussed on the web, since that's what really gave it traction).

Now, please, stop posting until you actually know what you're talking about.

"Ruby devs do, in fact, get all the girls. No girl wants a python, but EVERY girl wants rubies" - connection

"It always takes longer than you expect, even when you take into account Hofstadter’s Law."

Offline novaccainne

  • Serf
  • *
  • Posts: 29
  • Cookies: 2
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #9 on: September 28, 2015, 08:02:20 pm »
Python is more faster than ruby and there are more libraries available. And there is a good book ( Black Hat Python ) which shows the real side of python, and I think it is advisable to start with this book first, do it perfectly and then move ahead :)

Offline Melatonin

  • /dev/null
  • *
  • Posts: 18
  • Cookies: 2
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #10 on: September 28, 2015, 09:29:02 pm »
Python is more faster than ruby and there are more libraries available. And there is a good book ( Black Hat Python ) which shows the real side of python, and I think it is advisable to start with this book first, do it perfectly and then move ahead :)

Black Hat Python is a good book for beginners, but I feel that it is not a light read for a total beginner.

Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers is a much lighter read.

Hacking Secret Ciphers with Python: A beginner's guide to cryptography and computer programming with Python is a great introduction to Python as well.

Offline kenjoe41

  • Symphorophiliac Programmer
  • Administrator
  • Baron
  • *
  • Posts: 990
  • Cookies: 224
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #11 on: September 29, 2015, 02:33:28 am »
Python is more faster than ruby and there are more libraries available. And there is a good book ( Black Hat Python ) which shows the real side of python, and I think it is advisable to start with this book first, do it perfectly and then move ahead :)
Black Hat Python is a good book for beginners, but I feel that it is not a light read for a total beginner.

Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers is a much lighter read.

Hacking Secret Ciphers with Python: A beginner's guide to cryptography and computer programming with Python is a great introduction to Python as well.
I am really restraining alot from shouting and throwing shoes at all you guys for your stupidity and mere wanting to post shit without knowing a squid about them. Sorry, i really needed to let that out.

None of all the books you have mentioned about would be recommended for beginners. They are under no circumstances made for people to learn python, they actually assume abit of python knowledge. If you had read them and actually read the foreword and all that beginning stuff, you would know this. they have some serious advanced python code in some parts of them that most of the new users will be astounded.

Those focus on hacking, do we all learn to program so that we have stuff?? Pfffh, i am disappointed. If cookies meant anything to you guys i would mass eat them but meh, why waste the effort.
If you can't explain it to a 6 year old, you don't understand it yourself.
http://upload.alpha.evilzone.org/index.php?page=img&img=GwkGGneGR7Pl222zVGmNTjerkhkYNGtBuiYXkpyNv4ScOAWQu0-Y8[<NgGw/hsq]>EvbQrOrousk[/img]

Offline th3g00n

  • Serf
  • *
  • Posts: 30
  • Cookies: 5
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #12 on: September 29, 2015, 08:01:08 am »
'Hacking Secret Ciphers with Python' is pretty much a beginner book and a good one for someone interested in hacking. It might be difficult for someone new to programming but nothing is ever easy the first time around. Learning to program is a difficult challenge. It that scares you, give up. If you'd rather embrace the challenge, read the book.

BOOK LINK: https://inventwithpython.com/hackingciphers.zip
« Last Edit: September 29, 2015, 08:02:15 am by th3g00n »

Offline Trevor

  • Serf
  • *
  • Posts: 39
  • Cookies: 18
  • Coder, Reverser
    • View Profile
Re: Python is good for hacking or Ruby?
« Reply #13 on: September 29, 2015, 10:44:14 am »
At the moment, Python has a greater use than Ruby in the Hacking & RCE community.
Pretty much every software/tool has a python sdk.

Learning Ruby can be useful for web development with Ruby on Rails.

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: Python is good for hacking or Ruby?
« Reply #14 on: September 29, 2015, 02:49:55 pm »
I am really restraining alot from shouting and throwing shoes at all you guys for your stupidity and mere wanting to post shit without knowing a squid about them. Sorry, i really needed to let that out.

None of all the books you have mentioned about would be recommended for beginners. They are under no circumstances made for people to learn python, they actually assume abit of python knowledge. If you had read them and actually read the foreword and all that beginning stuff, you would know this. they have some serious advanced python code in some parts of them that most of the new users will be astounded.

Those focus on hacking, do we all learn to program so that we have stuff?? Pfffh, i am disappointed. If cookies meant anything to you guys i would mass eat them but meh, why waste the effort.

This, maybe in kinder words or something.

/
>>>import this
-----------------------------