顯示具有 wget 標籤的文章。 顯示所有文章
顯示具有 wget 標籤的文章。 顯示所有文章

2021/09/07

今天在docker 安裝完pbs後要更新出現以下的錯誤


Hit:1 http://deb.debian.org/debian bullseye InRelease

Hit:2 http://security.debian.org/debian-security bullseye-security InRelease

Hit:3 http://deb.debian.org/debian bullseye-updates InRelease

Get:4 http://download.proxmox.com/debian/pbs bullseye InRelease [3067 B]

Err:4 http://download.proxmox.com/debian/pbs bullseye InRelease

  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DD4BA3917E23BF59

Reading package lists... Done

W: GPG error: http://download.proxmox.com/debian/pbs bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DD4BA3917E23BF59

E: The repository 'http://download.proxmox.com/debian/pbs bullseye InRelease' is not signed.

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.


解決方法如下


wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg 



https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_11_Bullseye#Install_Proxmox_VE

https://forum.proxmox.com/threads/problem-with-repository-and-upgrade.95020/



2016/11/21

因為有個單位是使用自行申請的ADSL
近來每天都打電話來說網路被鎖
在想說要不要寫個程式在user開机時把ip傳來同時在黑名單把ip刪掉
先找了一些資料

找出目前使用的ip

curl icanhazip.com

curl ipv4.icanhazip.com

wget -qO- icanhazip.com


在批次檔中使用ftp傳檔

ftp -s:upload.txt

upload.txt內容
open ftp.server.com
user@server.com
userpwd
prompt
cd ftp_upload
mput test.txt
bye


使用python拿到ip並寄出

import urllib2,smtplib,sys
response = urllib2.urlopen('http://icanhazip.com/')
html = response.read()
print html

sender = "test_from_hinet@hinet.net"
receipt = "abc@de.com"
smtp = smtplib.SMTP("168.95.4.10")
header = "Subject: ip \r\n\r\n"
msg = html
smtp.sendmail(sender, receipt, header+msg)
smtp.quit()


http://neochung.com/2015/01/pc/batch-file/windows%E4%B8%AD%E4%BD%BF%E7%94%A8%E6%89%B9%E6%AC%A1%E6%AA%94-bat-%E4%B8%8A%E5%82%B3ftp%E6%AA%94%E6%A1%88/

http://askubuntu.com/questions/95910/command-for-determining-my-public-ip