We often use a Python script to log on to the remote Linux system through the Paramiko to perform some script operations, but if the remote host a lot, here we should be able to determine whether the local and remote network is a pass, through a way to determine whether the network is a pass.1 #!/user/bin/python2 Importsubprocess3 defPing (IP):4cmd ='ping-n 1%s'%IP5outfile ='ping.tmp'6ret = Subprocess.call (cmd,shell=ture,stdout = open (outfile,'A +'), stderr =subprocess. STOUT)7 ifRET = =0:
Java uses Redis connection poolingJar Package for Jedis-2.9.0.jar+commons-pool2-2.4.2.jar1 Packagecom.test;2 3 ImportRedis.clients.jedis.Jedis;4 ImportRedis.clients.jedis.JedisPool;5 ImportRedis.clients.jedis.JedisPoolConfig;6 7 Public classRedisutil {8 //Redis Server IP9 Private StaticString ADDR = "192.168.0.41";Ten One //the port number of the Redis A Private Static intPORT = 6379; - - //Access Password the Priv
address for your own
/root/coturn/bin/turnserver–syslog-a-L 192.168.22.170-x 192.168.22.170-e 192.168.22.170-f–min-port=32355–max-port =65535–user=helloword:helloword-r Helloword–cert=turn_server_cert.pem–pkey=turn_server_pkey.pem–log-file=stdout -V
x external network ip,l and e are intranet IP9.android end needs to be modified
Download code:
Https://github.com/njovy/AppRTCDemo
To modify the code:
Android only needs to change this file
The wreath i
, navigate to Nodejs_expressCopy CodeThe code is as follows:E:\myapp\nodejs_express4 Project Initialize NPM init, after the configuration is completed, a file is generated under the folder:Package.json5 Installing EXPRESS:NPM Install Express, after successful installation, a node_modules directory will be generated under the folder6 Express Project Initialization Express (express Hello)7 Installing the Dependency package NPM install Serve-favicon Morgan cookie-parser body-parser path;>npm Instal
html/
4. Cancel nobody for/bin/sh execution rightschmod 776/bin/sh5. Verify that the permissions for the site directory for nobody are readable and executable, and the permissions on the Web site files are 6 readable. Add nobody Write permission 7 for directories that are uploaded or written to the write file. Configure nginx.conf to upload directory without PHP execution permission 8. Configure Nginx.conf to disable access to folders, such as the background, or restrict access to
The first part, shared notebook wireless networkPrerequisites:1) One Laptop (Dual network card (wired + wireless)2) There are 2 net cards in the network adapter:
Wired connection, name Ethernet (must be plugged into a wired network and can be connected to the Internet)
Wireless connection, name Wi-Fi (must be not connected)
1. Open command line Console (Admin), shortcut:win+x+a2, displaying the host networkNetsh wlan show hostednetwork3. Set the wireless passwordNetsh wlan set
xinetd (Telnet-server operation needs to be managed by XINETD): Apt-get Install xinetd(3) Configure Telnet file: vi/etc/xinetd.d/telnet(4) Open Xinetd:service xinetd startThird, using Python to implement Telnet telnetThe Telnetlib library is specifically provided in Python to complete the communication function based on the Telnet protocol.The code to implement remote login using Telnetlib is as follows:1 #-*-Coding:utf-8-*-23 Import Telnetlib45 "Telnet telnet: Windows client connects to Linux
extranet to access, double-click it;3) At this point, you can see four protocols, generally enable the first three, disable the last one, that is, enable "Shared memory", "Named Pipes" and "TCP/IP", disable "VIA";4) after enabling "TCP/IP", by the way the right mouse button the protocol properties, set the open port, in IP1-IP9 can be set to 1433, "active" and "Enabled" are selected "Yes", the last Ipall can also be set to 1433;ok, the configuration
extranet to access, double-click it;3) At this point, you can see four protocols, generally enable the first three, disable the last one, that is, enable "Shared memory", "Named Pipes" and "TCP/IP", disable "VIA";4) When "TCP/IP" is enabled, by the way the right mouse button for the protocol properties, set the open port, in IP1-IP9 can be set to 1433, "active" and "Enabled" are selected "Yes", the last Ipall can also be set to 1433;ok, You must rest
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.