第一個步驟先打開控制台
在右上角搜尋防火牆
點擊Windows防火牆 再點擊左邊下面有個進階設定
會出現以下
點擊左邊輸入規則 再點擊新增規則
點擊程式直接下一步
選擇要禁止的程式 在點下一步
點擊封鎖連線 再按下一步
勾選全部 再點擊下一步
填完直接按完成
這樣軟體就無法聯網囉
第一個步驟先打開控制台
在右上角搜尋防火牆
點擊Windows防火牆 再點擊左邊下面有個進階設定
會出現以下
點擊左邊輸入規則 再點擊新增規則
點擊程式直接下一步
選擇要禁止的程式 在點下一步
點擊封鎖連線 再按下一步
勾選全部 再點擊下一步
填完直接按完成
這樣軟體就無法聯網囉
Ubuntu has a mechanism, that is, the installed network card (NIC) will be renamed to another name when the system is booted. Although there is no difference in using it, it is just a little unaccustomed. After booting, we can observe the dmesg log as follows
dmesg | grep rename
You can see that the following network cards eth0 and eth1 have been renamed to ens160 and ens192:
[1.341871] vmxnet3 0000:03:00.0 ens160: renamed from eth0
[1.362582] vmxnet3 0000:0b:00.0 ens192: renamed from eth1
The method of closing is very simple, that is, edit the /etc/default/grub file and change the following parameters:
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
Update grub.cfg with the following command
sudo update-grub
change interface configure
/etc/network/interfaces
In general analysis, the last sentence is the key point: When reading the configuration file config.ini, there are % caused by
Solution one:
Most likely configparser is reading the
literal "%" sign in the string. The '%' symbol is used for string
interpolation (substitution). If you want to use a literal "%", you
can escape it with another "%". For example, use "100%%" to
mean "100%" in configuration variables read by configparser.
Solution two:
Change from
cf= configparser.ConfigParser()
to:
cf = configparser.RawConfigParser()
# targetpath_s = targetpath.replace(':','-')
CI-Server:~$ sudo apt-get install cloud-guest-utils
CI-Server:~$ sudo swapoff -a
CI-Server:~$ sudo parted
get partitions list with print all:
(parted) print all
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 752GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 528GB 528GB primary ext4 boot
2 528GB 537GB 8588MB extended
5 528GB 537GB 8588MB logical linux-swap(v1)
remove none root partitions with rm (part-index):
(parted) rm 5
Warning: Partition /dev/vda5 is being used. Are you sure you want to continue?
Yes/No? yes
Error: Partition(s) 5 on /dev/vda have been written, but we have been unable to
inform the kernel of the change, probably because it/they are in use. As a
result, the old partition(s) will remain in use. You should reboot now before
making further changes.
Ignore/Cancel? C
(parted) print all
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 752GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 528GB 528GB primary ext4 boot
2 528GB 537GB 8588MB extended
(parted) rm 2
Error: Partition(s) 5 on /dev/vda have been written, but we have been unable to
inform the kernel of the change, probably because it/they are in use. As a
result, the old partition(s) will remain in use. You should reboot now before
making further changes.
Ignore/Cancel? C
(parted) print all
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 752GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 528GB 528GB primary ext4 boot
The commands works on ubuntu 16.04 (NONE LVM) and machine is running on a kvm:
sudo growpart /dev/vda 1
sudo resize2fs /dev/vda1
linux virtual machines with a bridge interface, and I want to display the machine's IP address after the machine is booted (in login, it usually shows the release and kernel).
This is just a text file...you write it in the same way you would send text to the file using any other shell script. Something like this will replace /etc/issue with your ip address:
ifconfig eth0 | awk '/inet addr/ {print $2}' | cut -f2 -d: > /etc/issue
Obviously, depending on the information you want in /etc/issue, you can make this more complex file at will.
You can write to this file using the local equivalent /etc/rc.d/rc.local (usually executed after all other startup scripts).
On CentOS 7 and Debian 8, just append the following line to /etc/issue
My IP address: \4
This will resolve to the machine’s IPv4 address. If you have multiple network interfaces and want to select a specific network interface, you can use specify it
My IP address: \4{eth0}
Check man getty for the list of escape sequences supported by your distribution.
This script will add/remove IP addresses to/from /etc/issue Submit files as needed:
#!/bin/sh
PREFIX="Local IP addresses:"
IPADDRS=$(hostname -I | tr " " "\n" | grep -v "^$" | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tr "\n" " ")
perl -i -p -0777 -e "s/^$PREFIX[^\n]*\n\n//m; s/$/\n$PREFIX $IPADDRS\n/ if length('$IPADDRS')>6" /etc/issue
If you are using a Debian-based distribution, it is best to put the script in the following location:
/etc/network/if-up.d/update-issue
/etc/network/if-post-down.d/update-issue
In this way, the script will be executed whenever the interface appears or fails. Putting it in /etc/rc.d/rc.local has the disadvantage of only executing it once at startup.
# apt-get install -y software-properties-common# apt-get install -y python-software-properties
# add-apt-repository ppa: mrazavi / openvas
# apt-get update# apt-get install -y openvas9
# apt-get install -y sqlite3
# greenbone-nvt-sync
# greenbone-scapdata-sync
// Synchronized data is stored in / var / lib / openvas / scap-data# greenbone-certdata-sync
// Sync data is stored in / var / lib / openvas / cert-data
# /etc/init.d/redis-server restart# service openvas-scanner restart
# service openvas-manager restart
# openvasmd --rebuild --progress
# vi / etc / default / openvas-gsaPORT_NUMBER = 4000
# apt-get install -y texlive-latex-extra --no-install-recommends
# apt-get install -y libopenvas9-dev
# openvasmd --user = admin --new-password = password
# openvasmd --create-user = new_user# gsad --guest-username = new_user --guest-password
https: //x.x.x.x: 4000
第一個步驟先打開控制台 在右上角搜尋防火牆 點擊 Windows 防火牆 再點擊左邊下面有個進階設定 會出現以下 點擊左邊輸入規則 再點擊新增規則 點擊程式直接下一步 選擇要禁止的程式 在點下一步 ...