Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Python implementation restart the router     - Single-node Hadoop environment to build (Server)

- linux firewall configuration (Linux)

- Mac OS X 10.9 compiler OCI8 module (Programming)

- Python console achieve progress bar (Programming)

- Linux top command to get started (Linux)

- Hunk / Hadoop: Performance Best Practices (Server)

- To install the mail client terminal Evolution 3.13.2 under Ubuntu 14.04 (Linux)

- Android Unzip the ZIP / GZIP data (based on the InflaterInputStream implementation) (Programming)

- ELKstack log analysis platform (Server)

- RabbitMQ installation, configuration, monitoring (Linux)

- iOS in the event delivery and the responder chain (Programming)

- How to use the beta / unstable version of the software in Debian library (Linux)

- Linux (SUSE) mount NTFS mobile hard practice (Linux)

- To install HDRMerge 0.4.3 under ubuntu (Linux)

- Debian 7.6 install Nvidia graphics driver (Linux)

- grep command Detailed and relevant examples (Linux)

- extundelete: the Linux-based open source data recovery tools (Linux)

- Linux keyboard recording script (Linux)

- C # Future: Method Contract (Programming)

- Four levels to deal with Linux server attacks (Linux)

 
         
  Python implementation restart the router
     
  Add Date : 2018-11-21      
         
         
         
  There are some services that require dynamic IP, so we use the restart router methods. Manual restart is not available, you can use regular script execution. Paste the code of each router, suggesting different. Router telnet functionality required job.

#! / Usr / bin / env python
# - * - Coding: utf-8 - * -
import telnetlib
HOST = "192.168.1.1"
USER = "admin"
PASS = "admin"
  
router = telnetlib.Telnet (HOST)
router.set_debuglevel (2)
router.read_until ( "Username:", 12)
router.write (USER + "\ r \ n")
router.read_until ( "Password:", 12)
router.write (PASS + "\ r \ n")
router.read_until ( "TP-LINK>", 12)
router.write ( "enable \ r \ n")
router.read_until ( "Enter password:", 12)
router.write (PASS + "\ r \ n")
router.read_until ( "TP-LINK #", 12)
router.write ( "sys reboot \ r \ n")
router.read_until ( "Continue?", 12)
router.write ( "Y \ r \ n")
router.close ()
print "Done"
     
         
         
         
  More:      
 
- Gentoo: startx problem appears Failed to load module (Linux)
- SQL Server 2012 failover looksalive check and is alive check (Database)
- Oracle to use full-text indexing (Database)
- Enterprise Hadoop cluster architecture - DNS installation (Server)
- Oracle DataGuard principles and basic configuration (Database)
- Shell scripts to copy all directories under the current directory of a certain type of file to the same directory (Linux)
- How do you know your public IP terminal in Linux (Linux)
- Differences Shell scripting languages and compiled languages (Programming)
- C language programming entry - macro definitions and enum (Programming)
- How to install the Linux text editor Atom 0.124.0 (Linux)
- Understanding Java classes (Programming)
- Bash Getopts - let your script supports command line parameters (Linux)
- PostgreSQL Stream Configuration (Database)
- Broadcom transplanted to OpenWrt summary (Programming)
- VirtualBox 4.3 Can not open a new task for a virtual computer solution (Linux)
- Compare Several MySQL environmental issues (Database)
- Download Google Android source code under Ubuntu 4.4 (Linux)
- Justniffer installed on Ubuntu 15.04 (Linux)
- mydumper installation error process (Database)
- Oracle partition table data migration, process management automation (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.