Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GPTScan/GPTScan
/ functions
Functions
95 in github.com/GPTScan/GPTScan
⨍
Functions
95
◇
Types & classes
3
↓ 8 callers
Function
ask_with_timeout
(prompt, gpt4=False, timeout=90)
src/analyze_pipeline.py:21
↓ 7 callers
Method
get_function_detail
(self, file:str, contract:str, function:str)
src/antlr4helper/callgraph.py:235
↓ 5 callers
Function
parseToken
(string)
src/antlr4helper/SolidityParser.py:17
↓ 4 callers
Method
get_rel_path
(self, path:str)
src/antlr4helper/callgraph.py:98
↓ 3 callers
Method
get_callers
(self, function:str)
src/antlr4helper/callgraph.py:203
↓ 2 callers
Function
__has_check
(var:str, text)
src/static_check.py:13
↓ 2 callers
Function
__has_eq_check
(var1:str, var2:str, text)
src/static_check.py:23
↓ 2 callers
Function
_do_load_config
(config_path: str)
src/tasks.py:26
↓ 2 callers
Function
forwardUntil
(i, stream, expect_id, max_length)
src/antlr4helper/SolidityParser.py:26
↓ 2 callers
Function
getFunction
(i, stream, max_length, function_id, start, outside_contract)
src/antlr4helper/SolidityParser.py:39
↓ 2 callers
Function
getTokenStream
(input_stream)
src/antlr4helper/SolidityParser.py:9
↓ 2 callers
Function
parseStream
(stream:CommonTokenStream)
src/antlr4helper/SolidityParser.py:205
↓ 2 callers
Function
prompt_multiple_choice_scenarios
(scenarios:List[str], code:str)
src/query_template.py:381
↓ 2 callers
Function
prompt_single_yes_no_question
(question:str, code:str)
src/query_template.py:359
↓ 1 callers
Function
__call_arg_check
(function:str, arg:str, text:str)
src/static_check.py:78
↓ 1 callers
Method
__clean
(self)
src/antlr4helper/callgraph.py:149
↓ 1 callers
Function
__emit_at_end
(function:str, text:str)
src/static_check.py:84
↓ 1 callers
Function
__has_noneq_check
(var1:str, var2:str, text)
src/static_check.py:18
↓ 1 callers
Function
__in_code
(pattern:str, text:str)
src/static_check.py:90
↓ 1 callers
Function
__order_first_b
(a:List[str], b:List[str], text)
src/static_check.py:34
↓ 1 callers
Method
__parse_all_files
(self)
src/antlr4helper/callgraph.py:101
↓ 1 callers
Method
__run_jar
(self)
src/antlr4helper/callgraph.py:144
↓ 1 callers
Function
clean_the_origin_output
(origin_output:Dict)
src/utils.py:39
↓ 1 callers
Function
compile_project
(abs_path:str)
src/tasks.py:77
↓ 1 callers
Function
contains_any
(str_, iter_)
src/analyze_pipeline.py:42
↓ 1 callers
Function
generate_signatures
(contract: dict, function_name: str, content: str)
src/antlr4helper/callgraph.py:26
↓ 1 callers
Function
getSubcontract
(i, stream, max_length, subcontract_id, start)
src/antlr4helper/SolidityParser.py:136
↓ 1 callers
Function
getUsingFor
(i, stream, max_length)
src/antlr4helper/SolidityParser.py:126
↓ 1 callers
Function
get_loc
(content: str)
src/antlr4helper/callgraph.py:73
↓ 1 callers
Function
hashString
(content)
src/antlr4helper/utils.py:8
↓ 1 callers
Function
is_empty_function
(content: str)
src/antlr4helper/callgraph.py:61
↓ 1 callers
Function
is_in_modifier_whitelist
(content: str)
src/antlr4helper/callgraph.py:77
↓ 1 callers
Function
is_in_whitelist
(contract_name: str, function_name: str, content: str, visibility: str)
src/antlr4helper/callgraph.py:14
↓ 1 callers
Function
load_all_rules
()
src/tasks.py:68
↓ 1 callers
Function
load_config
(config_name: str)
src/tasks.py:32
↓ 1 callers
Function
parseString
(content)
src/antlr4helper/SolidityParser.py:253
↓ 1 callers
Function
process
()
src/whitelist_preprocess.py:4
↓ 1 callers
Function
serializedATN
()
src/antlr4helper/SolidityLexer.py:11
↓ 1 callers
Function
split_answer_section
Split the response into sections based on the answer keys.
src/utils.py:12
↓ 1 callers
Function
stringClean
(string:str)
src/antlr4helper/utils.py:16
↓ 1 callers
Function
welcome
()
src/main.py:18
Function
__has_larger_check
(var1:str, var2:str, text)
src/static_check.py:29
Method
__init__
(self)
src/chatgpt_api.py:28
Method
__init__
(self, root:str)
src/antlr4helper/callgraph.py:88
Method
__init__
(self, input=None, output:TextIO = sys.stdout)
src/antlr4helper/SolidityLexer.py:1419
Function
ask_for_function_to_focus_with_feature_words_v2
(source_dir: str, feature_words: List[List[str]])
src/analyze_pipeline.py:41
Function
ask_for_static
(prompts, source, answer_keys)
src/analyze_pipeline.py:517
Function
ask_for_static_json
(prompts, source, answer_keys)
src/analyze_pipeline.py:523
Function
ask_for_static_json_single
(prompts, source, answer_key)
src/analyze_pipeline.py:541
Function
ask_for_static_multistep
(prompts, source, answer_keys)
src/analyze_pipeline.py:476
Function
ask_whether_has_vul_with_scenario_v9
(src_folder: str, rules: List[dict])
src/analyze_pipeline.py:65
Function
compile_project
(project_dir: str)
src/falcon_adapter.py:28
Function
convert_output
(origin_output:Dict, scan_rules:List[Dict], cg:CallGraph, base_dir:str)
src/utils.py:80
Function
find_data_dependency
(source: str, sink: str, function: str, falcon: Falcon)
src/falcon_adapter.py:81
Function
first_deposit_check
(current_pool_var: str, deposit_amount: str, total_share: str, function: str, falcon: Falcon)
src/falcon_adapter.py:124
Method
get_callees
(self, file:str, contract:str, function:str)
src/antlr4helper/callgraph.py:216
Function
get_tokens
(source:str)
src/antlr4helper/__init__.py:11
Function
hashFile
(file_path)
src/antlr4helper/utils.py:11
Function
is_arg_taint
(call: str, arg_index: int, function:str, falcon:Falcon)
src/falcon_adapter.py:223
Function
load_all_configs
()
src/tasks.py:49
Function
load_configs
(config_names: list)
src/tasks.py:42
Function
load_file
(falcon_base_dir: str, sol_file_path: str)
src/falcon_adapter.py:50
Function
load_rule
(rule_indexs: List[int])
src/tasks.py:57
Method
makeCodeQuestion
(self, question:str, code:str)
src/chatgpt_api.py:116
Method
makeYesOrNoQuestion
(self, question:str)
src/chatgpt_api.py:112
Function
make_args_table
(args:List[str], title:str)
src/rich_utils.py:11
Function
make_prompt_panel
(code:str, prompt:str, panel_title:str)
src/rich_utils.py:5
Function
make_response_panel
(response:str, panel_title:str)
src/rich_utils.py:8
Method
newSession
(self)
src/chatgpt_api.py:31
Function
parse
(source:str)
src/antlr4helper/__init__.py:5
Function
parseFile
(file_path)
src/antlr4helper/SolidityParser.py:256
Function
prompt1_v1
(code_segments: List[str], statements: List[str])
src/query_template.py:4
Function
prompt1_v2
(code_segments: List[str], statements: List[List[str]])
src/query_template.py:25
Function
prompt1_v3
(code_segments: List[str], statements: List[List[str]])
src/query_template.py:50
Function
prompt1_v4
(code_segments: List[str], statements: List[List[str]])
src/query_template.py:72
Function
prompt1_v5
(code_segments: List[str], statements: List[List[str]])
src/query_template.py:97
Function
prompt1_v6
(code_segments: List[str], statements: List[List[str]])
src/query_template.py:118
Function
prompt_related_functions
(feature_words:List[str], code:List[str])
src/query_template.py:367
Function
prompt_related_scenario
(function_list:List[str], scenario_list:List[str])
src/query_template.py:321
Function
prompt_related_scenario_v2
(function_list:List[str], scenario_list:List[str])
src/query_template.py:336
Function
prompt_summarize_v1
(type_to_summarize: str, data: List[str])
src/query_template.py:310
Function
render_template_function_to_focus_v1
(filename:str, function_list:List[str], statements:List[Dict[str,str]])
src/query_template.py:254
Function
render_template_function_to_focus_v2
(function_list:List[str], statements:List[Dict[str,str]])
src/query_template.py:277
Function
render_template_function_to_focus_v3
(function_listA:List[str], function_listB:List[str])
src/query_template.py:295
Function
render_template_vul_multiple_choose_v1
(code_segments: List[str], statements: List[str])
src/query_template.py:176
Function
render_template_vul_multiple_choose_v2
(code_segments: List[str], statements: List[str])
src/query_template.py:196
Function
render_template_vul_multiple_choose_v3
(code_segments: List[str], statements: List[str], filename:str)
src/query_template.py:216
Function
render_template_vul_multiple_choose_v4
(code_segments: List[str], statements: List[str])
src/query_template.py:236
Function
render_templete_whether_has_vul_v1
(code_segments: List[str], statements: List[str])
src/query_template.py:141
Function
render_templete_whether_has_vul_v2
(code_segments: List[str], statements: List[str])
src/query_template.py:158
Function
run_static_check
(checker:str, args, function_name:str, falcon:Falcon, text:str)
src/static_check.py:93
Method
sendMessages
(self, message:str, GPT4=False)
src/chatgpt_api.py:34
Function
simple_cli
()
src/tasks.py:107
Function
static_analysis
(sink, source, file, function)
src/analyze_pipeline.py:463
Function
try_to_handle_too_long_code
Try to handle the too long code problem. By divid and conqure code segments.
src/utils.py:31