Posts

Showing posts with the label ethical hacking

Wordpress Username Enumeration

 In Wordpress we can do a username enumeration in several ways. We can do it via Metasploit or Nmap NSE Script. But if both of these are not available or we want to use another simpler method, here is one mentioned below. A Bash Script to enumerate Wordpress usernames. Copy the below Bash code text into a .sh file. Change the website to URL to your desired URL. Change the range of user ids default is 1 to 20. Then chmod the file to make it executable ( chmod +x filename.sh)(in linux terminal) and run ./filename.sh. BASH Code:  for i in {1..20}; do curl -s -L -i http://www.your-desired-website/?author=$i | grep -E -o "\" title=\"View all posts by [a-z0-9A-Z\-\.]*|Location:.*" | sed 's/\// /g' | cut -f 6 -d ' ' | grep -v "^$"; done CYB3RTR0N , 574r570rm

Basic python program in linux to see if a port is open

Below is a simple python program in linux to see if a port is open or close. #!/usr/bin/python import socket ip = raw_input("Enter the IP Address: ") port = input("Enter the Port Number: ") sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if sock.connect_ex((ip,port)):         print "Port",port, "is closed" else:         print "Port",port, "is open" We will use which python.py to know about the location of python, so we can use it in hash bang. next we are importing the socket library. taking as input and port are self explanatory. SOCKET constants and functions are used to get socket connected to sock variable. connect_ex will throw an exception if the port is closed , and we are utilizing it to display "the port is closed" else it will be open. make it executable and run,... I am not going into details, as there are many tutorials out there to learn the basics. CYB3RTR0N