🤬
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/activate
     1 +# This file must be used with "source bin/activate" *from bash*
     2 +# you cannot run it directly
     3 + 
     4 + 
     5 +if [ "${BASH_SOURCE-}" = "$0" ]; then
     6 + echo "You must source this script: \$ source $0" >&2
     7 + exit 33
     8 +fi
     9 + 
     10 +deactivate () {
     11 + unset -f pydoc >/dev/null 2>&1 || true
     12 + 
     13 + # reset old environment variables
     14 + # ! [ -z ${VAR+_} ] returns true if VAR is declared at all
     15 + if ! [ -z "${_OLD_VIRTUAL_PATH:+_}" ] ; then
     16 + PATH="$_OLD_VIRTUAL_PATH"
     17 + export PATH
     18 + unset _OLD_VIRTUAL_PATH
     19 + fi
     20 + if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
     21 + PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
     22 + export PYTHONHOME
     23 + unset _OLD_VIRTUAL_PYTHONHOME
     24 + fi
     25 + 
     26 + # The hash command must be called to get it to forget past
     27 + # commands. Without forgetting past commands the $PATH changes
     28 + # we made may not be respected
     29 + hash -r 2>/dev/null
     30 + 
     31 + if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
     32 + PS1="$_OLD_VIRTUAL_PS1"
     33 + export PS1
     34 + unset _OLD_VIRTUAL_PS1
     35 + fi
     36 + 
     37 + unset VIRTUAL_ENV
     38 + if [ ! "${1-}" = "nondestructive" ] ; then
     39 + # Self destruct!
     40 + unset -f deactivate
     41 + fi
     42 +}
     43 + 
     44 +# unset irrelevant variables
     45 +deactivate nondestructive
     46 + 
     47 +VIRTUAL_ENV='/home/morpheus/gpt_vuln_analyzer/vuln_analyzer'
     48 +if ([ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]) && $(command -v cygpath &> /dev/null) ; then
     49 + VIRTUAL_ENV=$(cygpath -u "$VIRTUAL_ENV")
     50 +fi
     51 +export VIRTUAL_ENV
     52 + 
     53 +_OLD_VIRTUAL_PATH="$PATH"
     54 +PATH="$VIRTUAL_ENV/bin:$PATH"
     55 +export PATH
     56 + 
     57 +# unset PYTHONHOME if set
     58 +if ! [ -z "${PYTHONHOME+_}" ] ; then
     59 + _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
     60 + unset PYTHONHOME
     61 +fi
     62 + 
     63 +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
     64 + _OLD_VIRTUAL_PS1="${PS1-}"
     65 + if [ "x" != x ] ; then
     66 + PS1="() ${PS1-}"
     67 + else
     68 + PS1="(`basename \"$VIRTUAL_ENV\"`) ${PS1-}"
     69 + fi
     70 + export PS1
     71 +fi
     72 + 
     73 +# Make sure to unalias pydoc if it's already there
     74 +alias pydoc 2>/dev/null >/dev/null && unalias pydoc || true
     75 + 
     76 +pydoc () {
     77 + python -m pydoc "$@"
     78 +}
     79 + 
     80 +# The hash command must be called to get it to forget past
     81 +# commands. Without forgetting past commands the $PATH changes
     82 +# we made may not be respected
     83 +hash -r 2>/dev/null
     84 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/activate.csh
     1 +# This file must be used with "source bin/activate.csh" *from csh*.
     2 +# You cannot run it directly.
     3 +# Created by Davide Di Blasi <[email protected]>.
     4 + 
     5 +set newline='\
     6 +'
     7 + 
     8 +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH:q" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT:q" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc'
     9 + 
     10 +# Unset irrelevant variables.
     11 +deactivate nondestructive
     12 + 
     13 +setenv VIRTUAL_ENV '/home/morpheus/gpt_vuln_analyzer/vuln_analyzer'
     14 + 
     15 +set _OLD_VIRTUAL_PATH="$PATH:q"
     16 +setenv PATH "$VIRTUAL_ENV:q/bin:$PATH:q"
     17 + 
     18 + 
     19 + 
     20 +if ('' != "") then
     21 + set env_name = '() '
     22 +else
     23 + set env_name = '('"$VIRTUAL_ENV:t:q"') '
     24 +endif
     25 + 
     26 +if ( $?VIRTUAL_ENV_DISABLE_PROMPT ) then
     27 + if ( $VIRTUAL_ENV_DISABLE_PROMPT == "" ) then
     28 + set do_prompt = "1"
     29 + else
     30 + set do_prompt = "0"
     31 + endif
     32 +else
     33 + set do_prompt = "1"
     34 +endif
     35 + 
     36 +if ( $do_prompt == "1" ) then
     37 + # Could be in a non-interactive environment,
     38 + # in which case, $prompt is undefined and we wouldn't
     39 + # care about the prompt anyway.
     40 + if ( $?prompt ) then
     41 + set _OLD_VIRTUAL_PROMPT="$prompt:q"
     42 + if ( "$prompt:q" =~ *"$newline:q"* ) then
     43 + :
     44 + else
     45 + set prompt = "$env_name:q$prompt:q"
     46 + endif
     47 + endif
     48 +endif
     49 + 
     50 +unset env_name
     51 +unset do_prompt
     52 + 
     53 +alias pydoc python -m pydoc
     54 + 
     55 +rehash
     56 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/activate.fish
     1 +# This file must be used using `source bin/activate.fish` *within a running fish ( http://fishshell.com ) session*.
     2 +# Do not run it directly.
     3 + 
     4 +function _bashify_path -d "Converts a fish path to something bash can recognize"
     5 + set fishy_path $argv
     6 + set bashy_path $fishy_path[1]
     7 + for path_part in $fishy_path[2..-1]
     8 + set bashy_path "$bashy_path:$path_part"
     9 + end
     10 + echo $bashy_path
     11 +end
     12 + 
     13 +function _fishify_path -d "Converts a bash path to something fish can recognize"
     14 + echo $argv | tr ':' '\n'
     15 +end
     16 + 
     17 +function deactivate -d 'Exit virtualenv mode and return to the normal environment.'
     18 + # reset old environment variables
     19 + if test -n "$_OLD_VIRTUAL_PATH"
     20 + # https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling
     21 + if test (echo $FISH_VERSION | head -c 1) -lt 3
     22 + set -gx PATH (_fishify_path "$_OLD_VIRTUAL_PATH")
     23 + else
     24 + set -gx PATH $_OLD_VIRTUAL_PATH
     25 + end
     26 + set -e _OLD_VIRTUAL_PATH
     27 + end
     28 + 
     29 + if test -n "$_OLD_VIRTUAL_PYTHONHOME"
     30 + set -gx PYTHONHOME "$_OLD_VIRTUAL_PYTHONHOME"
     31 + set -e _OLD_VIRTUAL_PYTHONHOME
     32 + end
     33 + 
     34 + if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
     35 + and functions -q _old_fish_prompt
     36 + # Set an empty local `$fish_function_path` to allow the removal of `fish_prompt` using `functions -e`.
     37 + set -l fish_function_path
     38 + 
     39 + # Erase virtualenv's `fish_prompt` and restore the original.
     40 + functions -e fish_prompt
     41 + functions -c _old_fish_prompt fish_prompt
     42 + functions -e _old_fish_prompt
     43 + set -e _OLD_FISH_PROMPT_OVERRIDE
     44 + end
     45 + 
     46 + set -e VIRTUAL_ENV
     47 + 
     48 + if test "$argv[1]" != 'nondestructive'
     49 + # Self-destruct!
     50 + functions -e pydoc
     51 + functions -e deactivate
     52 + functions -e _bashify_path
     53 + functions -e _fishify_path
     54 + end
     55 +end
     56 + 
     57 +# Unset irrelevant variables.
     58 +deactivate nondestructive
     59 + 
     60 +set -gx VIRTUAL_ENV '/home/morpheus/gpt_vuln_analyzer/vuln_analyzer'
     61 + 
     62 +# https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling
     63 +if test (echo $FISH_VERSION | head -c 1) -lt 3
     64 + set -gx _OLD_VIRTUAL_PATH (_bashify_path $PATH)
     65 +else
     66 + set -gx _OLD_VIRTUAL_PATH $PATH
     67 +end
     68 +set -gx PATH "$VIRTUAL_ENV"'/bin' $PATH
     69 + 
     70 +# Unset `$PYTHONHOME` if set.
     71 +if set -q PYTHONHOME
     72 + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
     73 + set -e PYTHONHOME
     74 +end
     75 + 
     76 +function pydoc
     77 + python -m pydoc $argv
     78 +end
     79 + 
     80 +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
     81 + # Copy the current `fish_prompt` function as `_old_fish_prompt`.
     82 + functions -c fish_prompt _old_fish_prompt
     83 + 
     84 + function fish_prompt
     85 + # Run the user's prompt first; it might depend on (pipe)status.
     86 + set -l prompt (_old_fish_prompt)
     87 + 
     88 + # Prompt override provided?
     89 + # If not, just prepend the environment name.
     90 + if test -n ''
     91 + printf '(%s) ' ''
     92 + else
     93 + printf '(%s) ' (basename "$VIRTUAL_ENV")
     94 + end
     95 + 
     96 + string join -- \n $prompt # handle multi-line prompts
     97 + end
     98 + 
     99 + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
     100 +end
     101 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/activate.nu
     1 +# virtualenv activation module
     2 +# Activate with `overlay use activate.nu`
     3 +# Deactivate with `deactivate`, as usual
     4 +#
     5 +# To customize the overlay name, you can call `overlay use activate.nu as foo`,
     6 +# but then simply `deactivate` won't work because it is just an alias to hide
     7 +# the "activate" overlay. You'd need to call `overlay hide foo` manually.
     8 + 
     9 +export-env {
     10 + def is-string [x] {
     11 + ($x | describe) == 'string'
     12 + }
     13 + 
     14 + def has-env [name: string] {
     15 + $name in (env).name
     16 + }
     17 + 
     18 + # Emulates a `test -z`, but btter as it handles e.g 'false'
     19 + def is-env-true [name: string] {
     20 + if (has-env $name) {
     21 + # Try to parse 'true', '0', '1', and fail if not convertible
     22 + let parsed = do -i { $env | get $name | into bool }
     23 + if ($parsed | describe) == 'bool' {
     24 + $parsed
     25 + } else {
     26 + not ($env | get $name | is-empty)
     27 + }
     28 + } else {
     29 + false
     30 + }
     31 + }
     32 + 
     33 + let is_windows = ($nu.os-info.name | str downcase) == 'windows'
     34 + let virtual_env = '/home/morpheus/gpt_vuln_analyzer/vuln_analyzer'
     35 + let bin = 'bin'
     36 + let path_sep = (char esep)
     37 + let path_name = if $is_windows {
     38 + if (has-env 'Path') {
     39 + 'Path'
     40 + } else {
     41 + 'PATH'
     42 + }
     43 + } else {
     44 + 'PATH'
     45 + }
     46 + 
     47 + let old_path = (
     48 + if $is_windows {
     49 + if (has-env 'Path') {
     50 + $env.Path
     51 + } else {
     52 + $env.PATH
     53 + }
     54 + } else {
     55 + $env.PATH
     56 + } | if (is-string $in) {
     57 + # if Path/PATH is a string, make it a list
     58 + $in | split row $path_sep | path expand
     59 + } else {
     60 + $in
     61 + }
     62 + )
     63 + 
     64 + let venv_path = ([$virtual_env $bin] | path join)
     65 + let new_path = ($old_path | prepend $venv_path | str collect $path_sep)
     66 + 
     67 + let new_env = {
     68 + $path_name : $new_path
     69 + VIRTUAL_ENV : $virtual_env
     70 + }
     71 + 
     72 + let new_env = if (is-env-true 'VIRTUAL_ENV_DISABLE_PROMPT') {
     73 + $new_env
     74 + } else {
     75 + # Creating the new prompt for the session
     76 + let virtual_prompt = if ('' == '') {
     77 + $'(char lparen)($virtual_env | path basename)(char rparen) '
     78 + } else {
     79 + '() '
     80 + }
     81 + 
     82 + # Back up the old prompt builder
     83 + let old_prompt_command = if (has-env 'VIRTUAL_ENV') and (has-env '_OLD_PROMPT_COMMAND') {
     84 + $env._OLD_PROMPT_COMMAND
     85 + } else {
     86 + if (has-env 'PROMPT_COMMAND') {
     87 + $env.PROMPT_COMMAND
     88 + } else {
     89 + ''
     90 + }
     91 + }
     92 + 
     93 + # If there is no default prompt, then only the env is printed in the prompt
     94 + let new_prompt = if (has-env 'PROMPT_COMMAND') {
     95 + if ($old_prompt_command | describe) == 'block' {
     96 + { $'($virtual_prompt)(do $old_prompt_command)' }
     97 + } else {
     98 + { $'($virtual_prompt)($old_prompt_command)' }
     99 + }
     100 + } else {
     101 + { $'($virtual_prompt)' }
     102 + }
     103 + 
     104 + $new_env | merge {
     105 + _OLD_VIRTUAL_PATH : ($old_path | str collect $path_sep)
     106 + _OLD_PROMPT_COMMAND : $old_prompt_command
     107 + PROMPT_COMMAND : $new_prompt
     108 + VIRTUAL_PROMPT : $virtual_prompt
     109 + }
     110 + }
     111 + 
     112 + # Environment variables that will be loaded as the virtual env
     113 + load-env $new_env
     114 +}
     115 + 
     116 +export alias pydoc = python -m pydoc
     117 +export alias deactivate = overlay hide activate
     118 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/activate.ps1
     1 +$script:THIS_PATH = $myinvocation.mycommand.path
     2 +$script:BASE_DIR = Split-Path (Resolve-Path "$THIS_PATH/..") -Parent
     3 + 
     4 +function global:deactivate([switch] $NonDestructive) {
     5 + if (Test-Path variable:_OLD_VIRTUAL_PATH) {
     6 + $env:PATH = $variable:_OLD_VIRTUAL_PATH
     7 + Remove-Variable "_OLD_VIRTUAL_PATH" -Scope global
     8 + }
     9 + 
     10 + if (Test-Path function:_old_virtual_prompt) {
     11 + $function:prompt = $function:_old_virtual_prompt
     12 + Remove-Item function:\_old_virtual_prompt
     13 + }
     14 + 
     15 + if ($env:VIRTUAL_ENV) {
     16 + Remove-Item env:VIRTUAL_ENV -ErrorAction SilentlyContinue
     17 + }
     18 + 
     19 + if (!$NonDestructive) {
     20 + # Self destruct!
     21 + Remove-Item function:deactivate
     22 + Remove-Item function:pydoc
     23 + }
     24 +}
     25 + 
     26 +function global:pydoc {
     27 + python -m pydoc $args
     28 +}
     29 + 
     30 +# unset irrelevant variables
     31 +deactivate -nondestructive
     32 + 
     33 +$VIRTUAL_ENV = $BASE_DIR
     34 +$env:VIRTUAL_ENV = $VIRTUAL_ENV
     35 + 
     36 +New-Variable -Scope global -Name _OLD_VIRTUAL_PATH -Value $env:PATH
     37 + 
     38 +$env:PATH = "$env:VIRTUAL_ENV/bin:" + $env:PATH
     39 +if (!$env:VIRTUAL_ENV_DISABLE_PROMPT) {
     40 + function global:_old_virtual_prompt {
     41 + ""
     42 + }
     43 + $function:_old_virtual_prompt = $function:prompt
     44 + 
     45 + if ("" -ne "") {
     46 + function global:prompt {
     47 + # Add the custom prefix to the existing prompt
     48 + $previous_prompt_value = & $function:_old_virtual_prompt
     49 + ("() " + $previous_prompt_value)
     50 + }
     51 + }
     52 + else {
     53 + function global:prompt {
     54 + # Add a prefix to the current prompt, but don't discard it.
     55 + $previous_prompt_value = & $function:_old_virtual_prompt
     56 + $new_prompt_value = "($( Split-Path $env:VIRTUAL_ENV -Leaf )) "
     57 + ($new_prompt_value + $previous_prompt_value)
     58 + }
     59 + }
     60 +}
     61 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/activate_this.py
     1 +"""Activate virtualenv for current interpreter:
     2 + 
     3 +Use exec(open(this_file).read(), {'__file__': this_file}).
     4 + 
     5 +This can be used when you must use an existing Python interpreter, not the virtualenv bin/python.
     6 +"""
     7 +import os
     8 +import site
     9 +import sys
     10 + 
     11 +try:
     12 + abs_file = os.path.abspath(__file__)
     13 +except NameError:
     14 + raise AssertionError("You must use exec(open(this_file).read(), {'__file__': this_file}))")
     15 + 
     16 +bin_dir = os.path.dirname(abs_file)
     17 +base = bin_dir[: -len("bin") - 1] # strip away the bin part from the __file__, plus the path separator
     18 + 
     19 +# prepend bin to PATH (this file is inside the bin directory)
     20 +os.environ["PATH"] = os.pathsep.join([bin_dir] + os.environ.get("PATH", "").split(os.pathsep))
     21 +os.environ["VIRTUAL_ENV"] = base # virtual env is right above bin directory
     22 + 
     23 +# add the virtual environments libraries to the host python import mechanism
     24 +prev_length = len(sys.path)
     25 +for lib in "../lib/python3.11/site-packages".split(os.pathsep):
     26 + path = os.path.realpath(os.path.join(bin_dir, lib))
     27 + site.addsitedir(path.decode("utf-8") if "" else path)
     28 +sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]
     29 + 
     30 +sys.real_prefix = sys.prefix
     31 +sys.prefix = base
     32 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/normalizer
     1 +#!/home/morpheus/gpt_vuln_analyzer/vuln_analyzer/bin/python
     2 +# -*- coding: utf-8 -*-
     3 +import re
     4 +import sys
     5 +from charset_normalizer.cli.normalizer import cli_detect
     6 +if __name__ == '__main__':
     7 + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
     8 + sys.exit(cli_detect())
     9 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/bin/openai
     1 +#!/home/morpheus/gpt_vuln_analyzer/vuln_analyzer/bin/python
     2 +# -*- coding: utf-8 -*-
     3 +import re
     4 +import sys
     5 +from openai._openai_scripts import main
     6 +if __name__ == '__main__':
     7 + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
     8 + sys.exit(main())
     9 + 
Please wait...
Page is in error, reload to recover