• Stars
    star
    1,330
  • Rank 35,335 (Top 0.7 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

文本盲水印:把信息隐匿到文本中,put invisible blind watermark into a text.

text_blind_watermark

Put message(blind watermark) into a text. so that the message is invisible, and the changes of the text are not perceptible.

PyPI Build Status codecov License Python Platform stars fork Downloads

Can be used in

  • Wechat
  • dingding
  • zhihu.com
  • ...

How to Use

install

>pip install text_blind_watermark

embed message into text:

from text_blind_watermark import TextBlindWatermarkThin

password = '20190808'
watermark = 'github.com/guofei9987'
text_blind_wm = TextBlindWatermarkThin(password=password)

wm = text_blind_wm.embed(watermark=watermark)
# This is example,you can put wm everywhere
text_embed = '这句话中有盲' + wm + '水印,你能提取出来吗?'
print(text_embed)

extract message from text

text_blind_wm_new = TextBlindWatermarkThin(password=password)
wm_extract = text_blind_wm_new.extract(text_embed)
print('提取内容:', wm_extract)

github.com/guofei9987

Method 2 is more robust

Alice Put her text watermark into a text:

from text_blind_watermark import TextBlindWatermark

watermark = "绝密:两点老地方见!"
text = "这句话中有盲水印,你能提取出来吗?" * 16
password = "20190808"

twm = TextBlindWatermark(password=password)
twm.read_wm(watermark=watermark)
twm.read_text(text=text)
text_embed = twm.embed()

print("打上盲水印之后:")
print(text_embed)

Then, you can paste this text to where you need.

Bob Extract the invisible watermark

from text_blind_watermark import TextBlindWatermark
password = "20190808"

twm_new = TextBlindWatermark(password=password)
wm_extract = twm_new.extract(text_embed)
print("解出的盲水印:")
print(wm_extract)

More Repositories

1

blind_watermark

Blind&Invisible Watermark ,图片盲水印,提取水印无须原图!
Python
5,562
star
2

scikit-opt

Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)
Python
5,138
star
3

HideInfo

一些小而美的信息隐藏技术:幻影坦克、藏物于音等
Python
454
star
4

guofei9987.github.io

个人博客,欢迎fork
JavaScript
105
star
5

pyLSHash

Locality Sensitive Hashing, fuzzy-hash, min-hash, simhash, aHash, pHash, dHash。基于 Hash值的图片相似度、文本相似度
Python
52
star
6

fourier_artist

用几个圆画任意图(傅里叶变换)
Python
42
star
7

github_star_counter

Count a GitHub user's total stars and forks
Python
29
star
8

vulgar_language_generator

俗不可耐语言生成器(中文)-俗不可耐的古风诗歌生成器,震惊体生成器
Python
24
star
9

star_counter

Count a GitHub user's stars and forks(在线统计账号star数量)
JavaScript
21
star
10

get_data

从知乎获取点赞数、收藏数、关注数,并自动推送,每小时运行
Python
19
star
11

pygraphs

A graph database based on Python,一个轻量级图数据库
Python
17
star
12

AHP

层次分析法
Python
13
star
13

hibird_python

Python调用C的例子(混合编程)
Python
11
star
14

guofei9987

Python
10
star
15

chrplotlib

plot graphs using chars
Python
10
star
16

python-maze

Generate a maze using Python
Python
9
star
17

text-blind-watermark

Text Blind Watermark in Rust
Rust
8
star
18

file2tree

file2tree
Python
7
star
19

c-algorithm

C语言实现动态数组、链表、Hash表、KMP等算法/数据结构
C
7
star
20

rust-algo

Rust 实现链表等数据结构
Rust
6
star
21

donate

打赏小控件
CSS
6
star
22

rs-graphs

Graph algorithms in Rust。用 Rust 实现的图算法
Rust
6
star
23

fuzzy-hash

fuzzy hash in python (from ssdeep)
C
5
star
24

plot2svg

A simple plot tool to generate small SVG files
Python
5
star
25

rs_lib

Rust调用C的例子(混合编程)
Rust
4
star
26

MyKnowledge

笔记记录,已迁移到 https://github.com/guofei9987/guofei9987.github.io
Python
4
star
27

pybert

一行代码实现bert,中文文本分类。基于 torch
Python
2
star
28

plans

已废弃
Python
2
star
29

pictures_for_blog

Pictures in my blog
JavaScript
2
star
30

signal-transforms

A comprehensive Rust library for discrete and wavelet transforms, including DCT, and more.
1
star
31

CrypTool

密码学相关算法
Python
1
star
32

slides

JavaScript
1
star
33

logging4

a tiny logging tool
Python
1
star
34

tmp

测试
Python
1
star
35

spank

Python
1
star
36

python_with_rust

Python 调用 Rust 项目
Rust
1
star