Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LiuYuancheng/ChatGPT_on_CTF
/ functions
Functions
31 in github.com/LiuYuancheng/ChatGPT_on_CTF
⨍
Functions
31
◇
Types & classes
2
↓ 8 callers
Function
error
Log error message: Log.debug("message %s", str(value))
src/Log.py:128
↓ 5 callers
Function
printArgs
Call built in print function to show the arguments in cmd terminal.
src/Log.py:98
↓ 4 callers
Function
getLogFilePath
Create the directory tree under the Log folder if necessary and finally return a fully qualified file name as string. - 'args' is a l
src/Log.py:158
↓ 3 callers
Method
appendLine
Append a new line in the config file. Args: line ([str]): line data. timeFlg (bool, optional): Add the time stamp bef
src/ConfigLoader.py:108
↓ 3 callers
Function
debug
log debug message: Log.debug("message %s", str(value))
src/Log.py:120
↓ 3 callers
Method
getJson
Get the config data under json format (python dict). Args: specChar (str, optional): The key/value pair split char: key<specChar>
src/ConfigLoader.py:80
↓ 2 callers
Method
buildFilename
Generate the latest logfile's name based on the current time.
src/Log.py:45
↓ 2 callers
Method
getLines
Get all the filered lines of the config file. Args: filterFun ([function], optional): function for filter. Defaults to None.
src/ConfigLoader.py:69
↓ 2 callers
Function
initLogger
Initialize logging - pwd: pathname of working directory under which we put logs - logDirName: put all logs into this dir, i.e. 'Logs'
src/Log.py:233
↓ 2 callers
Function
warning
Log wanring message: Log.wanring("message %s", str(value))
src/Log.py:112
↓ 2 callers
Function
writeTest
Write 'mb' megabytes of junk to log
src/Log.py:278
↓ 1 callers
Function
check_password
doc/img/testCases/reverse_engineering/revreseEng.c:10
↓ 1 callers
Function
cleanOldFiles
Examine files in 'dirName', and if we find any that start with 'fileNameBase', remove the oldest of those to keep no more than 'cnt'
src/Log.py:206
↓ 1 callers
Function
exception
log exception message with the stack: Log.exception(e)
src/Log.py:136
↓ 1 callers
Function
getLogTime
Get current local time, return tuple for logging (yyyymmdd, hhmmss) Can pass floating point time, or leave empty for 'now'
src/Log.py:149
↓ 1 callers
Function
get_completion
(prompt, model=AI_MODEL)
src/multiChoiceQtest.py:84
↓ 1 callers
Function
get_completion
(prompt, model=AI_MODEL)
src/questionCategorizer.py:72
↓ 1 callers
Function
info
Log normal information message: Log.info("message %s", str(value))
src/Log.py:104
↓ 1 callers
Function
secret_function
doc/img/testCases/reverse_engineering/revreseEng.c:4
↓ 1 callers
Method
setAutoTimeRest
Set the auto reset time flag for file name change during rotate.
src/Log.py:81
↓ 1 callers
Method
setMode
Set the file process mode. Args: mode ([str]): mode string.
src/ConfigLoader.py:100
↓ 1 callers
Function
testCase
()
src/Log.py:290
↓ 1 callers
Function
testCase
(mode=0)
src/ConfigLoader.py:137
Method
__init__
(self, filename, *args, **kwargs)
src/Log.py:35
Method
__init__
Init the config loader. example: cfg = ConfigLoader('cfg.txt', mode='r', filterChars=('#', '\n'), logFlg=False) Args:
src/ConfigLoader.py:39
Function
callstack
Print compact callstack, with introductory string.
src/Log.py:89
Method
doRollover
Handle rollover for TimedRotatingFileHandler.
src/Log.py:60
Method
handleError
(self, record)
src/Log.py:72
Function
main
doc/img/testCases/reverse_engineering/revreseEng.c:39
Function
setLogger
Define a handler which writes INFO messages or higher to the specified stream. I had to change this for multiprocessing, to allow Non
src/Log.py:177
Function
testCaseFilter
(line)
src/ConfigLoader.py:133