Saturday, January 25, 2020

Python3 Version of simpleHTTPserver or Where Did SimpleHTTPserver Go in Python3

For those familiar with using python 2's simpleHTTPserver, it is a fast and easy way to start up a web server that can show contents of a directory.


In Python 2.X running python -m simpleHTTPserver starts a web server on port 8000 from the current directory.

In Python 3.X the new way to start up a simple http server is python3 -m http.server

By default the webserver spawned will use port 8000. You can specify a port after http.server
python3 -m http.server 9000


Starting http server:

Browsing the web server, locally with http://localhost:8000, notice you can now view/download/etc files from the directory the script was run from. 


Saturday, January 11, 2020

Quickly Update Kali Linux Date/Time with NTP

A quick way to update the system date/time on Kali when not accurate is to restart the ntp service.

service ntp restart

As long as your Kali machine has Internet access, the system date/time should automatically update.

Another handy command to use on Kali is the service --status-all command to show all running services.

If you are curious what a service is doing, check the logs with journalctl -u servicename (ntp.)