分类 技术经验 下的文章

用 supervisor
先安装 supervisor
sudo apt install supervisor
创建 supervisor frps 配置文件
在 /etc/supervisor/conf.d
创建撇脂文件 frp.conf

[program:frp]
command = /root/frp/frps -c /root/frp/frps.ini
autostart = true

重启supervisor服务
systemctl restart supervisor
查看supervisor运行状态
supervisorctl status

JSON example using Sonoff Basic Smart Switch & ESPEasy.

ThomasB, Apr-10-2019

Connect to ESPEasy on local IP (change as needed to match the device) and load the jason into a array called "espez"

import json, requests
url = requests.get('http://192.168.1.81/json')
espez = json.loads(url.text)

Show an example of printing the current value of the built-in push button switch.

Device configuration as follows: Task= 1, Device= Switch input-Switch, Name= PBSW

print("Device Name: ", espez'Sensors'['TaskName'])

wendu = int(espez'Sensors''TaskValues'['Value'])

print("Temp is : ", wendu)

if wendu >=27: #判断并且显示温度高低

print('Hot Temp is:',wendu,'°C')

else:

print('Cool Temp is:',wendu,'°C')


参考链接:
https://www.letscontrolit.com/forum/viewtopic.php?f=6&t=6612&p=36311

这个算是一键命令
不用敲命令的创建方式:
GitHub上的项目
https://github.com/oblique/create_ap
git clone https://github.com/oblique/create_ap.git
cd create_ap
sudo make install
安装完成
安装下依赖库
sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq
接下来运行命令开启AP
启动AP服务systemctl start create_ap
添加到开机启动systemctl enable create_ap
/etc/create_ap.conf这里是配置文件,可以直接改里面的信息,然后运行上面的命令也可以生成自定义的
CHANNEL=default
GATEWAY=10.0.0.1
WPA_VERSION=2
ETC_HOSTS=0
DHCP_DNS=gateway
NO_DNS=0
NO_DNSMASQ=0
HIDDEN=0
MAC_FILTER=0
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
ISOLATE_CLIENTS=0
SHARE_METHOD=nat
IEEE80211N=0
IEEE80211AC=0
HT_CAPAB=[HT40+]
VHT_CAPAB=
DRIVER=nl80211
NO_VIRT=0
COUNTRY=
FREQ_BAND=2.4
NEW_MACADDR=
DAEMONIZE=0
NO_HAVEGED=0
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
SSID=MyAccessPoint
PASSPHRASE=12345678
USE_PSK=0

在某航空公司用积分换了个16G优盘,原本以为薅了羊毛,没想到是个黑优盘
用ChipGenius_v4_19_0319
下载地址:
https://www.mydigit.cn/forum.php?mod=viewthread&tid=16812

 设备描述: [D:]USB 大容量存储设备(Netac OnlyDisk)
 设备类型: 大容量存储设备

 协议版本: USB 2.00
 当前速度: 高速(HighSpeed)
 电力消耗: 100mA

USB设备ID: VID = 0DD8 PID = 0408
设备序列号: 570DA431150D

设备供应商: Netac
 设备名称: OnlyDisk
设备修订版: 0100

产品制造商: Netac
 产品型号: OnlyDisk
产品修订版: 8.07

 主控厂商: Alcor Micro(安国)
 主控型号: AU6989SN-GTC [F500] - F/W FA01
闪存识别码: EC3A94C3A4CA - Samsung(三星) - 1CE/单通道 [MLC] -> 总容量 = 16GB

 在线资料: http://dl.mydigit.net/special/up/alcor.html

可能的闪存型号

Unknown(未知)

闪存识别码映射表

[通道 0] [通道 1]
EC3A94C3A4CA --------








看下来根据主控型号,找到老毛子的一个网站。下载量产工具,上面的芯片检测工具也有给量产工具链接,但是试下来也一样没有反应。老毛子这个版本更新,试下来也是一样。
https://www.usbdev.ru/files/alcor/alcordsmp/
AlcorDSMP_19.01.25.00
最后在老毛子的那个网站发现了这个工具,虽然是appha版本,但是给出的提示应该很明显了。。。扩容盘。垃圾扔了。。。
MyDiskFix-alpha2
https://www.usbdev.ru/files/mydiskfix/

设备名称: Netac OnlyDisk
报告容量: 14575MB
测试结束!
实际容量: 至多0.00MB

注意!测试中发现问题!

该可移动磁盘是用黑片制造的!
此芯片已无完好区块,请考虑更换FLASH芯片!
谨防假冒!