GithubHelp home page GithubHelp logo

frenzy8 / http-anti-flood Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 4.0 19 KB

A http-anti flood code for HTTP, recomended used for GTPS/Another private-servers game.

Home Page: https://saweria.co/FrenzyS6

License: Boost Software License 1.0

JavaScript 100.00%
http nodejs antiflood flood http-server antiddos layer7 protected growtopia javascript

http-anti-flood's Introduction

http-anti-flood

A http-anti flood code for HTTP, recomended used for GTPS/Another private-servers game.

  • Feel free to star :) if this helped you..
  • Feel free to report a bugs :) if there is a bugs..

explanations and other

So basically, this http-code will detect the flooder. whoever is detected by the flooder will be immediately blocked by your Windows Firewall. it is recommended for GTPS (Growtopia-Private-Servers) because this is very helpful for those who are often affected by DDoS Attacks.

functions code

function blockthem () {
exec(`netsh advfirewall firewall add rule name="BLACKLIST" dir=in action=block remoteip="${ipAddress}"`, (error, stdout, stderr, spawn) => {
console.log(`[${ipAddress}] Connection have been Blocked`)
 });
}
  • servers data:
function serverdataread () {
	if(fs.existsSync('C:/xampp/htdocs/growtopia/server_data.php')) {
		let data = fs.readFileSync('C:/xampp/htdocs/growtopia/server_data.php','utf8')
		res.write(data)	
	} else {
        res.write(`server|${ipAddress}\nport|17091\ntype|1\n#maint|HTTP`);
	}
}
  • so if there is a function in your http code. you can write blockthem() to block a IPs
  • exec commands
exec(`netsh advfirewall firewall add rule name="BLACKLIST" dir=in action=block remoteip="${ipAddress}"`, (error, stdout, stderr, spawn) => {
// Do something here.
});

Obtained from:

http-anti-flood's People

Contributors

frenzy8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.