|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
Добрый день, уважаемое сообщество! Помогите добрым советом в сабжевом вопросе. В интернетах и гуглах проблема конечно частично рассмотрена, но многие тонкости остаются за кадром. Есть желание русифицировать один проект, исходных кодов проекта нет, но поддержка нескольких языков заявлена. Проект написан на vb под Net 2.0. Проблема № 1: Берем файл. Декомпилируем файл c помощью ILDASM.EXE получаем тучу файлов: dump.il dump.res Elefir-EN.exe.licenses Elefir_EN.calc_BIFlexão.resources Elefir_EN.calc_FlexãoComposta.resources Elefir_EN.Dialog1.resources Elefir_EN.Dialog4.resources Elefir_EN.dlgArea.resources Elefir_EN.dlgCalcEspessura.resources Elefir_EN.dlgCompAco.resources Elefir_EN.dlgDiametro.resources Elefir_EN.dlgFlexãoVCTipoAnálise.resources Elefir_EN.dlgFlexãoVCTipoAnálise_semtransverso.resources Elefir_EN.frmOtherSteel.resources Elefir_EN.k1k2.resources Elefir_EN.pAberturas.resources Elefir_EN.pUtilizador.resources Elefir_EN.resParametrica.resources Elefir_EN.Resultados_FO.resources Elefir_EN.revTemperatura.resources Elefir_EN.calc_Flexão.resources Elefir_EN.dlgPartialFactors.resources Elefir_EN.dlgQ.resources Elefir_EN.encLateral.resources Elefir_EN.fl_Utilizador2.resources Elefir_EN.frmMDI.resources Elefir_EN.resFlexãoComposta.resources Elefir_EN.Resources.resources Elefir_EN.resOutras.resources Elefir_EN.About.resources Elefir_EN.calc_Tracção.resources Elefir_EN.Curvas.resources Elefir_EN.calc_EsforçoTransverso.resources Elefir_EN.ccLabelUserControl.ccLabel.resources Elefir_EN.cExposiçãoIH.resources Elefir_EN.cExposiçãoL.resources Elefir_EN.DefPerfil.resources Elefir_EN.Dialog2.resources Elefir_EN.Dialog5.resources Elefir_EN.dlgClasse4ok.resources Elefir_EN.dlgHTot.resources Elefir_EN.dlgMessageFormFactor.resources Elefir_EN.dlgNumberSeparated.resources Elefir_EN.dlgTemperatura.resources Elefir_EN.fl_Incêndio.resources Elefir_EN.fl_nAtingeTecto.resources Elefir_EN.fl_xlQ.resources Elefir_EN.Form10.resources Elefir_EN.frmDiagMomentos.resources Elefir_EN.frmLicAgreement.resources Elefir_EN.frmMomCLatExtr.resources Elefir_EN.frmMomExt.resources Elefir_EN.frmSteelProperties.resources Elefir_EN.Languages.resources Elefir_EN.pbResultados.resources Elefir_EN.pCamadas.resources Elefir_EN.pCompartimento.resources Elefir_EN.pIncêndio.resources Elefir_EN.resFlexaoEsfTransverso.resources Elefir_EN.resFlexãoTracção.resources Elefir_EN.resFogoLocalizado.resources Elefir_EN.ResultadosFlexãoComposta.resources Elefir_EN.calc_Compressão.resources Elefir_EN.calc_FlexãoEsfTransverso.resources Elefir_EN.calc_FlexãoTracção.resources Elefir_EN.calc_FlexãoVC.resources Elefir_EN.calc_FlexãoVC_semtransverso.resources Elefir_EN.cExposiçãoC.resources Elefir_EN.cExposiçãoSR.resources Elefir_EN.Dialog3.resources Elefir_EN.dlgEspessura.resources Elefir_EN.dlgPermissions.resources Elefir_EN.dlgQ2.resources Elefir_EN.dlgRevestimento.resources Elefir_EN.fl_AtingeTecto.resources Elefir_EN.fl_Multiplos.resources Elefir_EN.Form7.resources Elefir_EN.Form25.resources Elefir_EN.frmMomCargLat.resources Elefir_EN.frmOptions.resources Elefir_EN.frmRegister.resources Elefir_EN.Gráfico.resources Elefir_EN.Idioma.resources Elefir_EN.MenuInicial.resources Elefir_EN.pbGráfico.resources Elefir_EN.resNormal.resources Elefir_EN.ResultadosMec.resources Elefir_EN.resUtilizador.resources Elefir_EN.Revestimento.resources Elefir_EN.Splash.resources Elefir_EN.xlCamadas.resources Elefir_EN.xlRevestimento.resources Elefir_EN.xlTT.resources Dumptree.txt Elefir-EN.exe Делаем попытку собрать проект обратно c ILASM.EXE c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ilasm.exe /resource=d:\Elefir-decom\*.resources /output=Elefir-EN.exe d:\Elefir-decom\dump.il >Compiler.log в итоге ошибка: Resolving local member refs: 0 -> 0 defs, 0 refs, 0 unresolved Could not create output file, error code=0x8007007B ***** FAILURE ***** Полный лог прикреплен к сообщению. гугление по коду ошибки выдает буквально пару страниц со схожими, но не дает понимания, что не так? Проблема № 2 Попробовал восстановить код рефлектором - восстановил файлы .vb Потом с помощью Resgen.exe перевел .resources в .resx Кстати, как это сделать пакетно по маске, а не каждый файл отдельно? А дальше закавыка. Добавляю код и ресурсы в пустой проект через Project/Add Existing Item (VS 2005), но форм не вижу. Похоже я недопонимаю принцип, но как восстановить визуальный вид формы? Исходный файл: http://dfiles.ru/files/arrtdjyig] http://dfiles.ru/files/arrtdjyig ... |
|||
:
Нравится:
Не нравится:
|
|||
01.04.2013, 13:24 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
slavapro, для русификации тебе нужно только руссифицированные ресурсы положить рядом, перекомпиляция не нужна ... |
|||
:
Нравится:
Не нравится:
|
|||
01.04.2013, 14:50 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
pationslavapro, для русификации тебе нужно только руссифицированные ресурсы положить рядом, перекомпиляция не нужна Честно? Все оказывается так просто? Только не прокатывает что-то. А как вам такие инструкции в декомпилированном коде: Код: vbnet 1. 2. 3. 4. 5. 6.
Они типа сами подсосутся в исходник? ... |
|||
:
Нравится:
Не нравится:
|
|||
01.04.2013, 15:02 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
slavaproно поддержка нескольких языков заявлена. звездёш придёться декомпилировать, вставлять свои строки и собирать обратно ... |
|||
:
Нравится:
Не нравится:
|
|||
01.04.2013, 17:26 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
Немного продвинулся по проблеме № 2: Понизил версию рефлектора до 7 и код нормально разложился в проект. Но таже беда - собрать проект невозможно. ... |
|||
:
Нравится:
Не нравится:
|
|||
03.04.2013, 23:04 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
Трэш какой. Искренне сочувствую. slavaproНемного продвинулся по проблеме № 2: Понизил версию рефлектора до 7 и код нормально разложился в проект.В нормальный vb-проект? Который хотя бы без ошибок открывается в какой-нибудь студии? Если так, то самое сложное вы уже сделали, осталось самое муторное. Намылить, смыть, повторить. А если судить по названиям модулей, это будет знатный быдлокодец. slavaproНо таже беда - собрать проект невозможно.Студия должна выдавать какие-то ошибки, о них нужно говорить предметно. Или проект выложить, если не жалко. ... |
|||
:
Нравится:
Не нравится:
|
|||
03.04.2013, 23:20 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
slavapro, Похоже он ругается только на вражескую кодировку, не анси. файлы, которые с этими испаскими символами типа ищет Elefir_EN.calc_FlexaoVC_semtransverso.resources , а находит это Elefir_EN.calc_FlexãoVC_semtransverso.resources ... |
|||
:
Нравится:
Не нравится:
|
|||
04.04.2013, 00:04 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
вот вроде то место в il файле. он явно хочет получить нечто другое Код: c# 1. 2. 3. 4. 5. 6.
походу трабла токма в кодировках ... |
|||
:
Нравится:
Не нравится:
|
|||
04.04.2013, 00:10 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
beg-in-er, вот, стоило добавить ildasm.exe /OUT=TT.ex.il TT.exe /utf-8 сразу появились новые ошибки авторClass 130 Class 131 Resolving local member refs: 0 -> 0 defs, 0 refs, 0 unresolved Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oTrac??o.resources' Error: failed to read expected 79959 bytes from mgd resource file 'Elefir_EN.calc_Flex?oTrac??o.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oSR.resources' Error: failed to read expected 35836 bytes from mgd resource file 'Elefir_EN.cExposi??oSR.resources' ... |
|||
:
Нравится:
Не нравится:
|
|||
04.04.2013, 00:16 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
slavapro, попробуйте сделать так откройте il-файл в блокноте ( ну или в чём лучше), замените там втупую все эти calc_FlexãoVC на Анси calc_FlexaoVC для всех этих гишпаский файлов, то может и получится. я переименовал calc_FlexãoVC в calc_FlexaoVC было Resolving local member refs: 0 -> 0 defs, 0 refs, 0 unresolved Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oTrac??o.resources' Error: failed to read expected 79959 bytes from mgd resource file 'Elefir_EN.calc_Flex?oTrac??o.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oSR.resources' Error: failed to read expected 35836 bytes from mgd resource file 'Elefir_EN.cExposi??oSR.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oVC.resources' Error: failed to read expected 103335 bytes from mgd resource file 'Elefir_EN.calc_Flex?oVC.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Compress?o.resources' Error: failed to read expected 91120 bytes from mgd resource file 'Elefir_EN.calc_Compress?o.resources' Error: failed to open mgd resource file 'Elefir_EN.pbGr?fico.resources' Error: failed to read expected 12884 bytes from mgd resource file 'Elefir_EN.pbGr?fico.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oEsfTransverso.resources' Error: failed to read expected 105599 bytes from mgd resource file 'Elefir_EN.calc_Flex?oEsfTransverso.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oC.resources' Error: failed to read expected 32954 bytes from mgd resource file 'Elefir_EN.cExposi??oC.resources' Error: failed to open mgd resource file 'Elefir_EN.Gr?fico.resources' Error: failed to read expected 33952 bytes from mgd resource file 'Elefir_EN.Gr?fico.resources' Error: failed to open mgd resource file 'Elefir_EN.resFlex?oTrac??o.resources' Error: failed to read expected 40695 bytes from mgd resource file 'Elefir_EN.resFlex?oTrac??o.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oL.resources' Error: failed to read expected 32955 bytes from mgd resource file 'Elefir_EN.cExposi??oL.resources' Error: failed to open mgd resource file 'Elefir_EN.fl_Inc?ndio.resources' Error: failed to read expected 216097 bytes from mgd resource file 'Elefir_EN.fl_Inc?ndio.resources' Error: failed to open mgd resource file 'Elefir_EN.ResultadosFlex?oComposta.resources' Error: failed to read expected 50170 bytes from mgd resource file 'Elefir_EN.ResultadosFlex?oComposta.resources' Error: failed to open mgd resource file 'Elefir_EN.pInc?ndio.resources' Error: failed to read expected 179782 bytes from mgd resource file 'Elefir_EN.pInc?ndio.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oIH.resources' Error: failed to read expected 41899 bytes from mgd resource file 'Elefir_EN.cExposi??oIH.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Esfor?oTransverso.resources' Error: failed to read expected 76239 bytes from mgd resource file 'Elefir_EN.calc_Esfor?oTransverso.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Trac??o.resources' Error: failed to read expected 78582 bytes from mgd resource file 'Elefir_EN.calc_Trac??o.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?o.resources' Error: failed to read expected 126155 bytes from mgd resource file 'Elefir_EN.calc_Flex?o.resources' Error: failed to open mgd resource file 'Elefir_EN.resFlex?oComposta.resources' Error: failed to read expected 41372 bytes from mgd resource file 'Elefir_EN.resFlex?oComposta.resources' Error: failed to open mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise_semtransverso.resources' Error: failed to read expected 8816 bytes from mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise_semtransverso.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oComposta.resources' Error: failed to read expected 136513 bytes from mgd resource file 'Elefir_EN.calc_Flex?oComposta.resources' Error: failed to open mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise.resources' Error: failed to read expected 8802 bytes from mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_BIFlex?o.resources' Error: failed to read expected 82861 bytes from mgd resource file 'Elefir_EN.calc_BIFlex?o.resources' Could not create output file, error code=0x80004005 ***** FAILURE ***** стало Resolving local member refs: 0 -> 0 defs, 0 refs, 0 unresolved Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oTrac??o.resources' Error: failed to read expected 79959 bytes from mgd resource file 'Elefir_EN.calc_Flex?oTrac??o.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oSR.resources' Error: failed to read expected 35836 bytes from mgd resource file 'Elefir_EN.cExposi??oSR.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Compress?o.resources' Error: failed to read expected 91120 bytes from mgd resource file 'Elefir_EN.calc_Compress?o.resources' Error: failed to open mgd resource file 'Elefir_EN.pbGr?fico.resources' Error: failed to read expected 12884 bytes from mgd resource file 'Elefir_EN.pbGr?fico.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oEsfTransverso.resources' Error: failed to read expected 105599 bytes from mgd resource file 'Elefir_EN.calc_Flex?oEsfTransverso.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oC.resources' Error: failed to read expected 32954 bytes from mgd resource file 'Elefir_EN.cExposi??oC.resources' Error: failed to open mgd resource file 'Elefir_EN.Gr?fico.resources' Error: failed to read expected 33952 bytes from mgd resource file 'Elefir_EN.Gr?fico.resources' Error: failed to open mgd resource file 'Elefir_EN.resFlex?oTrac??o.resources' Error: failed to read expected 40695 bytes from mgd resource file 'Elefir_EN.resFlex?oTrac??o.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oL.resources' Error: failed to read expected 32955 bytes from mgd resource file 'Elefir_EN.cExposi??oL.resources' Error: failed to open mgd resource file 'Elefir_EN.fl_Inc?ndio.resources' Error: failed to read expected 216097 bytes from mgd resource file 'Elefir_EN.fl_Inc?ndio.resources' Error: failed to open mgd resource file 'Elefir_EN.ResultadosFlex?oComposta.resources' Error: failed to read expected 50170 bytes from mgd resource file 'Elefir_EN.ResultadosFlex?oComposta.resources' Error: failed to open mgd resource file 'Elefir_EN.pInc?ndio.resources' Error: failed to read expected 179782 bytes from mgd resource file 'Elefir_EN.pInc?ndio.resources' Error: failed to open mgd resource file 'Elefir_EN.cExposi??oIH.resources' Error: failed to read expected 41899 bytes from mgd resource file 'Elefir_EN.cExposi??oIH.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Esfor?oTransverso.resources' Error: failed to read expected 76239 bytes from mgd resource file 'Elefir_EN.calc_Esfor?oTransverso.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Trac??o.resources' Error: failed to read expected 78582 bytes from mgd resource file 'Elefir_EN.calc_Trac??o.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?o.resources' Error: failed to read expected 126155 bytes from mgd resource file 'Elefir_EN.calc_Flex?o.resources' Error: failed to open mgd resource file 'Elefir_EN.resFlex?oComposta.resources' Error: failed to read expected 41372 bytes from mgd resource file 'Elefir_EN.resFlex?oComposta.resources' Error: failed to open mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise_semtransverso.resources' Error: failed to read expected 8816 bytes from mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise_semtransverso.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_Flex?oComposta.resources' Error: failed to read expected 136513 bytes from mgd resource file 'Elefir_EN.calc_Flex?oComposta.resources' Error: failed to open mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise.resources' Error: failed to read expected 8802 bytes from mgd resource file 'Elefir_EN.dlgFlex?oVCTipoAn?lise.resources' Error: failed to open mgd resource file 'Elefir_EN.calc_BIFlex?o.resources' Error: failed to read expected 82861 bytes from mgd resource file 'Elefir_EN.calc_BIFlex?o.resources' один файл из списка пропал ... |
|||
:
Нравится:
Не нравится:
|
|||
04.04.2013, 00:52 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
beg-in-er, А может в виртуалке установить испанскую версию Цindows и из под нее всё делать - тогда может быть (только предположение) конвертация в utf8 будет проходить без ошибок? ... |
|||
:
Нравится:
Не нравится:
|
|||
04.04.2013, 01:53 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
Pochemuchkin2011, да всё можно. правда я только предположил , что испанская. если что то мудрить , то поставить на допязык. так ещё проще. “(0x8007007B) Синтаксическая ошибка в имени файла, имени папки или метке тома ” ... |
|||
:
Нравится:
Не нравится:
|
|||
04.04.2013, 01:58 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
а у вас венда куплена? если да, то перед сборкой поди текст лицензии декомпилируемой проги можно почитать, ГК, УК и т.п. ... |
|||
:
Нравится:
Не нравится:
|
|||
04.04.2013, 10:15 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
Спасибо ответившим, в VS проект раскладывается нормально, исходный язык проекта - португальский, при сборке ILasmom я пробовал его включать в системе, но это не помогло. Насчет португальской винды - это идея, можно попробовать. ... |
|||
:
Нравится:
Не нравится:
|
|||
20.04.2013, 20:50 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
sanyock2а у вас венда куплена? если да, то перед сборкой поди текст лицензии декомпилируемой проги можно почитать, ГК, УК и т.п. не совсем понятно какое отношение ваше сообщение имеет к топику? ... |
|||
:
Нравится:
Не нравится:
|
|||
20.04.2013, 20:57 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
AntonariyТрэш какой. Искренне сочувствую. slavaproНемного продвинулся по проблеме № 2: Понизил версию рефлектора до 7 и код нормально разложился в проект.В нормальный vb-проект? Который хотя бы без ошибок открывается в какой-нибудь студии? Если так, то самое сложное вы уже сделали, осталось самое муторное. Намылить, смыть, повторить. А если судить по названиям модулей, это будет знатный быдлокодец. slavaproНо таже беда - собрать проект невозможно.Студия должна выдавать какие-то ошибки, о них нужно говорить предметно. Или проект выложить, если не жалко. по-идее студия поддерживает написание имен в национальных кодировках проект в студии прилагаю: http://dfiles.ru/files/hbphz0cmx ... |
|||
:
Нравится:
Не нравится:
|
|||
20.04.2013, 21:33 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
Посмотрел проект. Качество декомпиляции довольно низкое, вплоть до синтаксических ошибок. Португальский тут как бы вообще ни при чем. Большая часть ошибок связано с путаницей в пространствах имен и отсутствии импортов. Первым делом проставил самые востребованные импорты, добавил затычку Код: vbnet 1. 2. 3.
после чего ушла большая часть ошибок о не объявленных членах, но дальше начался полный зоопарк. Хитами стали Имя <имя формы> совпадает с именем другого типа в группе "My". Переименуйте тип или пространство имен, к которому он относится.и"__ENCList" уже объявлен в этом class как "Private Shared Shadows __ENCList As System.Collections.Generic.List(Of System.WeakReference)"Отсутствует какая-либо инфа о контроле RichTextBoxPrintCtrl. Формы в режиме дизайнера не открываются из за систематических ошибок в пространствах имен. ... |
|||
:
Нравится:
Не нравится:
|
|||
21.04.2013, 08:23 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
Исходный код восстановлен нормально, но исходные взаимосвязи лежат в руинах, я бы сказал. ... |
|||
:
Нравится:
Не нравится:
|
|||
21.04.2013, 08:29 |
|
Восстановление исходного кода в .NET
|
|||
---|---|---|---|
#18+
AntonariyИсходный код восстановлен нормально, но исходные взаимосвязи лежат в руинах, я бы сказал. Здесь частично моя вина, с файлом распространяются еще несколько dll: RichTextBoxPrintCtrl.dll System.Windows.Forms.DataVisualization.dll ... |
|||
:
Нравится:
Не нравится:
|
|||
23.04.2013, 10:33 |
|
|
start [/forum/topic.php?fid=20&fpage=166&tid=1404804]: |
0ms |
get settings: |
9ms |
get forum list: |
10ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
27ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
107ms |
get tp. blocked users: |
2ms |
others: | 30ms |
total: | 202ms |
0 / 0 |