|
What is best Online Decompiler For Exe Code Reverse( C# and delphi)
|
|
|
|
|
.NET Reflector is the best. I've used ILSpy to a similar degree of success before as well.
Adrian Gates
Sr. System Admin - Apps4Rent
|
|
|
|
|
Hello All,
I am building a C# windows app using SQLite database. I built the database in DB Browser SQLite. I used the built in SQLcipher that comes with the new version of SQLite and added a password (testing123). Once I created a datasource in VS 2015 Community I used the wizard to browse to the database and supplied the password to add the database to my project. When I click the Test Connection it says everything is fine. However, when I expand the database in the datasource pane of VS I get an error that says something about File is encrypted or is not a database, even though the password is in the connection string in the Apps settings of the VS project. If I do not encrypt the database in DB Browser SQLite everything works fine. Also, if I create the database file as a new database in VS and put in the password upon creation VS allows the file to be encrypted and opening up in SQLite I must supply the PW to connect, however, after I build the database tables and put back in VS it does connect any more. Does anyone have any advise and do I need SQLcipher in my project to decrypt the database? If so, where would I get this and how do I use it?
I do not have code since this is design time and I haven't even started to code since all I am doing is attaching the database and trying to navigate in the datasource to see my tables.
|
|
|
|
|
Hello! I have seen example of a code that was written with using python 3.-- but i work with 2.7 and i don't know how to fix a problem with coding symbols from extensional latin. I suppose that there is little error with syntax. But ok will use Python 3. In this code - example i work with a NTFS-file, which allow you add some additional information for effective using. Here it use for translating some word in different languages.
When i input a desire word which i want to translate i get a error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128). I write some comments to my lines. When the block "Write streams" begins to work - is print only first 2 streams even i input any word which include usuallatin simbols, for example: "White".
But, if i work in python 3 - it code works but i get following error. I parse my list named DATA to the list WORDS and i'd to write this content in a streams in 3 languages, but if i use
this:
with open(filestream, mode='w', encoding='utf8') as stream:
stream.write(stream_content(dataitem))
i get incorrect content after reading. It looks like as:
T:
r
R:
o
R:
o
J:
u
R:
o
B:
e
D:
o
T:
w
S:
t
S:
t
O:
p
W:
h
Y:
e
C:
a
B:
u
T:
r
C:
y
M:
o
P:
e
Д:
о
Д:
о
У:
ч
У:
с
П:
е
О:
п
О:
п
Д:
в
К:
р
К:
р
Р:
а
Б:
е
Ж:
ё
В:
о
В:
о
В:
о
В:
е
М:
о
П:
е
K:
r
Ú:
t
Ú:
t
E:
l
K:
ö
V:
e
E:
g
S:
z
V:
e
V:
e
F:
e
S:
á
G:
é
B:
u
T:
e
K:
e
M:
o
G:
y
Also i have a mistake, when i try return Word from function find_language. As i know if i put Word in some list and try to return it as list[0], because Word it is single right value, which i try to get through the loop
for it in range(len(Result)):
"""
Created on Sat Dec 31 03:33:00 2016
@author: SKY_SHY
"""
from codecs import open
def stream_content(data):
return '\n'.join(item[0] + ':\n ' + '\n '.join(item[1]) for item in data)
filename = "DATA_"
def translate():
Des_word = input("Enter a word you desire to translate:")
print ('EN = 0', 'RU = 1', 'HU = 2')
Des_language = int(input("Select a language:"))
return Des_word, Des_language
Des_word, Des_language = translate()
EN = [['Traffic sings',
['Junctions', 'Roundabout ahead', 'Bend ahead', 'Double bend ahead',
'Two-way traffic', 'Steep hill downwards', 'Steep hill upwards',
'Opening bridge ahead']],
['Road markings', ['White', 'Yellow']],
['Road users',
['Car-Drivers', 'Bus-Drivers', 'Truck-Drivers', 'Cycllists',
'Motorcyclists', 'Pedestrians']]]
RU = [['Дорожные знаки',
['Уступите дорогу', 'Пересечение с круговым движением', 'Опасный поворот',
'Опасные повороты', 'Двустороннее движение', 'Крутой спуск',
'Крутой подъём', 'Разводной мост']],
['Дорожная разметка', ['Белая', 'Жёлтая']],
['Участники движения',
['Водители легковых автомобилей', 'Водители автобусов',
'Водители грузовых автомобилей', 'Велосипедисты', 'Мотоциклисты',
'Пешеходы']]]
HU = [['Kresz táblák',
['Elsőbbségadás kötelező', 'Körforgalo', 'Veszélyes útkanyarulat',
'Egymás utáni veszélyes útkanyarulatok', 'Szembejövő forgalom', 'Veszélyes lejtő',
'Veszélyes emelkedő' 'Kompátkelés, vagy nyitható híd']],
['Útburkolati jelek', ['Fehér', 'Sárga']], ['Úthasználók',['Gépjárművezetők', 'Buszvezetők',
'Tehergépkocsi-vezetők', 'Kerékpárosok', 'Motorkerékpárosok', 'Gyalogosok']]]
DATA = [EN, RU, HU]
Labels = ['EN', 'RU', 'HU']
WORDS=[]
for k in range(len(DATA)):
g = [DATA[k][row][0] for row in range(len(DATA[k]))]
j=[]
for row in range(len(DATA[k])):
for i in range(len(DATA[k][row][1])):
j.append(DATA[k][row][1][i])
s =g+j
WORDS.append(s)
for namestream, dataitem in zip(Labels, WORDS):
filestream = '{}:{}'.format(filename, namestream)
print (filestream, dataitem)
with open(filestream, mode='w', encoding='utf8') as stream:
stream.write(stream_content(dataitem))
for namestream, dataitem in zip(Labels, WORDS):
filestream = '{}:{}'.format(filename, namestream)
with open(filestream, 'r', encoding='utf8') as stream:
sc = stream.read()
print(sc)
def find_language(WORDS, Labels, Des_word):
RESULT=[]
for namestream, dataitem in zip(Labels, WORDS):
filestream = '{}:{}'.format(filename, namestream)
Result = []
with open(filestream, 'r', encoding='utf8') as stream:
sc = stream.read()
for it in sc.split():
Result.append(it)
Result=[str(t) for t in Result]
for it in range(len(Result)):
if Des_word == Result[it]:
Word=Result[it]
print (Word)
RESULT.append(Word)
Your_language = filestream
else:
continue
return RESULT[0], Your_language
Word, Your_language = find_language(WORDS, Labels, Des_word)
print (Word)
if Word is None:
if Des_language ==0:
print ("No such word!")
elif Des_language ==1:
print ("Нет такого слова!")
elif Des_language ==2:
print ("Nincs ilyen szo!")
else:
Translated_lang=[]
with open(Your_language, 'r', encoding='utf8') as stream:
sc = stream.readlines()
for inf in sc:
print (inf.rstrip('\n'))
Translated_lang.append(str(inf.rstrip('\n')))
'''Translated_lang=[str(h) for h in Translated_lang]# If i found my word in DATA then i read information from appropriate stream of the file and put all words in list'''
print (Translated_lang)
Translating_lang=[]
Str_of_trans_ing_lang = '{}:{}'.format(filename, Labels[Des_language])
with open(Str_of_trans_ing_lang, 'r', encoding='utf8') as stream:
mc = stream.readlines()
for inf in mc:
Translating_lang.append(str(inf.rstrip('\n')))
'''Translating_lang=[str(sp) for sp in Translating_lang]# I put words from another stream, which include foreign words'''
print (Translating_lang)
DICT = dict(zip(Translated_lang, Translating_lang))
Trans_word = DICT[Des_word]
print ("Your translate:" , Trans_word)
modified 5-Jan-17 4:36am.
|
|
|
|
|
|
|
The error message suggest that you are trying to process Unicode text with a program that only handles ASCII. It would help if you remove all the code not relevant to the problem, and also indicate exactly where the failure occurs. Also, Python questions are more likely to get an answer when posted at Quick Answers.
|
|
|
|
|
I have the following onTime event in windows server.
I would like to try 3 times to connect and submit files before I throw an exception.
How would I do this?
Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
Try
aTimer.Stop()
Dim fileName As String = String.Empty
While queueList.Count > 0
If _SFTP.Connected = False OrElse _SFTP.SFTPState = Dart.Ssh.ConnectionState.Closed Then
_SFTP.Connect()
End If
fileName = queueList.Dequeue.ToString
If Not fileName Is Nothing AndAlso fileName <> String.Empty Then
ProcessFile(fileName)
End If
End While
If _SFTP.Connected = True Then
_SFTP.Disconnect()
End If
aTimer.Start()
Catch ex As Exception
modCommon.SendEmailExceptionToDev("OnTimed: OnTimedEvent Exception", ex)
Err.Clear()
End Try
|
|
|
|
|
Remove the exception handler, wrap it in a new method, add exception handling there. Call your own function again from the exception-handler if it fails, and pass a counter. If the counter is three, don't call your own function, but accept defeat.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Here is what I did:
1.Add new sub: RetryOnTimeout
2. Add retry in Catch.
Is this what you suggested ?
Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
Try
RetryOnTimeout(source, e)
Catch ex As Exception
While _currentRetry < 3
RetryOnTimeout(source, e)
_currentRetry = _currentRetry + 1
End While
modCommon.SendEmailExceptionToDev("OnTimedEvent Exception", ex)
Err.Clear()
End Try
End Sub
Private Sub RetryOnTimeout(source As Object, e As ElapsedEventArgs)
Try
aTimer.Stop()
Dim fileName As String = String.Empty
While queueList.Count > 0
If _SFTP.Connected = False OrElse _SFTP.SFTPState = Dart.Ssh.ConnectionState.Closed Then
_SFTP.Connect()
End If
fileName = queueList.Dequeue.ToString
If Not fileName Is Nothing AndAlso fileName <> String.Empty Then
ProcessFile(fileName)
End If
End While
If _SFTP.Connected = True Then
_SFTP.Disconnect()
End If
aTimer.Start()
Catch ex As Exception
modCommon.SendEmailExceptionToDev("OnTimedEvent Exception", ex)
Err.Clear()
End Try
End Sub
modified 24-Oct-16 12:45pm.
|
|
|
|
|
I had something in mind with recursion, but this should work too. Would be easy to check by putting that code in a console, and replacing the mail-sending code with one that throws an exception. If you can't see what happens, add some logging.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
here my updated code. I have replace email with : Throw ex.
Is that what you mean?
I am not sure I am clear on what you have in mind. Could you share maybe the code?
:
Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
Try
RetryOnTimeout(source, e)
Catch ex As Exception
While _currentRetry < 3
RetryOnTimeout(source, e)
_currentRetry = _currentRetry + 1
End While
modCommon.SendEmailExceptionToDev("ASH File System Watcher Outgoing: OnTimedEvent Exception", ex)
Err.Clear()
End Try
End Sub
Private Sub RetryOnTimeout(source As Object, e As ElapsedEventArgs)
Try
aTimer.Stop()
Dim fileName As String = String.Empty
While queueList.Count > 0
If _SFTP.Connected = False OrElse _SFTP.SFTPState = Dart.Ssh.ConnectionState.Closed Then
_SFTP.Connect()
End If
fileName = queueList.Dequeue.ToString
If Not fileName Is Nothing AndAlso fileName <> String.Empty Then
ProcessFile(fileName)
End If
End While
If _SFTP.Connected = True Then
_SFTP.Disconnect()
End If
aTimer.Start()
Catch ex As Exception
Throw ex
End Try
End Sub
|
|
|
|
|
byka wrote: I am not sure I am clear on what you have in mind My bad; but you're complicating the problem by thinking about emails. In these cases its easier to start a new project and make a sketch of what you'd need. Example below, for a console-application.
Module Module1
Public Function MyEmailMethod() As Int32
Throw New NotImplementedException("test")
End Function
Public Function TryMyEmailMethod(maxTries As Integer, Optional currentTry As Integer = 1) As Int32
If currentTry <= maxTries Then
Try
Console.WriteLine(String.Format("Attempt {0}", currentTry))
MyEmailMethod()
Catch ex As Exception
Console.WriteLine("Caught: " + ex.GetType().Name)
TryMyEmailMethod(maxTries, currentTry + 1)
End Try
Else
Console.WriteLine("I've tried enough, that damn server is ignoring me!")
End If
End Function
Sub Main()
TryMyEmailMethod(3)
Console.ReadKey()
End Sub
End Module That would result in below output if you run it, showing the principle works as intended;
Attempt 1
Caught: NotImplementedException
Attempt 2
Caught: NotImplementedException
Attempt 3
Caught: NotImplementedException
I've tried enough, that damn server is ignoring me! Your "NotImplementedException" would be the exception that the mail-routine is throwing, and you might want to log the lines where the above code is writing to the console; after all, if a mail-server stops responding, you'd like to verify that everything else worked as expected.
Making a new project allows to focus on the problem, without anything else bothering. It also makes reuse of the new pattern somewhat easier, IMO. Also take not that above code could encounter three different exceptions or reasons why it cannot send mail, without it giving much info yet on why.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
wow make you crazy it was very disrespectful
|
|
|
|
|
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello, i have finished developing a c# code for a software, and it is time to make a installation setup for it ( using "Setup and Deployment" project of visual studio ) and then give this installation setup to the users to install and use the software. this software uses files of DLLs, database files (mdf,ldf) and some other (.exe, .exe.config, .exe.manifest and .pdb) ( Please See the picture of files for setup and deployment ) ... in the setup project of this software i need to put the required files to be installed on users pc... so i put all the files in release folder including database files mdf and ldf)... the problem is that anyone who has installed this application, can see my MDF and LDF database files and can easily attach it to a sql server and find out how my tables were designed and what are my records.
Please help me with these questions that i need the most :
1)how could i prevent users from seeing these source files?
2)is this way of publishing (put every thing in release folder for installation of end user) correct?
3)should i directly put MDF and LDF files or have to do a some work of securing them like compiling into irreversible format that only application can use it not anyone else?
4)should i do something in the process of creation of database in visual studio to prevent any one accessing it except software itself?
5)am i missing a concept in the way of publishing an application with local database?
P.S:
application is developed by C# windows form using visual studio .net 2013 (.NET 4.5)
Setup project is used by "Setup and Deployment" of visual studio
Application is using local database by visual studio (Visual C# items - Serviced base database)
This is my first time of publishing an actual software sorry for any lack of information
|
|
|
|
|
salar1369 wrote: 1)how could i prevent users from seeing these source files? You can't; you can spend money on making it harder to read, but it will still be a list of computer-instructions that can be read by both CPU and user.
salar1369 wrote: 2)is this way of publishing (put every thing in release folder for installation of end user) correct? No; applications should be installed in the program files folder (that's where applications go) and data in the users documents folder.
salar1369 wrote: 3)should i directly put MDF and LDF files or have to do a some work of securing them like compiling into irreversible format that only application can use it not anyone else? If it is irreversable, how would you read it?
salar1369 wrote: 5)am i missing a concept in the way of publishing an application with local database? Yes; ownership.
If the database is local on my system, you cannot lock me out - I'm the owner of my machine and its data. If you want to make sure that people don't get into your database, then the only option is to "not" use a local database, but host one.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You could encrypt the data in the database. Or switch to a host database Sql Azure.
Schneider
|
|
|
|
|
Tool: Visual Studio 2012. InstallShield 2015 Limited Edition.
Application: Windows Form Application using C#.
I have Created one windows form Application. And also created it's setup using Install Shield in Visual Studio 2012.
Now I have one Code Signing Certificate and I want to add it in my Project Setup. How can I do It?
Or I have to go with ClickOnce instead of InstallShield?
Any Suggestion?
|
|
|
|
|
|
Dear All,
I have a web portal running on my intranet. Now i want to design a windows client in which when user logs in for a particular machine for a day, then if he hits the web portal link then it must not ask to log in with its username and password again. Please suggest and give your views.
ashish sharma
ashish sharma
|
|
|
|
|
|
Yes I do. I thought that i need a windows solution(or any idea) so its better to put this question in windows forum as well.
ashish sharma
|
|
|
|
|
|
It is intranet. Can't you just use windows authentication?
"You'd have to be a floating database guru clad in a white toga and ghandi level of sereneness to fix this goddamn clusterfuck.", BruceN[ ^]
|
|
|
|
|