hackthebox – Bank

nmap nmap -sS -sV -p- -oN bank.txt 10.10.10.29 The result as follows: Nmap scan report for 10.10.10.29 Host is up (0.0049s latency). Not shown: 65532 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.8 (Ubuntu Linux; protocol 2.0) 53/tcp open domain ISC BIND 9.9.5-3ubuntu0.14 (Ubuntu Linux) 80/tcp open http Apache httpd … Continue reading hackthebox – Bank

hackthebox – Buff

Nmap scan nmap -A -Pn -oN nmap.txt 10.10.10.198 TCP 8080 is found Gym management software This is the main page of the gym management web application On the contact page it shows the Gym Management Software 1.0. Gym Management Software vulnerability By searching the web there is a vulnerability of Gym Management software version 1.0 … Continue reading hackthebox – Buff

python – Generating RSA key pairs with pycryptodome module

Thank you for the creator of pycryptodome module, this module has made RSA key pair easy. This recipe presents a function for generating private and public key pair. from Crypto.PublicKey import RSA # pycryptodome def rsa_key_gen(bits=2048, privatekey_path=RSA_PRIVATE_KEY, pubkey_path=RSA_PUBLIC_KEY): private_key = RSA.generate(bits) with open(privatekey_path, "wb") as privkey_file: privkey_file.write(private_key.export_key()) with open(pubkey_path, "wb") as pubkey_file: pubkey_file.write(private_key.publickey().export_key())

Golang – Writing a command line program with urfave/cli package

The code recipe is modified from this video made by tutorialedge.net, this recipe does these: Help interface. To find out ipv4 address from fqdn: cli --host http://www.google.com ip Resolve FQDN to IPv4 addresses. To find out cname from given host: cli --host google.com cname Get the cname from given host. To find out mx records … Continue reading Golang – Writing a command line program with urfave/cli package

Golang – Find absolute path of a file.

This recipe finds the absolute path of the specified filename, the problem with this code is that it returns the first match and hence only useful if the filename is unique. package main import ( "fmt" "log" "os" "path/filepath" ) var absPath string // global variable to store absolute path of filename. func findFileAbsPath(basepath, filename … Continue reading Golang – Find absolute path of a file.