Enviado em 21/03/2024 - 15:11h
boas glr.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <errno.h>
int main(){
char result[256];
char user[50];
char word[256];
int sock, cnx;
char ip[15];
FILE *open;
char buf[256];
printf("BruteFTP v1.0 by major\n");
printf("[i]=-************-=[i]\n");
printf("*******************************\n");
printf("IP: ");
scanf("%[^\n]", ip);
printf("User: ");
getchar();
scanf("%[^\n]", user);
printf("Wordlist: ");
getchar();
scanf("%[^\n]", word);
open = fopen(word, "rb");
if(open == NULL){
perror("I/O Error");
exit(EXIT_FAILURE);
} else{
struct sockaddr_in skt={
.sin_family=AF_INET,
.sin_port = htons(21),
.sin_addr.s_addr = inet_addr(ip)
};
sock = socket(AF_INET, SOCK_STREAM, 0);
if(sock == -1){
perror("Erro de abertura");
exit(EXIT_FAILURE);
}
else{
cnx = connect(sock, (struct sockaddr_in *) &skt, sizeof(skt));
if(cnx == -1){
perror("Imposivel conectar");
exit(EXIT_FAILURE);
}
else{
strcat(buf, "USER ");
strcat(buf, user);
send(sock, buf, strlen(buf), 0);
read(sock, result, 256);
puts(result);
close(sock);
}
close(cnx);
close(sock);
}
}
return 0;
}
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Atualizar Debian Online de uma Versão para outra
Instalando Discord no Debian 13
Instalar driver Nvidia no Debian 13
Redimensionando, espelhando, convertendo e rotacionando imagens com script
Software livre - será que eu estou tão errado assim? (0)
Layout do teclado KDE Palsma 5.27.5 com x11 (1)
O que você está ouvindo agora? [2] (216)