Rookie Python study notes the next day: about Python hackers.

Source: Internet
Author: User

Thursday, January 5, 2016 weather: Okay

Always do not know why they want to learn python, in fact, Python can do Java can do, Python has a bit of Java also have, and Java is a compulsory course, but is not willing to learn Java, and later saw the "Linux hacker's Python Programming Way" Then found some of their own interests, every it man has a hacker dream, I am no exception, so continue to start Python writing.

Because to prepare a high number of exams, all with a lot of things can not be studied carefully.

I remember a few words deeply:

The first sentence: The debugger is the hacker's eyes. At first I don't know what a debugger is: But it's not hard to see his role in the eyes, the eyes are used to observe the world, and the hacker is to observe the code. In other words, the hacker can go through the debugger to observe the operation of the program, have their own ideas and then go to Baidu after his concept.

Forgive me is small white, too many advanced things can not understand, I understand that is used to debug the program. The small partners who have studied C may know that the VC comes with a debug program, will read the program one by one, and then will stop when encountering an error, which makes me think of the pass command in Python. When your program is wrong and you do not know how to change and want to know the next program is not right when you can add a pass, you can skip, and then run the following program.

The second sentence: The ability of dynamic analysis determines your skill level.

This is definitely a classic word, if you can only do a simple data analysis of a program, good low, if you have strong enough analytical ability, you will find that all the problems are not difficult. Keeping your brain alive will make your skills more and more powerful. In the study of C language when the analysis of those Blue Bridge cup problems will be more to a lot of questions, especially the dynamic analysis of the topic, is completely blurred two eyes, what do not understand. For the first time, I feel that my analytical skills are poor. Hackers are not just relying on computers, I think their brains in life are absolutely powerful in analyzing problems.

Maybe the above words really have nothing to do with hackers, so take a look at a piece of code:

Import subprocess

Cmd= "cmd.exe"
Begin=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 DOS command, there is a command called Ping, as a small white, the minimum DOS command is to understand that this program is always ping, to find out the user IP under the LAN.

Don't need to know so much, look good. I'll learn from you later.

As a small white, I think the necessary basic learning is required, if everything is thinking of skyrocketing rise, persuade a sentence do not learn, not suitable for it.

------------Small white Study diary, mutual encouragement. The road is far away, oneself refuels.

Rookie Python study notes the next day: about Python hackers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.