Ejemplo n.º 1
0
def extractJsFromHtmlDir(inputdir, outputdir):
	if not utils.checkdir(inputdir, outputdir):
		return
	infiles = utils.lsresult(inputdir)
	for infile in infiles:
		outfile = outputdir + '/' + infile
		infile = inputdir + infile
		if utils.checkfile(infile, outfile):
			extractJsFromHtml(infile, outfile)
Ejemplo n.º 2
0
def jsdeobfuscatedir(inputdir, outputdir):
	if os.path.exists(outputdir):
		if os.path.isfile(outputdir):
			print 'The out dir is conflict with other filename'
			return
		shutil.rmtree(outputdir)
	os.makedirs(outputdir)
	# if not utils.checkdir(inputdir, outputdir):
	# 	return
	infiles = utils.lsresult(inputdir)
	for infile in infiles:
		outfile = outputdir + '/' + infile
		infile = inputdir + '/' + infile
		if utils.checkfile(infile, outfile):
			jsdeobfuscatefile(infile, outfile)