Packet injection is an established network connection through the construction of any protocol (TCP ...). Udp... And then using the original socket to send the way to hinder the process, this method is widely used in network penetration testing,
This script implements the following functions:
1: Automatically get the latest available agent information from a proxy website: IP address, port, protocol type (web site for every minute call this book made a limit)
2: Automatically fill in the
To get time related information, to use the Python timer module, there are many very useful features in the Python time module, you can go to the official document to understand the current time, to get the time stamp of the current time, the
Python's exception handling capability is powerful and can provide accurate feedback to users about error messages. In Python, an exception is also an object that can be manipulated. All exceptions are members of the base class exception, all
If you need to know how to match Chinese characters in Python, we must first look at the following table
UTF8[x01-x7f]| [XC0-XDF] [x80-xbf]| [Xe0-xef] [X80-XBF] {2}| [Xf0-xff] [X80-XBF] {3}UTF16[X00-xd7] [xe0-xff]| [XD8-XDF] [X00-xff]
Current timestamp: Time.time ()Current date: Time.ctime ()
Get current time:
Ymdhms = Time.strftime ('%y-%m-%d%h:%m:%s ', Time.localtime (Time.time ()))Timearray = Time.strptime (ymdhms, "%y-%m-%d%h:%m:%s")
Current Time Date stamp
I. Installation of python2.7
1, downloadAvailable for download from http://www.python.org/
The code is as follows
Copy Code
#wget http://www.python.org/ftp/python/
2, decompression
The code is as
Suppose there is a dictionary in Python as follows:
X={' a ': ' 1,2,3 ', ' B ': ' 2,3,4 '}
Needs to be merged into:
x={' C ': ' 1,2,3,4 '}
Three things to do:
1. Convert a string to a list of values2. Merge two lists and add new key values3.
An introduction to ordered dictionary-ordereddict
Example
An ordered dictionary is similar to a common dictionary, except that it can record the order in which elements are inserted, and the general dictionary is iterated in any order. See the
1. Local Variables
For I in range (5):
print I,
print I,
Run Result:
0 1 2 3 4 4
I is the local variable inside the for statement. But inside Python, in the same method body, a local variable is defined, and the scope of the
Official website: www.python.org
Python is an interpreted, interactive, object-oriented programming language. It is often compared to TCL, Perl, Scheme or Java.
Python combines remarkable power with very clear syntax. It has modules, classes,
Python calls the local PowerShell method
1, now prepare a simple PowerShell script, the function is to test an IP list which can ping pass:
Copy Code code as follows:
function test_ping ($iplist)
{
foreach ($myip in $iplist)
{
For those crawler operations that need to be performed in a login environment, simulating login or cloaking is a just-needed condition.
Analysis of the online example of analog login, many are based on user name/password to launch a POST request,
There is a requirement that the JSON format data be displayed in the standard output of Python, and if the indentation display looks good on the data, there are many things to do with the JSON package
Import JSON
date = {u ' versions ':
One, open a Web page to get all the content
From urllib import UrlopenDoc = urlopen("http://www.baidu.com"). Read()Print Doc
Second, get HTTP headers
From urllib import UrlopenDoc = urlopen("http://www.baidu.com")Print doc. Info(
Function: To provide a connection algorithm for watching games repeatedly
Description: The module contains a point class, which is the basic unit "dot" of the game, which contains attributes: X,y,value.
Where x,y represents the coordinates of the
In recent days, when the acquisition of a page most of the Web page OK, a small number of pages garbled problems, debugging a few days, and finally found that there are some illegal characters caused. Hereby record
1. Under normal circumstances.
1. Experiment introductionSomeone must be curious about the principle behind email authentication through links. In fact, its principle is very simple.This course uses the API provided by SendCloud to implement a local mailbox authentication process.
This code is purely used to test the practice. If you don't have to talk about it, go directly to the code: The code is as follows:Copy code #! /Usr/bin/python# Coding = UTF-8# Author by 361way.comImport timeImport urllib3Import reImport
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