Giter Club home page Giter Club logo

cc-attack's Introduction

   /////    /////    /////////////
  CCCCC/   CCCCC/   | CC-attack |/
 CC/      CC/       |-----------|/ 
 CC/      CC/       |  Layer 7  |/ 
 CC/////  CC/////   | ddos tool |/ 
  CCCCC/   CCCCC/   |___________|/

CC-attack

A script for using socks4/5 or http proxies to attack http(s) server.

News:

  • Added Support of HTTP proxies
  • Added More proxies api to download

Info:

  • Using Python3
  • Added more human-like options
  • Http Get/Head/Post/Slow Flood
  • Random Http Header/Data
  • Socks4/5 Proxies Downloader
  • Socks4/5 Proxies Checker
  • Customize Cookies
  • Customize Post Data
  • Support HTTPS
  • Support Socks4/5

Showcase

Using multiproc.sh with socks4 on a vps

Install

pip3 install requests pysocks
git clone https://github.com/Leeon123/CC-attack.git
cd CC-attack

Usage

python3 cc.py <arguments>
===============  CC-attack help list  ===============
   -h/help   | showing this message
   -url      | set target url
   -m/mode   | set program mode
   -data     | set post data path (only works on post mode)
             | (Example: -data data.json)
   -cookies  | set cookies (Example: 'id:xxx;ua:xxx')
   -v        | set proxy type (4/5/http, default:5)
   -t        | set threads number (default:800)
   -f        | set proxies file (default:proxy.txt)
   -b        | enable/disable brute mode
             | Enable=1 Disable=0  (default:0)
   -s        | set attack time(default:60)
   -down     | download proxies
   -check    | check proxies
=====================================================

Some example of the usage

Download socks5 proxies as proxy.txt:

python3 cc.py -down -f proxy.txt -v 5

Attack a target with custom proxies list(socks4.txt) for 30 seconds :

python3 cc.py -url http://target.com -f socks4.txt -v 4 -s 30

Usage of multiproc.sh

This script is using for increasing the performance of cc.py.
Due to the suck performance of python since it has a GIL lock,
And I am lazy to make a multiprocess version.
There is a option for linux user to increase their performance of cc.py

This script basicly just run cc.py multiple times to make it "multi-processing"

First, put this script and cc.py in the same folder.

Then prepare the proxies list by yourself or just run "python3 cc.py -down -v 4" (-v socks version)

After that, change the number of process.

At last, change atk_cmd to your command and run the script by "bash multiproc.sh"

Example setup of multiproc.sh (-v socks version) (-s attack time)

atk_cmd="python3 cc.py -url http://target.com -v 4 -s 60"

#number of process that you want
process=10

cc-attack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cc-attack's Issues

How to solve it

Traceback (most recent call last):
File "cc.py", line 11, in
import socks
ModuleNotFoundError: No module named 'socks'

I hope this program can support Multithreading

I want to test my servers,and i find a computer with 4 cores of cpu.but when i run this cc-attack,i find that only one core be used and others are free!So the result isn't good, it only has hundreds of Concurrencies.
I hope you can add the support for Multithreading,thanks.
Hope you can be successful with your codes

question

Master!
I had a question does cc-attack also hide your ip4 address or not?
Greetz to you!

Bug errors on SLOW attack

after reaching the thread of my set example i set a thread of 500

between 415 - 460 connections

Exception in thread Thread-345:ections: 455
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "cc.py", line 294, in slow
s.send("X-a: {}\r\n".format(random.randint(1, 5000)).encode("utf-8"))
File "/usr/lib/python3/dist-packages/socks.py", line 387, in send
return _BaseSocket.send(self, bytes, flags, **kwargs)
ConnectionResetError: [Errno 104] Connection reset by peer

errors shows

Help

Hello dear!
Can you pls upgrade socks5 list
You get my star ☆ anyway!
Very thanks!

Update

Can you update the socks list
That would be awesome!

Traceback (most recent call last):

how fix?
Traceback (most recent call last):
File "cc.py", line 361, in
main()
File "cc.py", line 302, in main
ip = str(input("> Host/Ip:"))
File "", line 1
79.133.43.229
SyntaxError: invalid syntax

Magnification?

Hello, can you explain what to put in magnification ?

Problem?

Why is it that when I put "https" as "n" or port 80, most socks are marked offline?

line 11

Traceback (most recent call last):
File "cc.py", line 11, in
import socks
ModuleNotFoundError: No module named 'socks'

pip3 install requests pysocks not working for me?

script is not working

when I try to to attack, script is throwing an error

Exception in thread Thread-384:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "cc.py", line 230, in post
proxy = Choice(proxies).strip().split(":")
File "/usr/lib/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
Exception in thread Thread-179:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "cc.py", line 230, in post
proxy = Choice(proxies).strip().split(":")
File "/usr/lib/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence

When I raise threads to 1000, it come this error

Exception in thread Thread-1920:
Traceback (most recent call last):
File "cc.py", line 213, in cc
proxy = random.choice(proxies).strip().split(":")
File "/usr/lib64/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "cc.py", line 240, in cc
s.close()
UnboundLocalError: local variable 's' referenced before assignment

Exception in thread Thread-1921:
Traceback (most recent call last):
File "cc.py", line 213, in cc
proxy = random.choice(proxies).strip().split(":")
File "/usr/lib64/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence

Random

A suggestion to add random head, get and post would be great for testing attacks that cheat the cache, cc is very easy to block using two lines in nginx :/

Suggestion

Hi sir @Leeon123 , as a suggestion, you could add ratelimit, because many targets when they receive a lot of requests will ban the whole class of IP, etc.
So ratelimit would help circumvent this protection.
You could also add cloudscraper (python) or this library https://github.com/pavlodvornikov/aiocfscrape/tree/na/update-to-latest-cfscrape to bypass cloudflare
String url, hiting all pages on the target (sending requests on all pages)
also some like https: // target //?q=% RANDOM% your script can't send req to this page
So, all these options could be added as an alternative if you want to use them, not by default.
the script cant read cf content
can u make headers like that, or to use custome headers

headers: {
                        'Connection': 'keep-alive',
                        'Cache-Control': 'no-cache',
                        'Pragma': 'no-cache',
                        'DNT': 1,
                        'Upgrade-Insecure-Requests': 1,
                        'User-Agent': user-agents,
                        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
                        'Accept-Encoding': 'gzip, deflate, br',
                        'Accept-Language': 'en-US,en;q=0.9',
                        'X-Forwarded-For': proxy-etc`
Of course, if you have time you want to do this

Slow attack is not working, dont send any req 

1.          none          | Rps: 0
                  2.          none          | Rps: 0
                  3.          none          | Rps: 0
                  4.          none          | Rps: 0
                  5.          none          | Rps: 0
                  6.          none          | Rps: 0
                  7.          none          | Rps: 0
                  8.          none          | Rps: 0
                  9.          none          | Rps: 0
                 10.          none          | Rps: 0

DDo

Do you have a source layer 7 ddos?
Very strong one

something is wrong with the proxy checker

when i grab the list of proxy that the script download and go to proxyscrape.com and check it with their online proxy checker it get list of proxy that work but from the script it says Total Worked:0 . please help

一个建议

您是否能考虑使用HTTP代理进行攻击?
因为目前的socks4/5代理数量少,容易被封
谢谢!

Hi

Please leave your Telegram contact information.
I would like to discuss with you about the optimization of your program.
Also, I will reward you some money for upgrading your software. (100$-200$)

Practical suggestion

Add an option to run the commands on a single line, so you could use the script together from others, such as "cc.py command cc host.com ...."

Connection error

Hello, They are some connection error on the slow but with the CC much more, if you I can help or I do something wrong could you tell me ?

Having a problem with getting a decent amount of working proxys

The first time I used this tool it worked great. Thanks very much for the hard work you put in. Its just since the second time I have been having a problem where it says checking proxy 0 proxys worked. Or maybe sometimes 1 proxy will work. And I try but then it freezes up most likely because I don't have enough proxys Is there a fix you have for that?

Exception from random.py when flooding

Hi!

With fresh Python 3 and the latest commit from your repo,
It keeps raising this exception when flooding from many threads.

From tags/v3.4 and older version, It works properly!
Does anyone run into the same problem as me?

Exception in thread Thread-620:
Traceback (most recent call last):

File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()

File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)

File "cc.py", line 293, in cc
proxy = Choice(proxies).strip().split(":")

File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/random.py", line 261, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence

求助!post模式无法使用!

请问POST数据究竟是怎样自定义?
我试图在脚本目录下创建一个文本文件,然后把数据放在里面,但是攻击时报错!
请说明使用方法,感激不尽!!

Master

thanks for this wonderful script. it worked great! unfortunately no longer plz fix itxD
Greetz!

求助

能发个详细点的安装,和使用教程吗?

BAD URL

could you make the script send requests to any url?
if the url is in https: // target-url / hit or https: //target.url/index.php format. the script does not work
Also headers like that @Leeon123
headers: {
'Accept-Encoding': 'gzip, deflate, br',
'Connection': 'keep-alive',
'Cache-Control': 'max-age=0',
'Referer': url,
'Upgrade-Insecure-Request': 1,
upgrade insiecure requests, etc

不懂问一下dalao

请问post数据是直接写在一个文本文件里面,然后使用时直接填写路径,是这样吗,不太懂操作,谢谢!

Hi there Sir Leeon123. Can you read this ?

I want you to bring back the port and ip option that use to attack
because the new CC-attack cant attack the normal website and i really love the older one with my friends too
It's easy to use and manual way
Thank you.

idk what is it.

Traceback (most recent call last):
File "cc.py", line 12, in
import requests
ModuleNotFoundError: No module named 'requests'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.