Configuring Django on Ubuntu

At the time of the 2018 Spring Festival, heaven knows what I went through, posting a blog article on the fourth day of the new year. Django was actually configured before the New Year; I had just learned some knowledge about developing web applications with python at that time, so I configured it along the way. Environment used for the configuration System: Ubuntu16.04 (LTS) python version: python3.6 (using Anaconda to create a virtual environment) Preparation Uninstalling an old version of Django If you are upgrading from an older version of Django, you need to deal with the old version a little. ...

February 19, 2018 · 2 min · Simplestory

Configuring Tensorflow on Linux

Borrowing a line from the TensorFlow Chinese community: TensorFlow, an open-source magic tool for artificial intelligence. Environment used for the configuration System: Ubuntu16.04 (LTS) python version: python3.6 (using Anaconda to create a virtual environment) Nvidia card: Geforce 920M (if there is no Nvidia card, only the CPU version can be installed) Installing Tensorflow tensorflow has two versions, CPU and GPU; I created two python virtual environments and installed these two versions separately. Below I record this painful installation process ...

February 4, 2018 · 6 min · Simplestory

Linux Penetration Testing Commands

Below is a penetration testing memo for Linux machines; I came across it on the internet by chance and copied it over here. Penetration testing a Linux machine Command Description netstat -tulpn Show network ports in Linux together with the corresponding ID (PID) watch ss -stplu Observe TCP and UDP ports in real time through sockets lsof -i Show established connections macchanger -m MACADDR INTR Change the MAC address on KALI Linux ifconfig eth0 192.168.2.1/24 Set the IP address in Linux ifconfig eth0:192.168.2.3/24 Add an IP address to an existing network interface in Linux ifconfig eth0 hw ether MAC ADDR Change the address in Linux using ifconfig ifconfig eth0 mtu 1500 Change the MTU size with ifconfig; change 1500 to the MTU you want dig -x 192.168.1.1 Perform a reverse lookup on an IP address host 192.168.1.1 Perform a reverse lookup on an IP address; useful when dig is not installed dig @192.168.2.2 domain.com -t AXFR Perform a DNS zone transfer with dig host -l domain.com nameserver Perform a DNS zone transfer with host nbtstat -A x.x.x.x Obtain the domain name corresponding to an IP address ip addr add 192.168.2.22/24 dev eth0 Add a hidden IP address that does not show up when running ifconfig tcpkill -9 host goole.com Block access to goole.com from the host echo "1">/proc/sys/net/ipv4/ip_forward Enable IP forwarding, turning the Linux box into a router — which makes it convenient to control the traffic routed through this box echo "8.8.8.8">/etc/resolv.conf Use Goole's DNS System information commands Very helpful for local enumeration ...

January 20, 2018 · 9 min · Simplestory

MySQL Data File Paths on Linux

Server version: 5.7.20-0ubuntu0.16.04.1 (Ubuntu) After logging into MySQL, you can use the following command to query where the related files are stored: show variables like '%dir%'; The output is shown below: Usually these are: The default location of the database files is: /usr/share/mysql/ Configuration file: /etc/mysql/my.cnf Database directory: /var/lib/mysql Configuration directory: /etc/share/mysql (mysql.server command and configuration files) MySQL related commands: /usr/bin Startup scripts: /etc/init.d/ One way to start mysql safely: /usr/bin/mysqld_safe-user=root&

December 1, 2017 · 1 min · Simplestory