버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

코드 블럭
linenumberstrue
# ls -1 /opt/unetlab/wrappers/
docker_wrapper
dynamips_wrapper
iol_wrapper
iol_wrapper_telnet
nsenter
qemu_wrapper
qemu_wrapper_telnet
simple_forwarder
unl_profile
unl_wrapper

# cd /opt/unetlab/html/devices/
# grep -Hrn _wrapper *
docker/device_docker.php:339:  $cmd = 'sudo /opt/unetlab/wrappers/docker_wrapper -P ' ...
iol/device_iol.php:106:        $cmd = '/opt/unetlab/wrappers/iol_wrapper ';
qemu/device_qemu.php:597:      $cmd = '/opt/unetlab/wrappers/qemu_wrapper_telnet -P ' ...
qemu/device_qemu_wp.php:338:   $cmd = '/opt/unetlab/wrappers/qemu_wrapper -T ' ...

Code Protection

Encrypted by ionCube

코드 블럭
languagephp
title/opt/unetlab/html/api.php
<?php if(!extension_loaded('ionCube Loader'))... ?>
HR+cPwf3lkYwI0JFGrKgosEcR4IkYG9YmAJdBR+uMqvuG8fMuSMGbT47RAyjVFsriJV3hnBfI4Gs
코드 블럭
# grep -Hrn extension_loaded..ionCube /opt/unetlab/html | wc -l
195

Unencrypted codes - https://github.com/pnetlab/pnetlab_main

DB

MySQL connection info

  • id: pnetlab
  • pw: pnetlab
  • db: pnetlab_db

https://github.com/pnetlab/pnetlab_main/blob/main/includes/functions.php

Important Tables

코드 블럭
linenumberstrue
# mysql -u pnetlab -p pnetlab_db
Enter password: pnetlab

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7019
Server version: 5.7.42-0ubuntu0.18.04.1 (Ubuntu)

mysql> select * from control;
+-------------------+---------------+
| control_name      | control_value |
+-------------------+---------------+
| ctrl_alive_key    | QjZxcn...     |
| ctrl_default_mode | online        |
| ctrl_offline_mode | 1             |
| ctrl_online_mode  | 1             |
| ctrl_version      | 4.2.10        |
+-------------------+---------------+

mysql> SELECT * FROM users;
+-----+-------------------------+---------+-------------+------------+----------+---------+----------+------+-------------------------------+-------------+-------+---------+-------------+------+---------+-------------+
| pod | username                | cookie  | email       | expiration | password | session | ip       | role | folder                        | lab_session | html5 | license | online_time | note | offline | user_status |
+-----+-------------------------+---------+-------------+------------+----------+---------+----------+------+-------------------------------+-------------+-------+---------+-------------+------+---------+-------------+
|   1 | John Doe_online_account | 89..... | john@ex.com |         -1 | ........ | ....... | 10.0.0.5 | 0    | /Your labs from PNETLab Store |        NULL |     1 | Um..... |  1723433643 | NULL |       0 |           1 |
|   2 | admin                   | NULL    | NULL        |         -1 | ........ |       N | NULL     | 0    | NULL                          |        NULL |  NULL | NULL    |  1723433636 | NULL |       1 |           1 |
+-----+-------------------------+---------+-------------+------------+----------+---------+----------+------+-------------------------------+-------------+-------+---------+-------------+------+---------+-------------+