mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
new commit - change strings
new commit - change strings
This commit is contained in:
@ -57,6 +57,7 @@ def copy_tokens(cur, tokenpath) :
|
|||||||
subprocess.call(["cp " + cur + "/" + "memcmp-strs/*" + " " + cur + "/" + tokenpath + "/."] ,shell=True)
|
subprocess.call(["cp " + cur + "/" + "memcmp-strs/*" + " " + cur + "/" + tokenpath + "/."] ,shell=True)
|
||||||
subprocess.call(["cp " + cur + "/" + "lits/*" + " " + cur + "/" + tokenpath + "/."] ,shell=True)
|
subprocess.call(["cp " + cur + "/" + "lits/*" + " " + cur + "/" + tokenpath + "/."] ,shell=True)
|
||||||
subprocess.call(["cp " + cur + "/" + "strtool-strs/*" + " " + cur + "/" + tokenpath + "/."] ,shell=True)
|
subprocess.call(["cp " + cur + "/" + "strtool-strs/*" + " " + cur + "/" + tokenpath + "/."] ,shell=True)
|
||||||
|
subprocess.call(["find "+tokenpath+" -size 0 -delete"],shell=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ if [ -d "codeql-home" ]; then
|
|||||||
echo "Exist !"
|
echo "Exist !"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sudo apt install build-essential libtool-bin python3-dev automake git vim wget -y
|
|
||||||
mkdir codeql-home
|
mkdir codeql-home
|
||||||
cd codeql-home
|
cd codeql-home
|
||||||
git clone https://github.com/github/codeql.git codeql-repo
|
git clone https://github.com/github/codeql.git codeql-repo
|
||||||
@ -12,6 +11,7 @@ wget https://github.com/github/codeql-cli-binaries/releases/download/v2.4.6/code
|
|||||||
unzip codeql-linux64.zip
|
unzip codeql-linux64.zip
|
||||||
mv codeql codeql-cli
|
mv codeql codeql-cli
|
||||||
export "PATH=~/codeql-home/codeql-cli/:$PATH"
|
export "PATH=~/codeql-home/codeql-cli/:$PATH"
|
||||||
|
echo "export PATH=~/codeql-home/codeql-cli/:$PATH" >> ~/.bashrc
|
||||||
codeql resolve languages
|
codeql resolve languages
|
||||||
codeql resolve qlpacks
|
codeql resolve qlpacks
|
||||||
echo "export PATH=~/codeql-home/codeql-cli/:$PATH" >> ~/.bashrc
|
codeql
|
@ -46,9 +46,8 @@ def do_string_analysis(corpdir, infile1):
|
|||||||
str11 = str11.replace("\n","")
|
str11 = str11.replace("\n","")
|
||||||
str11 = str11.lstrip()
|
str11 = str11.lstrip()
|
||||||
str11 = str11.rstrip()
|
str11 = str11.rstrip()
|
||||||
print("all strings : %s" % str11)
|
|
||||||
str11 = str(str11)
|
str11 = str(str11)
|
||||||
if ((" " in str11 ) or (")" in str11) or ("(" in str11)):
|
if ((" " in str11 ) or (")" in str11) or ("(" in str11) or ("<" in str11) or (">" in str11)) :
|
||||||
print("Space / Paranthesis String : %s" % str11)
|
print("Space / Paranthesis String : %s" % str11)
|
||||||
else :
|
else :
|
||||||
with open(corpdir+'/memcmp-str{0}'.format(n), 'w') as file:
|
with open(corpdir+'/memcmp-str{0}'.format(n), 'w') as file:
|
||||||
|
@ -31,13 +31,18 @@ You can write other CodeQL scripts to extract possible effective tokens if you t
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
Before proceed to installation make sure that you have the following packages by installing them :
|
||||||
|
```shell
|
||||||
|
sudo apt install build-essential libtool-bin python3-dev python3 automake git vim wget -y
|
||||||
|
```
|
||||||
The usage of Autodict-QL is pretty easy. But let's describe it as :
|
The usage of Autodict-QL is pretty easy. But let's describe it as :
|
||||||
|
|
||||||
1. First of all, you need to have CodeQL installed on the system. we make this possible with `build-codeql.sh` bash script. This script will install CodeQL completety and will set the required environment variables for your system, so :
|
1. First of all, you need to have CodeQL installed on the system. we make this possible with `build-codeql.sh` bash script. This script will install CodeQL completety and will set the required environment variables for your system.
|
||||||
|
Do the following :
|
||||||
```shell
|
```shell
|
||||||
# chmod +x codeql-build.sh
|
# chmod +x codeql-build.sh
|
||||||
# sudo ./codeql-build.sh
|
# ./codeql-build.sh
|
||||||
|
# source ~/.bashrc
|
||||||
# codeql
|
# codeql
|
||||||
```
|
```
|
||||||
Then you should get :
|
Then you should get :
|
||||||
|
@ -46,9 +46,8 @@ def do_string_analysis(corpdir, infile1):
|
|||||||
str11 = str11.replace("\n","")
|
str11 = str11.replace("\n","")
|
||||||
str11 = str11.lstrip()
|
str11 = str11.lstrip()
|
||||||
str11 = str11.rstrip()
|
str11 = str11.rstrip()
|
||||||
print("all strings : %s" % str11)
|
|
||||||
str11 = str(str11)
|
str11 = str(str11)
|
||||||
if ((" " in str11 ) or (")" in str11) or ("(" in str11)) or ("<" in str11) or (">" in str11) :
|
if ((" " in str11 ) or (")" in str11) or ("(" in str11) or ("<" in str11) or (">" in str11)) :
|
||||||
print("Space / Paranthesis String : %s" % str11)
|
print("Space / Paranthesis String : %s" % str11)
|
||||||
else :
|
else :
|
||||||
with open(corpdir+'/seed-str{0}'.format(n), 'w') as file:
|
with open(corpdir+'/seed-str{0}'.format(n), 'w') as file:
|
||||||
|
@ -46,9 +46,8 @@ def do_string_analysis(corpdir, infile1):
|
|||||||
str11 = str11.replace("\n","")
|
str11 = str11.replace("\n","")
|
||||||
str11 = str11.lstrip()
|
str11 = str11.lstrip()
|
||||||
str11 = str11.rstrip()
|
str11 = str11.rstrip()
|
||||||
print("all strings : %s" % str11)
|
|
||||||
str11 = str(str11)
|
str11 = str(str11)
|
||||||
if ((" " in str11 ) or (")" in str11) or ("(" in str11)):
|
if ((" " in str11 ) or (")" in str11) or ("(" in str11) or ("<" in str11) or (">" in str11)) :
|
||||||
print("Space / Paranthesis String : %s" % str11)
|
print("Space / Paranthesis String : %s" % str11)
|
||||||
else :
|
else :
|
||||||
with open(corpdir+'/strcmp-str{0}'.format(n), 'w') as file:
|
with open(corpdir+'/strcmp-str{0}'.format(n), 'w') as file:
|
||||||
|
@ -46,9 +46,8 @@ def do_string_analysis(corpdir, infile1):
|
|||||||
str11 = str11.replace("\n","")
|
str11 = str11.replace("\n","")
|
||||||
str11 = str11.lstrip()
|
str11 = str11.lstrip()
|
||||||
str11 = str11.rstrip()
|
str11 = str11.rstrip()
|
||||||
print("all strings : %s" % str11)
|
|
||||||
str11 = str(str11)
|
str11 = str(str11)
|
||||||
if ((" " in str11 ) or (")" in str11) or ("(" in str11)):
|
if ((" " in str11 ) or (")" in str11) or ("(" in str11) or ("<" in str11) or (">" in str11)) :
|
||||||
print("Space / Paranthesis String : %s" % str11)
|
print("Space / Paranthesis String : %s" % str11)
|
||||||
else :
|
else :
|
||||||
with open(corpdir+'/strncmp-str{0}'.format(n), 'w') as file:
|
with open(corpdir+'/strncmp-str{0}'.format(n), 'w') as file:
|
||||||
|
Reference in New Issue
Block a user