Shenzhen University uses a router to log in to the campus network, openwrt to log in to drcom, version D tutorial

Related files needed for this tutorial:

https://download.csdn.net/download/weixin_39139505/12882537

Software preparation

  • For a router with openwrt system, you can buy an ordinary router and flash the openwrt system (not covered in this tutorial) or directly buy a soft router with openwrt system, of course, the cost is different.
    Insert picture description here

  • Packet capture tool: wireshark , to capture network data packets for subsequent analysis of login parameters.

  • Download the configuration analysis script: https://github.com/drcoms/drcom-generic, the d drcom_d_config.pyversion corresponds to the p version in the project drcom_p_config.py.

  • Install python2.x to run configuration analysis scripts.

  • notepad++: notepad++ is used to edit scripts.

  • Tools for linking openwrt routing system: putty or mobaxterm , used to log in to the router terminal

  • File transfer tool: winscp , used to transfer configuration files to the router.

  • Download the dogcom toolkit: dogcom , download it on the 5th floor of the forum. I downloaded the last one.
    Insert picture description here

drcom version:

Version 5.2 (D)

The first step: packet capture

  • The computer network port is connected to the campus network, but do not open drcom first, select Ethernet and click capture, log in to drcom, wait for about 1 minute, click stop, close drcom.

Insert picture description here
Insert picture description here

  • Save the captured packet and name it dr.
    Insert picture description here

Parse the packet to get the configuration

  • Edit drcom_d_config.py, change filename = "xxx.pcapng" to filename = "dr.pcapng".
    Insert picture description here
  • If it has been modified, you do not need to bother.
  • Execute the command to generate the configuration file, put the related files in the same folder, and directly enter cmd in the folder and press Enter.
    Insert picture description here
    Insert picture description here
    Insert picture description here
python drcom_d_config.py > config.txt
  • After the execution is successful, the config.txt file will be generated with configuration information written in it. If the execution fails, re-capture the package or check whether the python version is correct.
    Insert picture description here
  • The profile passwordfield to write the password on their own campus network.
  • I uploaded directly to the profile is not connected to the campus network, I changed the field host_osand ror_versionafter success. The following is the successful configuration information:
server = '192.168.255.251'
username=''     
password=''
CONTROLCHECKSTATUS = '\x20'
ADAPTERNUM = '\x02'
host_ip = '192.168.45.172'
IPDOG = '\x01'
host_name = 'GILIGILIEYE'
PRIMARY_DNS = '202.96.134.133'
dhcp_server = '192.168.45.33'
AUTH_VERSION = '\x30\x00'
mac = 0xbdeb020c909c
host_os = 'Windows 10'
KEEP_ALIVE_VERSION = '\xdc\x02'
ror_version = True 

  • Change the file name to drcom.conf.
    Insert picture description here
  • The computer is connected to the router, and the campus network port is connected to the wan port of the router.
  • Winscp connects to the router, and uploads the dogcom ipk installation package and drcom.conf to the /usr/ folder.
    Insert picture description here
    Insert picture description here
  • With puttyor mobaxtermconnect to the router terminal, I use puttythe demo:

Insert picture description here

  • Enter the /usr/ folder and execute the following statement:
opkg update
opkg install dogcom_v1.6.2-1_x86_64\(lede-sdk-17.01.4-x86-64\).ipk
  • This process requires the router to have a network, so you can use a port with a network to connect to the wan port first, or use someone else's proxy. I am using the proxy of the brother. carried out:
export https_proxy="172.29.150.52:8119"
export http_proxy="172.29.150.52:8119"
  • After executing this statement, the session you are currently connected to can have a network. If you reconnect, you need to execute it again. You can try this.
  • After the installation is successful, the campus network is connected to the wan port, execute the following command to test whether the campus network is successfully connected.
/usr/dogcom -m dhcp -c /usr/drcom.conf -v
  • After confirming that you can access the Internet, paste the following command on the line of exit 0 in /etc/rc.local:
dogcom -m dhcp -c /usr/drcom.conf -d -e
  • Or you can add it directly on the router web interface
    Insert picture description here
  • Restart the router and you are done.

Related items and links

Guess you like

Origin blog.csdn.net/weixin_39139505/article/details/108761679
log
log