(只是個筆記)linux ngrok輸出log到指定檔案 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 - 9月 28, 2019 nohup ./ngrok http 1880 -log=./log.txt & cat log.txt |grep "url" 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 留言
IP 計算心法 - 7月 29, 2019 本篇為作者本人一直忘記IP到底怎麼算 所以 整理成的快速心法 [IP 計算心法 ] 11111111.11111111.11111111.11111111 8bit 8bit 8bit 8bit 總共 32bit 何謂 網路位元 與 主機位元 ? 以 192.168.10.10/24 為例 : 11000000.1010000.00001010 . 00001010 [ 網路位元 ] [ 主機位元 ] 網路位置 = 主機位元通通設為 0 廣播位置 = 主機位元通通設為 1 主機位置 = 除了網路位置 與 廣播位置 剩下的都是 主機 位置 前置碼 =/N /24 /32 之類的 N 代表網路位元的數目 子網路遮罩 = 其實跟前置碼一樣 的意思 255.255.255.0 = 11111111.11111111.11111111.00000000 = 24 個 1 = /24 基本範例 1: 172.30.128.0 /24 (255.255.255.0) 首先 把 IP 攤開來 10101100.00011110.10000000.00000000 因為是 /24 往後數 24 位 , 24 位之後 就都是主機位置了 10101100.00011110.1000000 0 .00000000 網路位置 = 主機位元通通設為 0 所以 = 10101100.00011110.1000000 0 . 000... 閱讀完整內容
node-red 寫成服務時遇到 typeerror the path argument must be of type string. received type undefined - 2月 16, 2020 之前有在我的NUC的VM上架過node-red 這次把它寫成服務時 卻噴了 typeerror the path argument must be of type string. received type undefined 這個錯誤 以下是我服務寫成的內容 [Unit] Description=node-redd Daemon after=network.target [Service] Type=forking ExecStart=/home/node-red-start.sh ExecStop=/home/node-red-stop.sh StandardOutput=tty [Install] WantedBy=multi-user.target node-red-stop.sh: #!/bin/sh ps aux | grep node-red | awk '{print $2}' | xargs kill -9 node-red-start.sh: #!/bin/sh node-red & 會噴出錯誤的原因主要是我之前居然是用root開node-red的 他找不到我放在 /root/.node-red/settings.js 所以把node-red-start.sh 內容修改一下: #!/bin/sh node-red -s /root/.node-red/settings.js & 就行了 閱讀完整內容
在debain安裝DVWA - 12月 14, 2018 apt-get install apache2 apt-get install mysql-server apt-get install php7.0 apt-get install php-mysql apt-get install php-gd rm /var/www/html/index.html cd /var/www/html 去下載DVWA unzip DVWA-master cp -r DVWA-master DVWA #這部看你要不要做 只是把路徑縮短一點 cp /var/www/html/DVWA/config/config.inc.php.dist config.inc.php vim config.inc.php db_user 改user db_password 改password vim /etc/php/7.0/apache2/php.ini 找到以下兩個然後On allow_url_include allow_url_fopen 調整MYSQL mysql -u root -p create database dvwa; CREATE USER 'user'@'127.0.0.1' IDENTIFIED BY 'password'; grant all on dvwa.* to 'user'@'127.0.0.1'; flush privileges; exit systemctl enable apache2 #開機啟動 systemctl restart apache2 防火牆 我是用firwalld啦 看你有沒有防火牆 <code class="prettyprint"> firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --zone=public --add-port=443/tcp --permanent firewall-cmd --reload </code> 閱讀完整內容
留言
張貼留言