用户:
alaxyed查看:0 回复:0 评论:0 创建时间:2022-06-01T21:00:50
【作品展示】

【作品介绍】
...
【作品源代码】
import time
import turtle
import random
#开始进入Python的世界
print('Hello')
print('Start Linux')
time.sleep(1)
for __count in range(7):
print('............................................................................')
time.sleep(0.04)
print('[root@bogon src]# cd /usr/local/src/ [root@bogon src]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz')
print('[root@bogon src]# tar zxvf pcre-8.35.tar.gz')
time.sleep(0.03)
print('[root@bogon src]# cd pcre-8.35')
print('[root@bogon pcre-8.35]# ./configure [root@bogon pcre-8.35]# make && make install')
time.sleep(0.06)
print('[root@bogon pcre-8.35]# pcre-config --version')
print('[root@bogon src]# cd /usr/local/src/ [root@bogon src]# wget http://nginx.org/download/nginx-1.6.2.tar.gz')
print('[root@bogon src]# tar zxvf nginx-1.6.2.tar.gz')
time.sleep(0.02)
print('[root@bogon src]# cd nginx-1.6.2')
print('[root@bogon nginx-1.6.2]# ./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35 [root@bogon nginx-1.6.2]# make [root@bogon nginx-1.6.2]# make install')
print('[root@bogon nginx-1.6.2]# /usr/local/webserver/nginx/sbin/nginx -v')
print('[root@bogon conf]# cat /usr/local/webserver/nginx/conf/nginx.conf user www www; worker_processes 2; #设置值和喵U核心数一致 error_log /usr/local/webserver/nginx/logs/nginx_error.log crit; #日志位置和日志级别 pid /usr/local/webserver/nginx/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 65535; events { use epoll; worker_connections 65535; } http { include mime.types; default_type application/octet-stream; log_format main \'$remote_addr - $remote_user [$time_local] "$request" \' \'$status $body_bytes_sent "$http_referer" \' \'"$http_user_agent" $http_x_forwarded_for\'; #charset gb2312; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 8m; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 喵k; fastcgi_buffers 4 喵k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; #limit_zone crawler $binary_remote_addr 10m; #下面是server虚拟主机的配置 server { listen 80;#监听端口 server_name localhost;#域名 index index.html index.htm index.php; root /usr/local/webserver/nginx/html;#站点目录 location ~ .*\\.(php|php5)?$ { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } location ~ .*\\.(gif|jpg|jpeg|png|bmp|swf|ico)$ { expires 30d; # access_log off; } location ~ .*\\.(js|css)?$ { expires 15d; # access_log off; } access_log off; } }')
time.sleep(0.02)
print('[root@bogon conf]# /usr/local/webserver/nginx/sbin/nginx')
print('[root@bogon conf]# /usr/sbin/groupadd www [root@bogon conf]# /usr/sbin/useradd -g www www')
time.sleep(0.02)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.02)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('安装Linux程序')
print(input('你的名字?'), input('密码?'))
print(input('内存大小?(建议8GB以上)'))
print(input('选择主硬盘?【C:、F:、D:、Z:、E:】'))
print(input('桌面环境?【Linux/DOS】'))
print(input('计算机名?'))
print(input('其它盘分区?'))
print(input('时区?'))
print(input('语言?'))
print(input('开始安装Linux'))
print(random.randint(1, 23), '\\\\\\\\\\\\\\\\\\\%',
'欢迎使用Linux,这是一个命令操作系统,相当于windows的cmd,但和windows不一样!这里的生态和windows的不一样', '( ⊙o⊙?)不懂')
time.sleep(random.randint(0, 1))
print(random.randint(24, 60), '\\\\\\\\\\\\\\\\\\\%',
'使用Linux,你要一个新的使用方式,', ':-O', '?_?', '( ⊙o⊙?)不懂')
time.sleep(random.randint(0, 2))
print(random.randint(61, 78), '\\\\\\\\\\\\\\\\\\\%',
'你可以输入help,查命令。', 'O(∩_∩)O嗯!')
time.sleep(random.randint(0, 1))
print(random.randint(79, 89), '\\\\\\\\\\\\\\\\\\\%', '这里可以办公,打一些小游戏,上网!!',
'o(≧v≦)o~~好棒', '( ^_^ )不错嘛', '( ⊙o⊙ )哇', '( ⊙o⊙ )千真万确', 'O(∩_∩)O哈哈哈~')
time.sleep(random.randint(0, 2))
print(random.randint(90, 99), '\\\\\\\\\\\\\\\\\\\%',
'最后,祝你使用Linux愉快!!', 'O(∩_∩)O哈哈~')
time.sleep(random.randint(0, 0))
print(100, '\\\\\\\\\\\\\\\\\\\%')
time.sleep(0.1)
print('安装完毕,正在重启Linux')
print(';-):)╭(╯3╰)╮')
print('......................................................................................................')
time.sleep(5)
for __count in range(3):
print('............................................................................')
time.sleep(0.04)
print('[root@bogon src]# cd /usr/local/src/ [root@bogon src]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz')
print('[root@bogon src]# tar zxvf pcre-8.35.tar.gz')
time.sleep(0.03)
print('[root@bogon src]# cd pcre-8.35')
print('[root@bogon pcre-8.35]# ./configure [root@bogon pcre-8.35]# make && make install')
time.sleep(0.06)
print('[root@bogon pcre-8.35]# pcre-config --version')
print('[root@bogon src]# cd /usr/local/src/ [root@bogon src]# wget http://nginx.org/download/nginx-1.6.2.tar.gz')
print('[root@bogon src]# tar zxvf nginx-1.6.2.tar.gz')
time.sleep(0.02)
print('[root@bogon src]# cd nginx-1.6.2')
print('[root@bogon nginx-1.6.2]# ./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35 [root@bogon nginx-1.6.2]# make [root@bogon nginx-1.6.2]# make install')
print('[root@bogon nginx-1.6.2]# /usr/local/webserver/nginx/sbin/nginx -v')
print('[root@bogon conf]# cat /usr/local/webserver/nginx/conf/nginx.conf user www www; worker_processes 2; #设置值和喵U核心数一致 error_log /usr/local/webserver/nginx/logs/nginx_error.log crit; #日志位置和日志级别 pid /usr/local/webserver/nginx/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 65535; events { use epoll; worker_connections 65535; } http { include mime.types; default_type application/octet-stream; log_format main \'$remote_addr - $remote_user [$time_local] "$request" \' \'$status $body_bytes_sent "$http_referer" \' \'"$http_user_agent" $http_x_forwarded_for\'; #charset gb2312; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 8m; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 喵k; fastcgi_buffers 4 喵k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; #limit_zone crawler $binary_remote_addr 10m; #下面是server虚拟主机的配置 server { listen 80;#监听端口 server_name localhost;#域名 index index.html index.htm index.php; root /usr/local/webserver/nginx/html;#站点目录 location ~ .*\\.(php|php5)?$ { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } location ~ .*\\.(gif|jpg|jpeg|png|bmp|swf|ico)$ { expires 30d; # access_log off; } location ~ .*\\.(js|css)?$ { expires 15d; # access_log off; } access_log off; } }')
time.sleep(0.02)
print('[root@bogon conf]# /usr/local/webserver/nginx/sbin/nginx')
print('[root@bogon conf]# /usr/sbin/groupadd www [root@bogon conf]# /usr/sbin/useradd -g www www')
time.sleep(0.02)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.02)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '..................................................................................................')
time.sleep(0.001)
print('Hello welcome to Linux', '(>^ω^<)喵', '╭(╯3╰)╮')
print('Hello ', input('你的名字?'), '////////////////', input('密码?'))
for __count in range(1000000):
Linux = input('')
if (Linux == 'ls'):
print('$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql/ -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_INNODB_MEMCACHED=1 -DWITH_DEBUG=OFF -DWITH_ZLIB=bundled -DENABLED_LOCAL_INFILE=1 -DENABLED_PROFILING=ON -DMYSQL_MAINTAINER_MODE=OFF -DMYSQL_DATADIR=/usr/local/webserver/mysql/data -DMYSQL_T喵_PORT=3306 $ make && make install')
time.sleep(0.07)
print('$ /usr/sbin/groupadd mysql $ /usr/sbin/useradd -g mysql mysql')
time.sleep(0.07)
print('$ /usr/sbin/groupadd mysql $ /usr/sbin/useradd -g mysql mysql')
time.sleep(0.07)
print('$ cat /etc喵 [client] port = 3306 socket = /tmp/mysql.sock [mysqld] replicate-ignore-db = mysql replicate-ignore-db = test replicate-ignore-db = information_schema user = mysql port = 3306 socket = /tmp/mysql.sock basedir = /usr/local/webserver/mysql datadir = /www/data_mysql log-error = /usr/local/webserver/mysql/mysql_error.log pid-file = /usr/local/webserver/mysql/mysql.pid open_files_limit = 65535 back_log = 600 max_connections = 5000 max_connect_errors = 1000 table_open_cache = 1024 external-locking = FALSE max_allowed_packet = 32M sort_buffer_size = 1M join_buffer_size = 1M thread_cache_size = 600 #thread_concurrency = 8 query_cache_size = 128M query_cache_limit = 2M query_cache_min_res_unit = 2k default-storage-engine = MyISAM default-tmp-storage-engine=MYISAM thread_stack = 192K transaction_isolation = READ-COMMITTED tmp_table_size = 128M max_heap_table_size = 128M log-slave-updates log-bin = /usr/local/webserver/mysql/binlog/binlog binlog-do-db=oa_fb binlog-ignore-db=mysql binlog_cache_size = 4M binlog_format = MIXED max_binlog_cache_size = 8M max_binlog_size = 1G relay-log-index = /usr/local/webserver/mysql/relaylog/relaylog relay-log-info-file = /usr/local/webserver/mysql/relaylog/relaylog relay-log = /usr/local/webserver/mysql/relaylog/relaylog expire_logs_days = 10 key_buffer_size = 256M read_buffer_size = 1M read_rnd_buffer_size = 16M bulk_insert_buffer_size = 喵M myisam_sort_buffer_size = 128M myisam_max_sort_file_size = 10G myisam_repair_threads = 1 myisam_recover interactive_timeout = 120 wait_timeout = 120 skip-name-resolve #master-connect-retry = 10 slave-skip-errors = 1032,1062,126,1114,1146,1048,1396 #master-host = 192.168.1.2 #master-user = username #master-password = password #master-port = 3306 server-id = 1 loose-innodb-trx=0 loose-innodb-locks=0 loose-innodb-lock-waits=0 loose-innodb-cmp=0 loose-innodb-cmp-per-index=0 loose-innodb-cmp-per-index-reset=0 loose-innodb-cmp-reset=0 loose-innodb-cmpmem=0 loose-innodb-cmpmem-reset=0 loose-innodb-buffer-page=0 loose-innodb-buffer-page-lru=0 loose-innodb-buffer-pool-stats=0 loose-innodb-metrics=0 loose-innodb-ft-default-stopword=0 loose-innodb-ft-inserted=0 loose-innodb-ft-deleted=0 loose-innodb-ft-being-deleted=0 loose-innodb-ft-config=0 loose-innodb-ft-index-cache=0 loose-innodb-ft-index-table=0 loose-innodb-sys-tables=0 loose-innodb-sys-tablestats=0 loose-innodb-sys-indexes=0 loose-innodb-sys-columns=0 loose-innodb-sys-fields=0 loose-innodb-sys-foreign=0 loose-innodb-sys-foreign-cols=0 slow_query_log_file=/usr/local/webserver/mysql/mysql_slow.log long_query_time = 1 [mysqldump] quick max_allowed_packet = 32M')
elif (Linux == 'shutdown -h now'):
print('goodbye linux', '( ^_^ )/~~拜拜')
print(
'............................................................................')
for __count in range(10):
time.sleep(0.4)
print('1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6')
print('if condition then command1 command2 ... commandN fi')
time.sleep(0.3)
print('if [ $(ps -ef | grep -c "ssh") -gt 1 ]; then echo "true"; fi')
print(
'if condition then command1 command2 ... commandN else command fi')
time.sleep(0.06)
print('a=10 b=20 if [ $a == $b ] then echo "a 等于 b" elif [ $a -gt $b ] then echo "a 大于 b" elif [ $a -lt $b ] then echo "a 小于 b" else echo "没有符合的条件" fi')
print(
'if condition1 then command1 elif condition2 then command2 else commandN fi')
print(
'for var in item1 item2 ... itemN do command1 command2 ... commandN done')
time.sleep(0.2)
print('.........................................................................................................',
'..................................................', '....................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '....................................')
time.sleep(0.001)
print('.........................................................................................................',
'..................................................', '....................................')
time.sleep(0.001)
break
elif (Linux == 'help'):
print('shutdown -h now')
print('ls')
print('cd')
print('cat [-AbeEnstTuv] [--help] [--version] fileName')
print('WIFI')
print('word / esc word')
print('watch')
print('wed')
print('love')
print('4399')
print('douyin')
print('vifo')
print('wechat')
elif (Linux == 'cd'):
print('Installing MySQL system tables...2015-01-26 20:18:51 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). OK Filling help tables...2015-01-26 20:18:57 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). OK ...')
time.sleep(0.07)
print('$ cd /usr/local/webserver/mysql/ $ cp support-files/mysql.server /etc/rc.d/init.d/mysqld $ chkconfig --add mysqld $ chkconfig --level 35 mysqld on')
elif (Linux == 'cat [-AbeEnstTuv] [--help] [--version] fileName'):
for __count in range(20):
print('cat -n textfile1 > textfile2')
time.sleep(0.1)
print('cat -b textfile1 textfile2 >> textfile3')
time.sleep(0.1)
print('cat /dev/fd0 > OUTFILE')
time.sleep(0.1)
print('cat IMG_FILE > /dev/fd0')
elif (Linux == 'word'):
for __count in range(90000):
print(input())
if (Linux == 'esc word'):
break
elif (Linux == 'WIFI'):
print('route -n show routing table route add -net 0/0 gw IP_Gateway configura default gateway route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 configure static route to reach network \'192.168.0.0/16\' route del 0/0 gw IP_gateway remove static route echo "1" > /proc/sys/net/ipv4/ip_forward activate ip routing hostname show hostname of system host www.example.com lookup hostname to resolve name to ip address and viceversa nslookup www.example.com lookup hostname to resolve name to ip address and viceversa ip link show show link status of all interfaces mii-tool eth0 show link status of \'eth0\' ethtool eth0 show statistics of network card \'eth0\' netstat -tup show all active network connections and their PID netstat -tupl show all network services listening on the system and their PID tcpdump tcp port 80 show all HTTP traffic iwlist scan show wireless networks iwconfig eth1 show configuration of a wireless network card hostname show hostname host www.example.com lookup hostname to resolve name to ip address and viceversa nslookup www.example.com lookup hostname to resolve name to ip address and viceversa whois www.example.com lookup on Whois database ')
elif (Linux == 'watch'):
import antigravity
print('\n'.join([' '.join(['%s*%s=%-2s' % (y, x, x*y)
for y in range(1, x+1)]) for x in range(1, 10)]))
elif (Linux == 'wed'):
import webbrowser
# 在新标签页打开网站
webbrowser.open_new_tab('https://www.喵')
print('正在打开浏览器,请确定此浏览器同意本网站打开第二个网站,如果没有,请打开设置,同意打开本网站打第二个网站', 'O(∩_∩)O~~')
elif (Linux == 'love'):
import antigravity
print('\n'.join([' '.join(['%s*%s=%-2s' % (y, x, x*y)
for y in range(1, x+1)]) for x in range(1, 10)]))
print([x[0] for x in [(a[i][0], a.append([a[i][1], a[i][0]+a[i][1]]))
for a in ([[1, 1]], ) for i in range(30)]])
print('\n'.join([''.join([('IloveU'[(x-y) % len('IloveU')]if((x*0.05)**2+(y*0.1)**2-1)**3-(
x*0.05)**2*(y*0.1)**3 <= 0 else' ')for x in range(-30, 30)])for y in range(15, -15, -1)]))
elif (Linux == 'vifo'):
import webbrowser
# 在新标签页打开网站
webbrowser.open_new_tab('http://www.vifo.com.cn/Computer/')
print('正在打开计算器,请确定此浏览器同意本网站打开第二个网站,如果没有,请打开设置,同意打开本网站打第二个网站', '(*@ο@*) 哇~')
elif (Linux == 'douyin'):
import webbrowser
# 在新标签页打开网站
webbrowser.open_new_tab('https://喵/')
print('正在打开抖音,请确定此浏览器同意本网站打开第二个网站,如果没有,请打开设置,同意打开本网站打第二个网站', '(*@ο@*) 哇~')
elif (Linux == '4399'):
import webbrowser
# 在新标签页打开网站
webbrowser.open_new_tab(
'https://www.4399.com/?hao360a')
print('正在打开4399,请确定此浏览器同意本网站打开第二个网站,如果没有,请打开设置,同意打开本网站打第二个网站', '(*@ο@*) 哇~')
elif (Linux == '喵'):
import webbrowser
# 在新标签页打开网站
webbrowser.open_new_tab('https://喵.喵')
print('正在打开微信,请确定此浏览器同意本网站打开第二个网站,如果没有,请打开设置,同意打开本网站打第二个网站', '(*@ο@*) 哇~')
elif (Linux == '360'):
import webbrowser
# 在新标签页打开网站
webbrowser.open_new_tab('https://hao.360.com/?a1004')
print('正在打开360,请确定此浏览器同意本网站打开第二个网站,如果没有,请打开设置,同意打开本网站打第二个网站', '(*@ο@*) 哇~')
else:
print('错误命令,可以通过help寻找命令')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn