V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  263  ›  全部回复第 1 页 / 共 8 页
回复总数  143
1  2  3  4  5  6  7  8  
换个能用 macOS 的公司。
装个虚拟显示器( xvfb )试试吧
https://github.com/mathworks/matlab-proxy/blob/main/README.md
先看看 Matlab 能正确识别显卡吗 gpuDevice()
72 天前
回复了 kingterrors 创建的主题 macOS QQ 为什么要使用 8080 端口?
QQ 3933 xxx 61u IPv4 0x15d3116f03d523fd 0t0 TCP xxx-mbp:61302->180.101.246.123:http-alt(ESTABLISHED)

这里显示的是本地的 61302 端口和目标 180.101.246.123 的 8080 端口建立了链接,另外微信也会有这个链接。
84 天前
回复了 tpxcer 创建的主题 宽带症候群 我上海电信上传好像 QOS 了
上海电信,不是精品网和海外加速套餐,一直都有 QOS 的,并且是随机的,时好时坏。
84 天前
回复了 miaosl 创建的主题 Linux 怎么 zabbix 这么费劲啊,我要气哭了
看你的参数,只有 HostnameItem ,没有 Hostname ,这是不正确的配置。
zabbix 建议即使设置了 HostnameItem=system.hostname ,也需要是指正确的 Hostname= mha0 。HostnameItem=system.hostname 是用来指定获取 hostname 的方法,而不是设置 hostname 。
agent 的部署推荐使用 ansible 等来批量部署,直接获取系统变量填写,不要使用 HostnameItem=system.hostname 这种方式
普通版现在只能导 180 天,想要导出一年只能付费。或者之前就每 180 天导出备份一次
skip_name_resolve
import subprocess
import requests


def get_otp(dynamic_code):
api_url = 'https://api.example.com/get_otp'
response = requests.post(api_url, json={'dynamic_code': dynamic_code})
return response.json()['otp']


ssh_process = subprocess.Popen(
['ssh', '[email protected]'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)

dynamic_code = ''
while True:
output = ssh_process.stdout.readline()
if 'Dynamic code:' in output:
dynamic_code = output.split('Dynamic code:')[1].strip()
break

otp = get_otp(dynamic_code)

ssh_process.stdin.write(f'{otp}\n')
ssh_process.stdin.flush()

while True:
output = ssh_process.stdout.readline()
print(output.strip())
if 'Last login:' in output:
print("登录成功!")
break
elif 'Permission denied' in output:
print("登录失败!")
break

ssh_process.stdin.close()
ssh_process.stdout.close()
ssh_process.stderr.close()


CLAUDE 3.5 SONNET
import paramiko
import hashlib
import base64
import getpass

def get_host_key_fingerprint(hostname, port=22):
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

try:
client.connect(hostname, port=port, username='dummy', password='dummy')
except:
pass

key = client.get_transport().get_remote_server_key()
fingerprint = hashlib.sha256(key.get_fingerprint()).hexdigest()

client.close()
return ':'.join(a+b for a,b in zip(fingerprint[::2], fingerprint[1::2]))

def ssh_login_with_otp(hostname, username, password, otp_func):
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

# 获取 fingerprint
fingerprint = get_host_key_fingerprint(hostname)
print(f"Host key fingerprint: {fingerprint}")

# 验证 fingerprint
if input("Verify fingerprint (y/n): ").lower() != 'y':
print("Fingerprint verification failed")
return

# 获取动态密码
otp = otp_func()

try:
client.connect(hostname, username=username, password=password+otp)
print("Login successful!")

# 执行命令
stdin, stdout, stderr = client.exec_command('ls -l')
print(stdout.read().decode())

except Exception as e:
print(f"Login failed: {str(e)}")

finally:
client.close()

# 模拟获取动态密码的函数
def get_otp():
return input("Enter OTP: ")

# 使用示例
hostname = 'example.com'
username = 'your_username'
password = getpass.getpass("Enter password: ")

ssh_login_with_otp(hostname, username, password, get_otp)


gpt yyds
93 天前
回复了 HeiHeiDe 创建的主题 问与答 iOS 游戏 APP 接入实名认证
首先你要有版号、软著,然后接入中宣部实名认证系统
https://developers.weixin.qq.com/community/minigame/doc/000ecaf1354190701d0c53f7a5b401
电信换新设备了,老的还没完全下架,目前可以通过 PPPoE Scan 查看对端设备,如果有多个设备,可以指定 AC Name 拨号,还能获取到老的 IP 段。
iTop
特斯拉直接开露营模式
你点一下左下角的 Open Resource Monitor 不就好了
195 天前
回复了 BNineCoding 创建的主题 汽车 新车停车场纠结,求老司机指点迷津
车就是个工具,怎么便利怎么来。
204 天前
回复了 drclairvoyant 创建的主题 macOS macOS 更新后启动台图标被打乱
只用默认排序
defaults write com.apple.dock ResetLaunchPad -bool true && killall Dock
前往目录:/Library/Preferences/SystemConfiguration
保留:com.apple.Boot.plist ,其余的全部删除
重启

再改
首先直接用光猫接电脑,测速。排除是否联通的问题。
1  2  3  4  5  6  7  8  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2978 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 41ms · UTC 14:11 · PVG 22:11 · LAX 07:11 · JFK 10:11
Developed with CodeLauncher
♥ Do have faith in what you're doing.