#-*- coding:utf-8 -*- 
import jieba
import random
import codecs
import sys
import string
import chardet


#chos_symbol_header = u'😀😁😃😄☺🙂😉😏👩👧🙋👉'
chos_symbol_tailer = u'★☆✦✧☻☼☽☾♀♁♞✓✔♩♪♫♬'
chos_symbol_midle = u'.、︰﹒.﹐﹑ˋ´﹎﹍﹒,′‵‘~﹏﹌﹋—–―_¯ ̄﹍﹉'
def getcontentfromfile(in_filename):
    try:
        f = open(in_filename,'r')
        l = f.readlines()
        return l
    except:
        print 'ERROR WHILE OPENING ' + in_filename

def splitstring(in_ad):
    if '' != in_ad:
        seg_list = jieba.cut(in_ad)
        return seg_list
    else:
        return ''

if __name__ == '__main__':
    reload(sys) 
    sys.setdefaultencoding("utf-8")

    if 2 != len(sys.argv):
        content = getcontentfromfile('ad.txt')
    else:
        content = getcontentfromfile(sys.argv[1])

    output = codecs.open('output.txt','w+','utf-8')
    for item in content:
        buf = u''
        words = splitstring(item.strip())
        for word in words:
            buf = buf + word + ''.join(random.sample(chos_symbol_midle,1)).encode('utf-8') 
        h = ''.join(random.sample(chos_symbol_tailer,1))
        t = ''.join(random.sample(chos_symbol_tailer,1))
        output.write(h.encode('utf-8') +  buf.encode('utf-8') + t.encode('utf-8')  +'\r\n'.encode('utf-8'))
    output.close()

 

使用方法简介如下:

生成文本文件: 1:每条内容为一行 存成文本文件 2:每行的长度无限制 3:每行内容独立,可以相同也可以不同

软件在 读取你提供的文本文件混淆添加随机符号后,生成新的output.txt文件 混淆后的结果存在output.txt 文件中

将文本文件用鼠标拖动到Adchos.exe 图标上,即可自动生成output.txt

也可以将文本文件 命名为ad.txt 放到与Adchos.exe 相同的目录下,双击Adchos.exe 即可自动生成output.txt

posted on 2017-07-26 19:36  shaivas  阅读(367)  评论(0编辑  收藏  举报