The second day of cainiao Python Study Notes: about Python hackers ., Python Study Notes
Thursday, January 5, 2016 weather: Good
I have never known why I want to learn Python. In fact, all Java that can be achieved by Python can be achieved. Some Python also have some Java, and Java is a required course, but I just don't want to learn Java, later I came to the "python programming path for Linux hackers" and found something I was interested in. Every IT man had a hacker dream, and I was no exception, so continue to start Python writing.
Because you have to prepare for the High-number examination, you cannot study many things carefully.
I remember a few words deeply:
The debugger is the hacker's eye. At the beginning, I didn't know what a debugger is: But it's not hard to see its role from the eyes. The eyes are used to observe the world, and hackers are used to observe the Code. That is to say, a hacker can use a debugger to observe the running of a program. After having his own ideas, he will go to Baidu again.
Forgive me for being a little white. I can't understand too many profound things. I understand that it is used to debug the program. A friend who has learned C may know that the debugging program provided by VC will read the program one by one and stop when an error occurs. This reminds me of the pass Command in Python. When your program fails, but you do not know how to change it, and you want to know whether the subsequent program is correct, you can add a pass to skip and then run the subsequent program.
The capability of dynamic analysis determines your technical level.
This is definitely a classic story. If you can only perform simple data analysis on one program, good LOW, if you have powerful analysis capabilities, you will find that all problems are difficult. Maintaining the power of your brain will make your technology more and more powerful. When I learned the C language, I found that when I analyzed the Blue Bridge cup questions, there were a lot of problems, especially the dynamic analysis questions. They were completely blind and did not understand anything. For the first time, I felt that my analysis capability was poor. Hackers rely not only on computers, but also on their brains to analyze problems.
The above may be irrelevant to hackers, so let's take a look at the Code:
Import subprocess
Cmd = "cmd.exe"
Begin in = 101
End = 200
While begin <end:
P = subprocess. Popen (cmd, shell = True, stdout = subprocess. PIPE,
Stdin = subprocess. PIPE,
Stderr = subprocess. PIPE)
P. stdin. write ("ping 192.168.1." + str (begin) + "\ n ")
P. stdin. close ()
P. wait ()
Print "execution result: % s" % p. stdout. read ()
There is a kind of thing called the doscommand, there is a command called ping, as a small white, the minimum doscommand is to understand, this program is always ping, find out the user ip address under the LAN.
You don't need to understand that much. Just look at it. I will learn it later.
As a little white guy, I think the necessary basic learning is necessary. If I want to go to the sky in one step, I advise you not to learn IT. IT is not suitable.
------------ The learning Diary of Xiao Bai. The road is far away and you need to cheer yourself up.