Im trying to wrap my head around the use of python to begin learning.
What exactly does it do and what is it useful for ?
I dont really get the information thats out there regarding the usage so could someone please explain.
it's a really good programming language and it's easy for beginners. You can use Python for many purposes such as Automating boring things like a program that will change x value to y value and do it on thousands of thousands of .xsl sheets. You can create games with Python, applications etc. I anyone asks me to suggest a programming language to start with, i'll either go with Java or Python. Try to watch some videos of Python in action you will get answers.
(Mar 12, 2020 11:27 AM)TrkDZ Wrote: it's a really good programming language and it's easy for beginners. You can use Python for many purposes such as Automating boring things like a program that will change x value to y value and do it on thousands of thousands of .xsl sheets. You can create games with Python, applications etc. I anyone asks me to suggest a programming language to start with, i'll either go with Java or Python. Try to watch some videos of Python in action you will get answers.
Pretty much this.
Python is a higher level language so you are essentially abstracted from a lot of grittier details that you would find in something like C++
It is a multi purpose language but primarily it is used to automate tasks/scripting and it has become popular with machine learning as well.
What I use Python for is mainly for the functioning of a project I'm working on. Simply because it is very easy to learn as well as spot errors and see where you are going wrong.
Always PM/Convo me before attempting to communicate with me off-site.
Enjoy your day.
I usually use it to automate things like pricing updates for inventory at work, its a lot easier to update 40,000 product listings with just a simple script rather than manually doing it. Basically if your looking to work with large amounts of data or automation, pythons the way to go.
(Mar 12, 2020 10:53 AM)CrouchingTig3r Wrote: What exactly does it do and what is it useful for ?
Anything (technically).
Any good programming language are good at one thing: computation. That means basically anything a computer does.
The only problem would be speed. The higher the level of the language, the slower (usually).
Bottom line it can do anything. Game? yup. file browser? got it.
You get the idea.
I use python all the time, I love it and its been the most useful skill ive had as a sys admin and now a hackin mans.
Automating things is mentioned a lot but a good example is using python for making an application that communicated through REST API's. I've automated FreeNAS Dataset creation for new domain users using rest API's called through python. Ive also done this with LDAP (Active Directory for linux basically), free-ipa has its own python modules so you can manage it through python instead of the GUI
It has a lot of great modules, the "requests" module is a very useful one I use for Rest API's. Also lets say your brute forcing a webpage login. you determine everytime you try and login in posts the server with data for example like this "user":"admin", "password":"noodlecocks".
With python requests library its essentially: requests.post(url,data= "user":"admin", "password":"noodlecocks")
Throw that in a for loop that loops through a text file of passwords and ur doin a dictionary attack.
Another weird use for python is spawning a shell once youve exploited a system. If you have basic access to a shell you can "spawn" a real shell from the commandline (linux) using: #python3 -c "import pty;pty.spawn('/bin/bash')"
and that will spawn a proper tty shell
TL;DR python can do whatever you need it to do, easily. Its not as effecient as C/C++ etc but it gets the job done. Find something you wanna do and python will have modules for it. example: I just made a DOS program with 20 lines of python that can kick my roomates off the internet when they are hogging the download
Anything that is automation, scripting, network, server, machine learning etc... related.
You can basically develop anything you want with less code and more efficient.
It's a scripting language that it used a lot for data analysis. (what I am current using it for). Pretty easy to use compared to something like C which is a native language. If you want to learn a language, go for python, really beginner friendly and teaches you very useful coding practices.
-
Python is light weight that could be the main reason for its usage
|