Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from schoenbergerb/update-docs-and-version
Browse files Browse the repository at this point in the history
Update docs and version
  • Loading branch information
schoenbergerb authored Jul 28, 2022
2 parents a515677 + 67155c9 commit 7e05a8c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
49 changes: 31 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<br />

# Concept
The key behind is to use any true-type font from which _noscrape_ generates a new version with shuffeld unicodes and nothing what one can use to calculate them back. Strings and Integers become obfuscated and are only readable by using the generated obfuscation-font.
The key behind is to use any true-type font from which _noscrape_ generates a new version with shuffled unicodes and nothing what one can use to calculate them back. Strings and Integers become obfuscated and are only readable by using the generated obfuscation-font.

<br /><br />
What we cannot remove from inside the font are the glyph-paths. At the moment the paths are obfuscated by shifting them randomly a little bit _( @see [obfuscation strength multiplier](#strength) )_ that makes it hard to calculate them back but not impossible or maybe "guessable" by a ML-Algorithm.<br /> Would be nice if someone come up with a better solution or help to improve this 😅
Expand Down Expand Up @@ -53,10 +53,13 @@ This should not be problem with prerendered pages. For API-Requests, one sould c
```typescript
// server-side obfuscation
const object = { title: "noscrape", text: "obfuscation" }
const { font, value } = obfuscate<any>(object, 'path/to/your/font.ttf')
const { font, value } = obfuscate(object, 'path/to/your/font.ttf')

```
⬇⬇⬇⬇ provide data ⬇⬇⬇⬇
<br />
<p style="text-align: center">⬇⬇⬇⬇&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provide data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⬇⬇⬇⬇</p>
<br />

```javascript
// font will be provided as buffer
const b64 = font.toString(`base64`)
Expand Down Expand Up @@ -93,30 +96,40 @@ const b64 = font.toString(`base64`)

<br />

## strength
* obfuscation strength multiplier ( default: 1 )
* all under 0.1 makes no sense ( paths can be simply back calculated )
* all over 10 makes no sense ( looks like 💩 )
### strength

> obfuscation strength multiplier ( default: 1 ) <br />
> all under 0.1 makes no sense ( paths can be simply back calculated ) <br />
> all over 10 makes no sense ( looks like 💩 )
<img src="./docs/obfuscationstrength.jpg">

<br />
<br />

## characterRange
[character range](https://www.ling.upenn.edu/courses/Spring_2003/ling538/UnicodeRanges.html) used for encryption
### characterRange

> [character range](https://www.ling.upenn.edu/courses/Spring_2003/ling538/UnicodeRanges.html) used for encryption
- PRIVATE_USE_AREA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ___DEFAULT___
- LATIN
- GREEK
- CYRILLIC
- HIRAGANA
- KATAKANA
> - PRIVATE_USE_AREA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ___DEFAULT___
> - LATIN
> - GREEK
> - CYRILLIC
> - HIRAGANA
> - KATAKANA
<br />
<br />
<br />
<br />

### lowMemory


> DEFAULT: **false**
> use only if you do not have a lot of memory and noscrape cannot load the given font file
<br />
<br />
<br />

# Contributions

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@noscrape/noscrape",
"version": "0.4.1",
"version": "0.4.2",
"description": "protect your content from scraping",
"homepage": "https://noscrape-nexample.vercel.app",
"keywords": [
Expand Down

0 comments on commit 7e05a8c

Please sign in to comment.