Important
NOW WITH AN EXTENSION BUILT-IN
A web server implementation similar to NGINX designed to work against unauthorized web scraping.
SSWS/
├── api/
│ └── summarise.go # API client for webpage summarization
├── cypher/
│ └── encryption.go # Encryption logic implementation
├── extension/ # Chrome extension files
│ ├── background.js # Extension background script
│ ├── content.js # Content script for webpage modification
│ ├── manifest.json # Extension manifest
│ ├── popup.html # Extension popup UI
│ └── popup.js # Popup UI logic
├── images/
│ └── url.png # Image assets
├── keys/ # Encryption key management
│ ├── keygen.py # Key generation script
│ ├── keytest.py # Key testing utilities
│ ├── private_key.pem # Private key file
│ ├── public_key.pem # Public key file
│ └── requirements.txt # Python dependencies
├── public/ # Server output directory
│ ├── index.html # Encrypted/jumbled content
│ ├── index.html.json # Encryption metadata
│ └── summary.html # Generated summary
├── static/ # Original content directory
│ └── index.html # Source webpage
├── utils/ # Utility scripts
│ ├── webpage-summary.py # Summary generation
│ └── webscrape.py # Test scraping script
├── .gitignore # Git ignore rules
├── go.mod # Go module file
├── go.sum # Go dependencies checksum
├── main.go # Server entry point
└── README.md # Project documentation- Serves jumbled/poisoned content to web scraping bots
- Test scraping script to verify behavior
- Chrome extension to undo the jumbled content
This project is a simple webserver that jumbles up the content from an input website that we put in the static folder. When the server starts up the contents from the static gets loaded and jumbled (in later version posioned for LLMs) and gets placed in the public folder, a simple web server then serves the files from this directory to address :
http://localhost:8080
The content deliverd to the client will be jumbled (later poisoned) content an examples for this would be:
Original content
<p>Strict regulations are needed to ensure ethical and legal data collection practices.</p>Jumbled (Later poisoned) content
<s>Vwulfw uhjxodwlrqv duh qhhghg wr hqvxuh hwklfdo dqg ohjdo gdwd froohfwlrq sudfwlfhv.</s>This can be undone using browser extension, that will unscramble the Jumbled content and converts it back to the Original content.
Note
In the case of poisoned text we plan to implement some way of sending back the original content.
- Go 1.20 or later
- Python 3.x (for testing scraper)
- Chrome browser (for extension)
-
Generate keys using the
keys/keygen.py, the requirements for the key gen programs is given in thekeys/requrements.txt -
Public and private keys will be generated and these will be used to encrypt and decrypt the data. The client extension expects the private key named as
private_key.pyandpublic_key.pyis the public key that the server uses. -
Create a folder with the name
staticand put the content of your website in this folder. -
Start the Go server:
go run .
The server will start on port 8080 by default.
To test the anti-scraping measures:
python webscrape.pyThe extension component is located in the extension directory and can be loaded into Chrome for additional functionality.
The steps are:
-
Open the url
chrome://extensions/
Note
This is the extensions page for chrome where you will see all your install extensions
-
Toggle developer mode
On the top and right corner of the page there will be a toggle to turn on developer mode, turn this on as we want to load our extension.
-
Load an upacked extension
Once this option is choosed a folder picker should open up and then you have to select the
extensionfolder from this project. -
Use
Now you should be able to see the extension on your browser and you can activate it by clicking on it.
Caution
This is the extensions is updating the contents on the website, this will work on all websites but may lead to undesirable results
This project is licensed under the MIT License. See the LICENSE file for details.
Note: This server is designed as an educational tool to demonstrate anti-scraping measures and should be used responsibly.



