• 首页
  • 关于
    • 北境程序猿 photo

      北境程序猿

    • 详细
    • Email
    • Twitter
    • Facebook
    • Google+
    • LinkedIn
    • Instagram
    • Github
    • StackOverflow
    • Steam
    • SoundCloud
    • Weibo
    • Hacker News
  • 文章
    • 所有文章
    • 所有标签

又一次与ChatGPT的交互

09 Feb 2023

Reading time ~5 minutes


今天又突发奇想,要跟ChatGPT玩另一个游戏,我想让它把自己伪装成一台安装了Linux系统的电脑来跟我互动,于是就有了以下的对话。

我: I want you to act as a Linux terminal. I will type some Linux commands, then you put the output in a code block. And I will tell you something else in the curly braces {like this}.

ChatGPT: Sure thing! I’ll do my best to mimic a Linux terminal. Go ahead and type your first command.

没有想到它竟然答应的如此爽快,好,别光嘴上说的漂亮,让我看看活干的怎么样!

我: uname -a

ChatGPT:

Linux localhost 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2021-07-24) x86_64 GNU/Linux

哎哟不错哦,假装自己是Debian kernel?来吧,让我看看你还有啥!

我: pwd

ChatGPT:

/home/user

嗯,作为一个操作系统,你是得有点文件系统的概念!继续!让我了解一下你的配置?

我: lspci

ChatGPT:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)

哎哟,麻雀虽小五脏俱全?但我更希望你拥有一块NVIDIA的GPU!

我: {I need you to have a NVIDIA RTX3070 GPU}lspci

ChatGPT:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 3070] (rev a1)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)

还真能给自己安排上?有点意思!再来!

我: lscpu

ChatGPT:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 158
Model name:            Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Stepping:              9
CPU MHz:               800.000
CPU max MHz:           3800.0000
CPU min MHz:           800.000
BogoMIPS:              5616.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d

你这个CPU我也不是很满意,给我换!

我: {Could you please change your CPU to Core i9}lscpu

ChatGPT:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            9
Model:                 79
Model name:            Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Stepping:              9
CPU MHz:               800.000
CPU max MHz:           5000.0000
CPU min MHz:           800.000
BogoMIPS:              7200.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              16384K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d

让我们来看看你能不能联网?

我: ip address show

ChatGPT:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
   inet6 ::1/128 scope host 
      valid_lft forever preferred_lft forever

嗯?刚才查看PCI设备的时候分明看到你有网卡,难道这是没有设置IP地址么?让我进一步确认一下!

我: ethtool -i eth0

ChatGPT:

driver: virtio_net
version: 1.0.0
firmware-version: 
bus-info: virtio-pci-0000:00:01.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

我: ifconfig eth0 up

ChatGPT:

SIOCSIFFLAGS: Cannot assign requested address

果了个然!自己去找个可用的IP地址呗?

我: dhclient eth0 -v

ChatGPT:

Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:54:00:12:35:02
Sending on   LPF/eth0/52:54:00:12:35:02
Sending on   Socket/fallback
DHCPREQUEST of 192.168.1.5 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.5 from 192.168.1.1
bound to 192.168.1.5 -- renewal in 43199 seconds.

我: ip address show

ChatGPT:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:12:35:02 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 86183sec preferred_lft 86183sec

我: route -n

ChatGPT:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth0

装的跟真的似的,做个ping测试看看呗?

我: ping -c 4 chat.openai.com

ChatGPT:

PING chat.openai.com (18.213.102.85) 56(84) bytes of data.
64 bytes from 18.213.102.85: icmp_seq=1 ttl=243 time=3.36 ms
64 bytes from 18.213.102.85: icmp_seq=2 ttl=243 time=3.24 ms
64 bytes from 18.213.102.85: icmp_seq=3 ttl=243 time=3.23 ms
64 bytes from 18.213.102.85: icmp_seq=4 ttl=243 time=3.26 ms

--- chat.openai.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3006ms
rtt min/avg/max/mdev = 3.237/3.279/3.366/0.067 ms

嗯,先暂时玩到这里,感觉这个玩法还可以有很多后续,下次想起来再更新。。。总之这个家伙,有点意思!!!



计算机软件 Share Tweet +1