Giter Club home page Giter Club logo

multi_block's Introduction

multi_block

유해 사이트가 100만개이라고 가정을 하고 사용자가 접속하려는 사이트의 Host 이름이 100만개 리스트 안에 들어 갔을 때 패킷을 차단하는 프로그램을 작성

Usage

./multiblock
코드 내부에 iptables 와 netfilter_queue 명령어를 저장해뒀으니 그냥 쓰시면 됩니다.

코드 설명

python 파일로 일단 백만개의 url들을 각 .com .kr등등의 파일들로 나누고 dot_list라는 폴더에 저장한다.
file pointer를 오픈시켜서

cat /bin/cat 경로/dot_list/url에 붙는 단어 | grep "필터링 될 url"
의 방식으로 검색하였다.
전역 변수 flag을 이용하여서 해당 Host 들을 필터링하였다.

보안할 점

url에 접속할 때 정확하게 url 입력해줘야한다. 예를 들어 clock.zone 이라 안하고 clock.zone/ 이라해도 그대로 뚫리니 문제.

multi_block's People

Contributors

tr0y-kim 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.