Closed cilan2 closed 4 years ago
可以贴出来报错代码么
最近修改了源码,但是docker镜像还没有更新,可能会有些影响
windows正常 linux 500 不知道是不是post长度限制导致的
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib64/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py", line 65, in call return self.application(environ, start_response) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 141, in call response = self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 75, in get_response response = self._middleware_chain(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) [20/Mar/2020 13:25:59] "POST /baseline/linux_scan_res_report/ HTTP/1.1" 500 59
这两张图片都是Windows的,还有就是Linux的那个报错代码没有截全,
发件人: cilan2 发送时间: 2020年3月20日 13:35 收件人: chroblert/AssetManage 抄送: jerrybird; Comment 主题: Re: [chroblert/AssetManage] windows 脚本能执行并在后台展示,linux执行失败 (#7)
windows正常
linux 500
不知道是不是post长度限制导致的 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
这是linux的json数据,用python库里面json模块转失败, a='{"basic_info":{"scanTime":"2020-03-20 00:34:40","hostname":"kali","macaddr":"00:0c:29:b3:cc:05","ipList":"192.168.116.132","kernelVersion":"4.17.0-kali1-amd64","osVersion":""},init_check_res:{"tmp_partition_info":{"tmpIfSeparate":"False","tmpIfNoexec":"False","tmpIfNosuid":"False"},"boot_secure_info":{"grubcfgIfExist":"False","grubcfgPermission":"0000","grubcfgIfSetPasswd":"False","singleUserModeIfNeedAuth":"False","selinuxStateIfEnforcing":"","selinuxPolicyIfConfigured":""}},service_check_res:{"timeSyncServerIfConfigured":"","x11windowIfNotInstalled":"True"},network_check_res:{"hostsAllowFileIfExist":"True","hostsAllowFilePermission":"0644","hostsAllowFileIfConfigured":"False","hostsDenyFileIfExist":"True","hostsDenyFilePermission":"0644","hostsDenyFileIfConfigured":"False","iptablesIfInstalled":"False","iptablesInputPolicyIfDrop":"","iptablesOutputPolicyIfDrop":""},auditd_check_res:{"auditd_config_info":{"auditdIfEnabled":"False","auditdconfIfExist":"False","auditdIfSetMaxLogFile":"","auditdIfSetMaxLogFileAction":"","auditdIfSetSpaceLeftAction":"","auditdIfSetNumLogs":""},"auditd_rules_info":{"auditdRulesIfExist":"False","auditdRulesIfNotNull":"","auditdIfCheckTimechange":"","auditdRulesCheckedUserandgroupfile":"","auditdRulesNotCheckedUserandgroupfile":"","auditdRulesCheckedNetworkenv":"","auditdRulesNotCheckedNetworkenv":"","auditdRulesCheckedMACchange":"","auditdRulesNotCheckedMACchange":"","auditdRulesCheckedLoginoutEvents":"","auditdRulesNotCheckedLoginoutEvents":"","auditdRulesCheckedDACChangeSyscall":"","auditdRulesNotCheckedDACChangeSyscall":"","auditdRulesCheckedFileAccessAttemptSyscall":"","auditdRulesNotCheckedFileAccessAttemptSyscall":"","auditdRulesCheckedPrivilegedCommand":"","auditdRulesNotCheckedPrivilegedCommand":"","auditdRulesCheckedSudoerFile":"","auditdRulesNotCheckedSudoerFile":"","auditdRulesIfImmutable":""}},log_check_res:{"rsyslogIfEnabled":"True"},authentication_check_res:{"crond_config_info":{"crondIfEnabled":"False","crondConfigFilenameArray":"/etc/crontab;/etc/cron.hourly;/etc/cron.daily;/etc/cron.weekly;/etc/cron.monthly;/etc/cron.d","crondConfigFilePermissionArray":"0644;0755;0755;0755;0755;0755;","crondallowdenyFilenameArray":"/etc/cron.allow;/etc/cron.deny","crondallowdenyFileIfExistArray":"False;False;","crondallowdenyFilePermissionArray":"False;False;","crondallowdenyFileOwnerArray":"False;False;"},"sshd_config_info":{"sshdIfEnabled":"False","sshdConfigFilePermission":"","sshdIfDisableX11forwarding":"","sshdIfSetMaxAuthTries":"","sshdIfEnableIgnoreRhosts":"","sshdIfDisableHostbasedAuthentication":"","sshdIfDisablePermitRootLogin":"","sshdIfDisablePermitEmptyPasswords":"","sshdIfDisablePermitUserEnvironment":"","sshdIfSpecificMACs":"","sshdIfSetClientAliveInterval":"","sshdIfSetLoginGraceTime":""},"pam_config_info":{"pamPwqualityconfIfExist":"True","pamIfSetMinlen":"False","pamIfSetMinclass":"False","sshdSetedLockAndUnlockTimeFiles":"","sshdNotSetedLockAndUnlockTimeFiles":"/etc/pam.d/password-auth;/etc/pam.d/system-auth;","sshdPamdFileArray":"/etc/pam.d/password-auth;/etc/pam.d/system-auth","sshdPamdFileReuseLimitArray":"False;False;","sshdPamdFileIfSetSha512Array":"False;False;"},"account_config_info":{"accountPassMaxDays":"99999","accountPassMinDays":"0","accountPassWarnDays":"","accountPassAutolockInactiveDays":"-1","accountShouldUnloginArray":"","accountGIDOfRoot":"0","accountProfileFileArray":"/etc/profile;","accountProfileTMOUTArray":"False;","accountIfSetUsersCanAccessSuCommand":"False"}},system_check_res:{"file_permission_info":{"importantFilenameArray":"/etc/passwd;/etc/shadow;/etc/group;/etc/gshadow;/etc/passwd-;/etc/shadow-;/etc/group-;/etc/gshadow-","importantFilePermissionArray":"0644;0640;0644;0640;0644;0640;0644;0640;","importantFileUidgidArray":"0 0;0 0;0 0;0 0;0 0;0 0;0 0;0 0;"},"usergroup_config_info":{"userIfSetPasswdOrArray":"True","uid0OnlyRootOrArray":"True","pathDirIfNotHasDot":"True","pathDirPermissionHasGWArray":"","pathDirPermissionHasOWArray":"","pathDirOwnerIsNotRootArray":"","pathDirDoesNotExistOrNotDirArray":"","userArray":"/usr/sbin;/bin;/dev;/usr/games;/var/cache/man;/var/spool/lpd;/var/mail;/var/spool/news;/var/spool/uucp;/bin;/var/www;/var/backups;/var/list;/var/run/ircd;/var/lib/gnats;/nonexistent;/nonexistent;/run/systemd;/run/systemd;/run/systemd;/var/spool/exim4;/run/uuidd;/var/spool/rwho;/var/run/redsocks;/var/run/epmd;/var/lib/usbmux;/var/run/miredo;/nonexistent;/var/lib/postgresql;/var/lib/misc;/nonexistent;/var/run/iodine;/var/lib/arpwatch;/var/run/stunnel4;/proc;/nonexistent;/var/lib/inetsim;/run/sshd;/var/lib/couchdb;/var/lib/glusterd;/var/lib/geoclue;/var/lib/colord;/var/lib/saned;/var/run/avahi-daemon;/var/run/pulse;/var/lib/dradis;/var/lib/king-phisher;/var/lib/beef-xss;","userHomeDirIfExistArray":"True;True;True;True;True;False;True;False;False;True;True;True;False;False;False;False;False;True;True;True;True;True;True;False;False;False;False;False;True;True;False;True;True;True;True;False;True;False;True;False;True;True;False;True;False;True;True;True;","userHomeDirPermissionArray":"drwxr-xr-x;lrwxrwxrwx;drwxr-xr-x;drwxr-xr-x;drwxr-xr-x;False;drwxrwsr-x;False;False;lrwxrwxrwx;drwxr-xr-x;drwxr-xr-x;False;False;False;False;False;drwxr-xr-x;drwxr-xr-x;drwxr-xr-x;drwxr-x---;drwxr-xr-x;drwxr-xr-x;False;False;False;False;False;drwxr-xr-x;drwxr-xr-x;False;drwxr-xr-x;drwxr-x---;drwxr-xr-x;dr-xr-xr-x;False;drwxr-xr-x;False;drwxr-xr-x;False;drwxr-xr-x;drwxr-xr-x;False;drwxr-xr-x;False;drwxr-xr-x;drwxr-xr-x;drwxr-xr-x;","userIfOwnTheirHomeDirArray":"False;False;False;False;True;False;False;False;False;False;False;False;True;False;True;True;False;False;True;True;False;True;True;True;True;True;True;True;True;","userHomeDirIfHasGWorOWDotFileArray":"True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;","userHomeDirIfHasOtherFileArray":"True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;","groupNotExistInetcgroup":"","usersIfHasUniqueUIDArray":"","groupsIfHasUniqueGIDArray":""}}}'
这是windows的json数据,用python库里面json模块转成功, b='{"basic_info":{"scanTime":"2020-3-21 12:37:16","osVersion":"Microsoft Windows 10 ???","hostname":"DESKTOP-3LH49LQ","macaddr":"34-E1-2D-23-62-52;","ipList":"192.168.43.152;"},"account_check_res":{"password_check_info":{"passwordHistorySize":"5","maximumPasswordAge":"90","minimumPasswordAge":"0","passwordComplexity":"1","clearTextPassword":"0","minimumPasswordLength":"8"},"account_lockout_info":{"lockoutDuration":"30","lockoutBadCount":"5","resetLockoutCount":"30"}},"audit_check_res":{"auditPolicyChange":"3","auditLogonEvents":"3","auditObjectAccess":"0","auditProcessTracking":"0","auditDSAccess":"2","auditSystemEvents":"3","auditAccountLogon":"3","auditAccountManage":"2"},"userright_check_res":{"seTrustedCredManAccessPrivilegeIFNone":"True","seTcbPrivilegeIFNone":"True","seMachineAccountPrivilegeIFOnlySpecifiedUserOrArray":"5117;513;","seCreateGlobalPrivilegeIFNone":"S-1-5-19,S-1-5-20,S-1-5-32-544,S-1-5-6","seDenyBatchLogonRightIFContainGuests":"True","seDenyServiceLogonRightIFContainGuests":"True","seDenyInteractiveLogonRightIFContainGuests":"False","seRemoteShutdownPrivilegeIFOnlySpecifiedUserOrArray":"True","seRelabelPrivilegeIFNone":"S-1-5-21-951862491-4206744170-1539856363-5132","seSyncAgentPrivilegeIFNone":"S-1-5-21-951862491-4206744170-1539856363-5132"},"secureoption_check_res":{"enableGuestAccount":"False","limitBlankPasswordUse":"True","newAdministratorName":"False","newGuestName":"False","dontDisplayLastUserName":"False","disableCAD":"True","inactivityTimeoutSecs":"600","enablePlainTextPassword":"True","autoDisconnect":"False","noLMHash":"True","lsaAnonymousNameLookup":"False","restrictAnonymousSAM":"True","restrictAnonymous":"False","clearPageFileAtShutdown":"False"},"portsecure_check_res":{"rdpPort":"3389"},"systemsecure_check_res":{"autoRunRes":"False"}}'
json.loads(b) {u'portsecure_check_res': {u'rdpPort': u'3389'}, u'secureoption_check_res': {u'inactivityTimeoutSecs': u'600', u'restrictAnonymousSAM': u'True', u'restrictAnonymous': u'False', u'clearPageFileAtShutdown': u'False', u'noLMHash': u'True', u'enablePlainTextPassword': u'True', u'lsaAnonymousNameLookup': u'False', u'autoDisconnect': u'False', u'enableGuestAccount': u'False', u'dontDisplayLastUserName': u'False', u'newGuestName': u'False', u'disableCAD': u'True', u'newAdministratorName': u'False', u'limitBlankPasswordUse': u'True'}, u'userright_check_res': {u'seTrustedCredManAccessPrivilegeIFNone': u'True', u'seDenyBatchLogonRightIFContainGuests': u'True', u'seDenyInteractiveLogonRightIFContainGuests': u'False', u'seSyncAgentPrivilegeIFNone': u'S-1-5-21-951862491-4206744170-1539856363-5132', u'seDenyServiceLogonRightIFContainGuests': u'True', u'seCreateGlobalPrivilegeIFNone': u'S-1-5-19,S-1-5-20,S-1-5-32-544,S-1-5-6', u'seRemoteShutdownPrivilegeIFOnlySpecifiedUserOrArray': u'True', u'seRelabelPrivilegeIFNone': u'S-1-5-21-951862491-4206744170-1539856363-5132', u'seMachineAccountPrivilegeIFOnlySpecifiedUserOrArray': u'5117;513;', u'seTcbPrivilegeIFNone': u'True'}, u'audit_check_res': {u'auditAccountManage': u'2', u'auditObjectAccess': u'0', u'auditDSAccess': u'2', u'auditAccountLogon': u'3', u'auditProcessTracking': u'0', u'auditLogonEvents': u'3', u'auditSystemEvents': u'3', u'auditPolicyChange': u'3'}, u'basic_info': {u'scanTime': u'2020-3-21 12:37:16', u'macaddr': u'34-E1-2D-23-62-52;', u'osVersion': u'Microsoft Windows 10 ???', u'hostname': u'DESKTOP-3LH49LQ', u'ipList': u'192.168.43.152;'}, u'systemsecure_check_res': {u'autoRunRes': u'False'}, u'account_check_res': {u'password_check_info': {u'maximumPasswordAge': u'90', u'passwordComplexity': u'1', u'clearTextPassword': u'0', u'minimumPasswordLength': u'8', u'minimumPasswordAge': u'0', u'passwordHistorySize': u'5'}, u'account_lockout_info': {u'resetLockoutCount': u'30', u'lockoutDuration': u'30', u'lockoutBadCount': u'5'}}}
我也在 /assetManage/AssetManage-master/baseline/views.py 下面打断点执行到这边失败
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(args, **kwargs) File "/assetManage/AssetManage-master/baseline/views.py", line 306, in linux_scan_res_report linuxScanResDict=json.loads(bodyData) File "/usr/lib64/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib64/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py", line 65, in call return self.application(environ, start_response) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 141, in call response = self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 75, in get_response response = self._middleware_chain(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) [20/Mar/2020 15:28:14] "POST /baseline/linux_scan_res_report/ HTTP/1.1" 500 59
问题已经找到,
应该是出在最后组成json串的时候出现了问题,init_check_res,…… 应该放在\”\”内。 已经上传了最新的代码,不过不适用于旧的docker镜像。agent也放在这个项目下 目前正在制作docker镜像
发件人: cilan2 发送时间: 2020年3月20日 15:29 收件人: chroblert/AssetManage 抄送: jerrybird; Comment 主题: Re: [chroblert/AssetManage] windows 脚本能执行并在后台展示,linux执行失败 (#7)
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(args, *kwargs) File "/assetManage/AssetManage-master/baseline/views.py", line 306, in linux_scan_res_report linuxScanResDict=json.loads(bodyData) File "/usr/lib64/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py", line 65, in call return self.application(environ, start_response) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 141, in call response = self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 75, in get_response response = self._middleware_chain(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) [20/Mar/2020 15:28:14] "POST /baseline/linux_scan_res_report/ HTTP/1.1" 500 59 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
还有个问题,我把修改好的json发送过去,格式修改对了。然后报错又变了 (Pdb) s --Call--
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py(174)get() -> def get(self, instance, cls=None): (Pdb) n /usr/local/lib/python3.6/site-packages/django/db/models/manager.py(175)get() -> if instance is not None: (Pdb) n /usr/local/lib/python3.6/site-packages/django/db/models/manager.py(178)get() -> if cls._meta.abstract: (Pdb) n /usr/local/lib/python3.6/site-packages/django/db/models/manager.py(183)get() -> if cls._meta.swapped: (Pdb) n /usr/local/lib/python3.6/site-packages/django/db/models/manager.py(192)get() -> return cls._meta.managers_map[self.manager.name] (Pdb) n --Return-- /usr/local/lib/python3.6/site-packages/django/db/models/manager.py(192)get()->
-> return cls._meta.managers_map[self.manager.name] (Pdb) n --Call-- /usr/local/lib/python3.6/site-packages/django/db/models/manager.py(81)manager_method() -> def manager_method(self, *args, kwargs): (Pdb) n /usr/local/lib/python3.6/site-packages/django/db/models/manager.py(82)manager_method() -> return getattr(self.get_queryset(), name)(*args, *kwargs) (Pdb) n Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, callback_args, callback_kwargs) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, *kwargs) File "/assetManage/AssetManage-master/baseline/views.py", line 537, in linux_scan_res_report models.LinuxScanRes.objects.get_or_create(scanTime=scanTime,hostname=hostname,macaddr=macaddr,ipList=ipList,kernelVersion=kernelVersion,osVersion=osVersion,tmpIfSeparate=tmpIfSeparate,tmpIfNoexec=tmpIfNoexec,tmpIfNosuid=tmpIfNosuid,grubcfgIfExist=grubcfgIfExist,grubcfgPermission=grubcfgPermission,grubcfgIfSetPasswd=grubcfgIfSetPasswd,singleUserModeIfNeedAuth=singleUserModeIfNeedAuth,selinuxStateIfEnforcing=selinuxStateIfEnforcing,selinuxPolicyIfConfigured=selinuxPolicyIfConfigured,timeSyncServerIfConfigured=timeSyncServerIfConfigured,x11windowIfNotInstalled=x11windowIfNotInstalled,hostsAllowFileIfExist=hostsAllowFileIfExist,hostsAllowFilePermission=hostsAllowFilePermission,hostsAllowFileIfConfigured=hostsAllowFileIfConfigured,hostsDenyFileIfExist=hostsDenyFileIfExist,hostsDenyFilePermission=hostsDenyFilePermission,hostsDenyFileIfConfigured=hostsDenyFileIfConfigured,iptablesIfInstalled=iptablesIfInstalled,iptablesInputPolicyIfDrop=iptablesInputPolicyIfDrop,iptablesOutputPolicyIfDrop=iptablesOutputPolicyIfDrop,auditdIfEnabled=auditdIfEnabled,auditdconfIfExist=auditdconfIfExist,auditdIfSetMaxLogFile=auditdIfSetMaxLogFile,auditdIfSetMaxLogFileAction=auditdIfSetMaxLogFileAction,auditdIfSetSpaceLeftAction=auditdIfSetSpaceLeftAction,auditdIfSetNumLogs=auditdIfSetNumLogs,auditdRulesIfExist=auditdRulesIfExist,auditdRulesIfNotNull=auditdRulesIfNotNull,auditdIfCheckTimechange=auditdIfCheckTimechange,auditdRulesCheckedUserandgroupfile=auditdRulesCheckedUserandgroupfile,auditdRulesNotCheckedUserandgroupfile=auditdRulesNotCheckedUserandgroupfile,auditdRulesCheckedNetworkenv=auditdRulesCheckedNetworkenv,auditdRulesNotCheckedNetworkenv=auditdRulesNotCheckedNetworkenv,auditdRulesCheckedMACchange=auditdRulesCheckedMACchange,auditdRulesNotCheckedMACchange=auditdRulesNotCheckedMACchange,auditdRulesCheckedLoginoutEvents=auditdRulesCheckedLoginoutEvents,auditdRulesNotCheckedLoginoutEvents=auditdRulesNotCheckedLoginoutEvents,auditdRulesCheckedDACChangeSyscall=auditdRulesCheckedDACChangeSyscall,auditdRulesNotCheckedDACChangeSyscall=auditdRulesNotCheckedDACChangeSyscall,auditdRulesCheckedFileAccessAttemptSyscall=auditdRulesCheckedFileAccessAttemptSyscall,auditdRulesNotCheckedFileAccessAttemptSyscall=auditdRulesNotCheckedFileAccessAttemptSyscall,auditdRulesCheckedPrivilegedCommand=auditdRulesCheckedPrivilegedCommand,auditdRulesNotCheckedPrivilegedCommand=auditdRulesNotCheckedPrivilegedCommand,auditdRulesCheckedSudoerFile=auditdRulesCheckedSudoerFile,auditdRulesNotCheckedSudoerFile=auditdRulesNotCheckedSudoerFile,auditdRulesIfImmutable=auditdRulesIfImmutable,rsyslogIfEnabled=rsyslogIfEnabled,crondIfEnabled=crondIfEnabled,crondConfigFilenameArray=crondConfigFilenameArray,crondConfigFilePermissionArray=crondConfigFilePermissionArray,crondallowdenyFilenameArray=crondallowdenyFilenameArray,crondallowdenyFileIfExistArray=crondallowdenyFileIfExistArray,crondallowdenyFilePermissionArray=crondallowdenyFilePermissionArray,crondallowdenyFileOwnerArray=crondallowdenyFileOwnerArray,sshdIfEnabled=sshdIfEnabled,sshdConfigFilePermission=sshdConfigFilePermission,sshdIfDisableX11forwarding=sshdIfDisableX11forwarding,sshdIfSetMaxAuthTries=sshdIfSetMaxAuthTries,sshdIfEnableIgnoreRhosts=sshdIfEnableIgnoreRhosts,sshdIfDisableHostbasedAuthentication=sshdIfDisableHostbasedAuthentication,sshdIfDisablePermitRootLogin=sshdIfDisablePermitRootLogin,sshdIfDisablePermitEmptyPasswords=sshdIfDisablePermitEmptyPasswords,sshdIfDisablePermitUserEnvironment=sshdIfDisablePermitUserEnvironment,sshdIfSpecificMACs=sshdIfSpecificMACs,sshdIfSetClientAliveInterval=sshdIfSetClientAliveInterval,sshdIfSetLoginGraceTime=sshdIfSetLoginGraceTime,pamPwqualityconfIfExist=pamPwqualityconfIfExist,pamIfSetMinlen=pamIfSetMinlen,pamIfSetMinclass=pamIfSetMinclass,sshdSetedLockAndUnlockTimeFiles=sshdSetedLockAndUnlockTimeFiles,sshdNotSetedLockAndUnlockTimeFiles=sshdNotSetedLockAndUnlockTimeFiles,sshdPamdFileArray=sshdPamdFileArray,sshdPamdFileReuseLimitArray=sshdPamdFileReuseLimitArray,sshdPamdFileIfSetSha512Array=sshdPamdFileIfSetSha512Array,accountPassMaxDays=accountPassMaxDays,accountPassMinDays=accountPassMinDays,accountPassWarnDays=accountPassWarnDays,accountPassAutolockInactiveDays=accountPassAutolockInactiveDays,accountShouldUnloginArray=accountShouldUnloginArray,accountGIDOfRoot=accountGIDOfRoot,accountProfileFileArray=accountProfileFileArray,accountProfileTMOUTArray=accountProfileTMOUTArray,accountIfSetUsersCanAccessSuCommand=accountIfSetUsersCanAccessSuCommand,importantFilenameArray=importantFilenameArray,importantFilePermissionArray=importantFilePermissionArray,importantFileUidgidArray=importantFileUidgidArray,userIfSetPasswdOrArray=userIfSetPasswdOrArray,uid0OnlyRootOrArray=uid0OnlyRootOrArray,pathDirIfNotHasDot=pathDirIfNotHasDot,pathDirPermissionHasGWArray=pathDirPermissionHasGWArray,pathDirPermissionHasOWArray=pathDirPermissionHasOWArray,pathDirOwnerIsNotRootArray=pathDirOwnerIsNotRootArray,pathDirDoesNotExistOrNotDirArray=pathDirDoesNotExistOrNotDirArray,userArray=userArray,userHomeDirIfExistArray=userHomeDirIfExistArray,userHomeDirPermissionArray=userHomeDirPermissionArray,userIfOwnTheirHomeDirArray=userIfOwnTheirHomeDirArray,userHomeDirIfHasGWorOWDotFileArray=userHomeDirIfHasGWorOWDotFileArray,userHomeDirIfHasOtherFileArray=userHomeDirIfHasOtherFileArray,groupNotExistInetcgroup=groupNotExistInetcgroup,usersIfHasUniqueUIDArray=usersIfHasUniqueUIDArray,groupsIfHasUniqueGIDArray=groupsIfHasUniqueGIDArray) File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(args, kwargs) File "/usr/lib64/python3.6/bdb.py", line 57, in trace_dispatch return self.dispatch_exception(frame, arg) File "/usr/lib64/python3.6/bdb.py", line 112, in dispatch_exception self.user_exception(frame, arg) File "/usr/lib64/python3.6/pdb.py", line 311, in user_exception traceback.format_exception_only(exc_type, exc_value)[-1].strip())) File "/usr/lib64/python3.6/pdb.py", line 453, in message print(msg, file=self.stdout) UnicodeEncodeError: 'ascii' codec can't encode characters in position 42-43: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 94, in call response = response or self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib64/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py", line 65, in call return self.application(environ, start_response) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 141, in call response = self.get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 75, in get_response response = self._middleware_chain(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html t = DEBUG_ENGINE.from_string(fh.read()) File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128) [20/Mar/2020 16:09:43] "POST /baseline/linux_scan_res_report/ HTTP/1.1" 500 59
你好,问题已经修复,并已经发布新的docker镜像和Agent。Github.com/chroblert/assetmanage上有具体的说明文档 有问题可以随时联系我,并可以三种方式安装。Docker镜像registry.cn-hangzhou.aliyuncs.com/jc0o0l/assetmanage:v3.0.0
发件人: cilan2 发送时间: 2020年3月20日 16:34 收件人: chroblert/AssetManage 抄送: jerrybird; Comment 主题: Re: [chroblert/AssetManage] windows 脚本能执行并在后台展示,linux执行失败 (#7)
还有个问题,我把修改好的json发送过去,格式修改对了。然后报错又变了
(Pdb) s
--Call--
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py(174)get()
-> def get(self, instance, cls=None):
(Pdb) n
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py(175)get()
-> if instance is not None:
(Pdb) n
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py(178)get()
-> if cls._meta.abstract:
(Pdb) n
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py(183)get()
-> if cls._meta.swapped:
(Pdb) n
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py(192)get()
-> return cls._meta.managers_map[self.manager.name]
(Pdb) n
--Return--
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py(192)get()->
哥,你把windows也改坏了 HTTP/1.1 100 Continue
HTTP/1.1 500 Internal Server Error Date: Mon, 23 Mar 2020 07:24:14 GMT Server: WSGIServer/0.2 CPython/3.6.7 Content-Type: text/html X-Frame-Options: SAMEORIGIN Content-Length: 75833 Vary: Cookie
<!DOCTYPE html>
'vuln_scan_res'
Request Method: | POST |
---|---|
Request URL: | http://192.168.116.132:8888/baseline/windows_scan_res_report/ |
Django Version: | 2.2 |
Exception Type: | KeyError |
Exception Value: | 'vuln_scan_res' |
Exception Location: | /root/assetmanage/baseline/views.py in windows_scan_res_report, line 139 |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.6.7 |
Python Path: | ['/root/assetmanage', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages'] |
Server time: | ææä¸, 23 ä¸æ 2020 15:24:14 +0800 |
/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response)
def inner(request):
try:
response = get_response(request)â¦
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | KeyError('vuln_scan_res',) |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7efc4dea2668>> |
request | <WSGIRequest: POST '/baseline/windows_scan_res_report/'> |
/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py
in _get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)â¦
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
callback | <function windows_scan_res_report at 0x7efc44aa9a60> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7efc4dfa9ba8>> |
request | <WSGIRequest: POST '/baseline/windows_scan_res_report/'> |
resolver | <URLResolver 'CMDB.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=baseline.views.windows_scan_res_report, args=(), kwargs={}, url_name=windows_scan_res_report, app_names=['baseline'], namespaces=['baseline'], route=baseline/windows_scan_res_report/) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7efc4dea2668> |
wrapped_callback | <function windows_scan_res_report at 0x7efc44aa9a60> |
/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py
in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)â¦
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
callback | <function windows_scan_res_report at 0x7efc44aa9a60> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7efc4dfa9ba8>> |
request | <WSGIRequest: POST '/baseline/windows_scan_res_report/'> |
resolver | <URLResolver 'CMDB.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=baseline.views.windows_scan_res_report, args=(), kwargs={}, url_name=windows_scan_res_report, app_names=['baseline'], namespaces=['baseline'], route=baseline/windows_scan_res_report/) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7efc4dea2668> |
wrapped_callback | <function windows_scan_res_report at 0x7efc44aa9a60> |
/usr/local/lib/python3.6/dist-packages/django/views/decorators/csrf.py
in wrapped_view
def csrf_exempt(view_func):
"""Mark a view function as being exempt from the CSRF view protection."""
# view_func.csrf_exempt = True would also work, but decorators are nicer
# if they don't have side effects, so return a new function.
def wrapped_view(*args, **kwargs):
return view_func(*args, **kwargs)â¦
wrapped_view.csrf_exempt = True
return wraps(view_func)(wrapped_view)
Variable | Value |
---|---|
args | (<WSGIRequest: POST '/baseline/windows_scan_res_report/'>,) |
kwargs | {} |
view_func | <function windows_scan_res_report at 0x7efc44aa99d8> |
/root/assetmanage/baseline/views.py
in windows_scan_res_report
@csrf_exempt
def windows_scan_res_report(request):
if request.method == "POST":
bodyData=request.body
windowsScanResDict=json.loads(bodyData)
basic_info=windowsScanResDict['basic_info']
windowsVulnScanResDict=windowsScanResDict['vuln_scan_res']â¦
scanTime=basic_info['scanTime']
osVersion=basic_info['osVersion']
hostname=basic_info['hostname']
macaddr=basic_info['macaddr']
ipList=basic_info['ipList']
account_check_res=windowsScanResDict['account_check_res']
Variable | Value |
---|---|
basic_info | {'hostname': 'DESKTOP-3LH49LQ', 'ipList': '192.168.43.152;', 'macaddr': '34-E1-2D-23-62-52;', 'osVersion': 'Microsoft Windows 10 ???', 'scanTime': '2020-3-23 14:48:9'} |
bodyData | (b'\r\n{"basic_info":{"scanTime":"2020-3-23 14:48:9","osVersion":"Microsoft W' b'indows 10 ???","hostname":"DESKTOP-3LH49LQ","macaddr":"34-E1-2D-23-62-52;","' b'ipList":"192.168.43.152;"},"account_check_res":{"password_check_info":{"pass' b'wordHistorySize":"5","maximumPasswordAge":"90","minimumPasswordAge":"0","pas' b'swordComplexity":"1","clearTextPassword":"0","minimumPasswordLength":"8"},"a' b'ccount_lockout_info":{"lockoutDuration":"30","lockoutBadCount":"5","resetLoc' b'koutCount":"30"}},"audit_check_res":{"auditPolicyChange":"3","auditLogonEven' b'ts":"3","auditObjectAccess":"0","auditProcessTracking":"0","auditDSAccess":"' b'2","auditSystemEvents":"3","auditAccountLogon":"3","auditAccountManage":"2"}' b',"userright_check_res":{"seTrustedCredManAccessPrivilegeIFNone":"True","seTc' b'bPrivilegeIFNone":"True","seMachineAccountPrivilegeIFOnlySpecifiedUserOrArra' b'y":"5117;513;","seCreateGlobalPrivilegeIFNone":"*S-1-5-19,*S-1-5-20,*S-1-5-3' b'2-544,*S-1-5-6","seDenyBatchLogonRightIFContainGuests":"True","seDenyService' b'LogonRightIFContainGuests":"True","seDenyInteractiveLogonRightIFContainGuest' b's":"False","seRemoteShutdownPrivilegeIFOnlySpecifiedUserOrArray":"True","seR' b'elabelPrivilegeIFNone":"*S-1-5-21-951862491-4206744170-1539856363-5132","seS' b'yncAgentPrivilegeIFNone":"*S-1-5-21-951862491-4206744170-1539856363-5132"},"' b'secureoption_check_res":{"enableGuestAccount":"False","limitBlankPasswordUse' b'":"True","newAdministratorName":"False","newGuestName":"False","dontDisplayL' b'astUserName":"False","disableCAD":"True","inactivityTimeoutSecs":"600","enab' b'lePlainTextPassword":"True","autoDisconnect":"False","noLMHash":"True","lsaA' b'nonymousNameLookup":"False","restrictAnonymousSAM":"True","restrictAnonymous' b'":"False","clearPageFileAtShutdown":"False"},"portsecure_check_res":{"rdpPor' b't":"3389"},"systemsecure_check_res":{"autoRunRes":"False"}}') |
request | <WSGIRequest: POST '/baseline/windows_scan_res_report/'> |
windowsScanResDict | {'account_check_res': {'account_lockout_info': {'lockoutBadCount': '5', 'lockoutDuration': '30', 'resetLockoutCount': '30'}, 'password_check_info': {'clearTextPassword': '0', 'maximumPasswordAge': '90', 'minimumPasswordAge': '0', 'minimumPasswordLength': '8', 'passwordComplexity': '1', 'passwordHistorySize': '5'}}, 'audit_check_res': {'auditAccountLogon': '3', 'auditAccountManage': '2', 'auditDSAccess': '2', 'auditLogonEvents': '3', 'auditObjectAccess': '0', 'auditPolicyChange': '3', 'auditProcessTracking': '0', 'auditSystemEvents': '3'}, 'basic_info': {'hostname': 'DESKTOP-3LH49LQ', 'ipList': '192.168.43.152;', 'macaddr': '34-E1-2D-23-62-52;', 'osVersion': 'Microsoft Windows 10 ???', 'scanTime': '2020-3-23 14:48:9'}, 'portsecure_check_res': {'rdpPort': '3389'}, 'secureoption_check_res': {'autoDisconnect': 'False', 'clearPageFileAtShutdown': 'False', 'disableCAD': 'True', 'dontDisplayLastUserName': 'False', 'enableGuestAccount': 'False', 'enablePlainTextPassword': 'True', 'inactivityTimeoutSecs': '600', 'limitBlankPasswordUse': 'True', 'lsaAnonymousNameLookup': 'False', 'newAdministratorName': 'False', 'newGuestName': 'False', 'noLMHash': 'True', 'restrictAnonymous': 'False', 'restrictAnonymousSAM': 'True'}, 'systemsecure_check_res': {'autoRunRes': 'False'}, 'userright_check_res': {'seCreateGlobalPrivilegeIFNone': '*S-1-5-19,*S-1-5-20,*S-1-5-32-544,*S-1-5-6', 'seDenyBatchLogonRightIFContainGuests': 'True', 'seDenyInteractiveLogonRightIFContainGuests': 'False', 'seDenyServiceLogonRightIFContainGuests': 'True', 'seMachineAccountPrivilegeIFOnlySpecifiedUserOrArray': '5117;513;', 'seRelabelPrivilegeIFNone': '*S-1-5-21-951862491-4206744170-1539856363-5132', 'seRemoteShutdownPrivilegeIFOnlySpecifiedUserOrArray': 'True', 'seSyncAgentPrivilegeIFNone': '*S-1-5-21-951862491-4206744170-1539856363-5132', 'seTcbPrivilegeIFNone': 'True', 'seTrustedCredManAccessPrivilegeIFNone': 'True'}} |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
COLORTERM | 'truecolor' |
CONTENT_LENGTH | '1803' |
CONTENT_TYPE | 'application/json' |
DBUS_SESSION_BUS_ADDRESS | 'unix:path=/run/user/0/bus' |
DESKTOP_SESSION | 'gnome' |
DISPLAY | ':1' |
DJANGO_SETTINGS_MODULE | 'CMDB.settings' |
GATEWAY_INTERFACE | 'CGI/1.1' |
GDMSESSION | 'gnome' |
GDM_LANG | 'en_US.UTF-8' |
GJS_DEBUG_OUTPUT | 'stderr' |
GJS_DEBUG_TOPICS | 'JS ERROR;JS LOG' |
GNOME_DESKTOP_SESSION_ID | 'this-is-deprecated' |
GNOME_TERMINAL_SCREEN | '/org/gnome/Terminal/screen/577a81c8_b93a_4656_8d85_8bb9011cbe7d' |
GNOME_TERMINAL_SERVICE | ':1.62' |
GPG_AGENT_INFO | '/run/user/0/gnupg/S.gpg-agent:0:1' |
GTK_MODULES | 'gail:atk-bridge' |
HOME | '/root' |
HTTP_CONNECTION | 'Keep-Alive' |
HTTP_EXPECT | '100-continue' |
HTTP_HOST | '192.168.116.132:8888' |
HTTP_USER_AGENT | 'Mozilla/5.0 (Windows NT; Windows NT 10.0; zh-CN) WindowsPowerShell/5.1.18362.1' |
LANG | 'en_US.UTF-8' |
LOGNAME | 'root' |
LS_COLORS | 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:' |
OLDPWD | '/root/assetmanage/Agent' |
PATH | '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' |
PATH_INFO | '/baseline/windows_scan_res_report/' |
PWD | '/root/assetmanage' |
QT_ACCESSIBILITY | '1' |
QUERY_STRING | '' |
REMOTE_ADDR | '192.168.116.1' |
REMOTE_HOST | '' |
REQUEST_METHOD | 'POST' |
RUN_MAIN | 'true' |
SCRIPT_NAME | '' |
SERVER_NAME | 'kali' |
SERVER_PORT | '8888' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SOFTWARE | 'WSGIServer/0.2' |
SESSION_MANAGER | 'local/kali:@/tmp/.ICE-unix/856,unix/kali:/tmp/.ICE-unix/856' |
SHELL | '/bin/bash' |
SHLVL | '1' |
SSH_AGENT_PID | '942' |
SSH_AUTH_SOCK | '/run/user/0/keyring/ssh' |
TERM | 'xterm-256color' |
TZ | 'Asia/Shanghai' |
USER | 'root' |
USERNAME | 'root' |
VTE_VERSION | '5202' |
WINDOWPATH | '2' |
XAUTHORITY | '/run/user/0/gdm/Xauthority' |
XDG_CURRENT_DESKTOP | 'GNOME' |
XDG_DATA_DIRS | '/usr/share/gnome:/usr/local/share/:/usr/share/' |
XDG_MENU_PREFIX | 'gnome-' |
XDG_RUNTIME_DIR | '/run/user/0' |
XDG_SEAT | 'seat0' |
XDG_SESSION_DESKTOP | 'gnome' |
XDG_SESSION_ID | '2' |
XDG_SESSION_TYPE | 'x11' |
XDG_VTNR | '2' |
_ | '/usr/bin/python3' |
wsgi.errors | <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <django.core.handlers.wsgi.LimitedStream object at 0x7efc4dbc0828> |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
CMDB.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['*'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/root/assetmanage' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': '/root/assetmanage/db.sqlite3', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': ''}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'localhost' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'assets.apps.AssetsConfig', 'manage.apps.ManageConfig', 'baseline.apps.BaselineConfig'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'zh-hans' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '' |
MEDIA_URL | '' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'CMDB.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'CMDB.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | ['/root/assetmanage/static'] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | None |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/root/assetmanage/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'Asia/Shanghai' |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | False |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'CMDB.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.
[23/Mar/2020 15:12:21] "GET /baseline/scan_res_display/ HTTP/1.1" 200 15528 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/bootstrap/dist/css/bootstrap.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/font-awesome/css/font-awesome.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/Ionicons/css/ionicons.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/dist/css/AdminLTE.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/dist/css/skins/skin-blue.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/dist/img/user2-160x160.jpg HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/jquery/dist/jquery.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/font-awesome/fonts/fontawesome-webfont.eot? HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/bootstrap/dist/js/bootstrap.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/dist/js/adminlte.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/datatables.net/js/jquery.dataTables.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:12:21] "GET /static/adminlet-2.4.10/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /baseline/scan_res_display/ HTTP/1.1" 200 15528 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/bower_components/bootstrap/dist/css/bootstrap.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/bower_components/font-awesome/css/font-awesome.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/bower_components/Ionicons/css/ionicons.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/dist/css/AdminLTE.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/dist/css/skins/skin-blue.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/dist/img/user2-160x160.jpg HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/bower_components/jquery/dist/jquery.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/bower_components/font-awesome/fonts/fontawesome-webfont.eot? HTTP/1.1" 304 0 [23/Mar/2020 15:20:11] "GET /static/adminlet-2.4.10/bower_components/bootstrap/dist/js/bootstrap.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:20:12] "GET /static/adminlet-2.4.10/dist/js/adminlte.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:20:12] "GET /static/adminlet-2.4.10/bower_components/datatables.net/js/jquery.dataTables.min.js HTTP/1.1" 304 0 [23/Mar/2020 15:20:12] "GET /static/adminlet-2.4.10/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js HTTP/1.1" 304 0 Internal Server Error: /baseline/windows_scan_res_report/ Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) File "/usr/local/lib/python3.6/dist-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(args, **kwargs) File "/root/assetmanage/baseline/views.py", line 139, in windows_scan_res_report windowsVulnScanResDict=windowsScanResDict['vuln_scan_res'] KeyError: 'vuln_scan_res' [23/Mar/2020 15:24:14] "POST /baseline/windows_scan_res_report/ HTTP/1.1" 500 75833
我去??? 有一个问题,有没有使用最新的脚本去扫描(在agent目录下),上面代码显示是没有“vuln_scan_res"这个key,新脚本里面增加的
我下载的源码,,然后直接把源码agent里面的windows拷贝出来执行的 ,您说的扫描是什么意思
我这边刚刚用两台电脑试了一下,没问题的 需要用管理员权限运行
想问下你用来执行agent的系统版本是什么,我这边准备试下
win10版本的
ok了,感谢指导。因为没用root直行
🆗
windows 脚本能执行并在后台展示,linux执行失败 我直接拉docker运行的