Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - BitCde

#1
Python / Url Fuzzer con Python para Descubrir Directorios
Septiembre 16, 2019, 07:56:39 PM
¿Como va todo chicos? Espero muy bien. Ultimamente he estado un poco descuidado con python, y ayer en modo de practica decidí hacer un script muy basiquito para descubrir directorios de una url.

Espero que sea de ayuda.

Código: php

#!/usr/bin/env python3
from colorama import init, Fore
import requests

#Colors stuffs --------------------------------------------------------------
init()
class color:
        red = Fore.RED
        blue = Fore.BLUE
        green = Fore.GREEN
        yellow = Fore.YELLOW
        cyan = Fore.CYAN
        error = Fore.RED+"["+Fore.RESET+"-"+Fore.RED+"]"+Fore.RESET+" "
        adv = Fore.YELLOW+"["+Fore.RESET+"!"+Fore.YELLOW+"]"+Fore.RESET+" "
        ble = Fore.BLUE+"["+Fore.RESET+"*"+Fore.BLUE+"]"+Fore.RESET+" "
        reset = Fore.RESET
#----------------------------------------------------------------------------

header = {'User-Agent':'Mozilla/5.0'} #Set UserAgent for Requests
file = "wordlist.txt" #Wordlist Here
fuzz_url = "https://example.com/" #url Here
found_dirs = []

#----------------------------------------------------------------------------

#FUNCTION MAIN---------------------------------------------------------------

def fuzzing(url, my_wordlist):

words = []

with open(my_wordlist, 'r', encoding="latin1") as f: #Open wordlist and read all lines

for line in f:
words.append(line.rstrip('\n')) #append all words to a List (words)

for word in words:

if word == "": #in case there is an empty line

pass

else:

fuzzing_url = url + word #Append the word to our url
response = requests.get(fuzzing_url,headers=header) #Make the requests
status = response.status_code #Get the response status code

if status in range(200, 299): #Verify that the client's request was received successfully
print(fuzzing_url + color.green+" ---- Found"+color.reset)
found_dirs.append(fuzzing_url)
else:
print(fuzzing_url + color.red+" ---- Not Found"+color.reset)

#----------------------------------------------------------------------------

#fuzzing(url,wordlist)
if __name__ == "__main__":
fuzzing(fuzz_url, file)

print("\nDISCOVERED DIRECTORS:")
for i in found_dirs:
print(i+color.green+" ---- Found"+color.reset)


de todas forma dejo esto por aqui - No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

Saludos.
#2
Python / Romano a Decimal y Viceversa
Julio 03, 2018, 10:22:02 PM
Que tal compañeros como andan? bueno verán llevo un tiempo aquí en este magnifico foro y no me había animado a hacer ningún post hasta ahora, pero en esta ocasión quiero compartirles un sencillo programita que desarrolle (cabe aclarar que soy un novato en python ;D pero ya saben lo que dicen "la practica hace al maestro"). Bueno volviendo al tema este pequeño script convierte de Romano a Decimal y Viceversa

Código: php

def num_roman():

    num_map = [(1000, 'M'), (900, 'CM'), (500, 'D'), (400, 'CD'), (100, 'C'), (90, 'XC'),
           (50, 'L'), (40, 'XL'), (10, 'X'), (9, 'IX'), (5, 'V'), (4, 'IV'), (1, 'I')]

    num = int(input("DECIMAL: "))
    roman = ''
    while num > 0:
        for i, r in num_map:
            while num >= i:
                roman += r
                num -= i

    print("\t-------------",roman,"-------------")

def roman_num():
    values=(("M", 1000),
        ("CM", 900),
        ("D",  500),
        ("CD", 400),
        ("C", 100),
        ("XC", 90),
        ("L", 50),
        ("XL", 40),
        ("X", 10),
        ("IX", 9),
        ("V", 5),
        ("IV", 4),
        ("I", 1)
        )

    result = 0
    lista = []
    romano = input("ROMANO: ")

    if romano.upper().count("X")>3 or romano.upper().count("I")>3 or romano.upper().count("V")>3 or romano.upper().count("L")>3 or romano.upper().count("D")>3 or romano.upper().count("M")>3:
       
        print("[X]")

    else:

        for i in range(len(romano.upper())):
            for letter, value in values:
                if romano.upper()[i] == letter:
                    lista.append(value)

        lista.append(0)

        for i in range(len(romano.upper())):
            if lista[i] >= lista[i+1]:
                result = result + lista[i]
            else:
                result = result - lista[i]

    print("\t-------------",result,"-------------")

def choose():

    print  (" _______|______________________________________|_______")
    print  (" \      |                                     |      /")
    print   ("  \     |         1)Decimal to Roman          |     /")
    print   ("  \     |         2)Roman to Decimal          |     /")
    print   ("  /     |____________________________ ________|     \ ")
    print  (" /_________)                                (________\ ")

    opc = int(input("INGRESE UNA OPCION: "))

    if opc == 1:
        num_roman()
    elif opc == 2:
        roman_num()
    else:
        print("Error")

if __name__ == '__main__':
    choose()


se que existen mejores maneras de hacerlo y mas completas, pero aun asi quise compartirlo con ustedes 

Saludos a todos!
#3
Wargames y retos / Re:Reto XSS #1 [Fácil]
Abril 29, 2018, 01:36:03 PM


reto completado  :)
#4
Wargames y retos / Re:Reto XSS [muy fácil]
Abril 21, 2018, 08:57:55 PM


muy bueno para los que se están iniciando :D