Visual C++ :: Decrypt Exe File That Is Encrypted?
Nov 20, 2014
i have an executable that is encrypted; it is made in Visual C++. decrypt it? what i must to look for? I have some kind of files (.req extention) that have the content encoded by password type.
View 2 Replies
ADVERTISEMENT
Jun 19, 2014
I am to use this cipher in which the number x is encrypted
(a and c are known numbers)
Also, what will the decrypt function be? Actually, i need to find the decryption formula...below is the code i tried to test...
char x = 'a';
cout<<x1<<endl<<x2<<endl;
cout<<x1<<endl<<x2<<endl;
View 6 Replies
View Related
May 24, 2014
For my purpose all I need to know is drive's BitLocker encryption status by its DOS path. Something like this:
Code:
enum DriveEncryptionStatus{
Unprotected,
Protected,
Unknown
};
DriveEncryptionStatus = GetDriveBitlockerEncryptionStatus(L"C:");
I was able to find the Win32_EncryptableVolume class that unfortunately comes with this caveat:
To use the Win32_EncryptableVolume methods, the following conditions must be met:
You must have administrator privileges.
How to do this without running as an administrator?
View 4 Replies
View Related
Oct 3, 2013
I need to decrypt my text file and make it able to read in my program..
What I have programmed so far is to read the encrypted file, create a new file, decrypt it and read the newly created file..
I need to decrypt the encrypted file without having to create a new file that reads the decrypted text..
Well, Let me show you my code:
P.S Most of the include is not needed and I already know that Visual studio 2010 Windows Form Application CLR
Code:
#pragma once
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <conio.h>
[Code].....
You have my decryption code and the code I want to use..
I have uploaded the code for you to use on your computer because it is fairly hard for me to explain..
I want to be able to read the encrypted file in my program, without having to writing a new file to decrypt it..
Decrypted & Encrypted .txt file Included (And images)
--> Program .rar pack link <--
Build it with Visual Studio 2010
View 5 Replies
View Related
Sep 27, 2013
I need to be able to actually read my encrypted file..
I have the decryption code and works perfectly when running it through console app c++.
But, the way I decrypt is to decrypt from a file, and create a new file which is decrypted.
I can't use that kind of code in my program in windows form app c++..
I need to read the encrypted text file and decrypt it in memory while using it for my program..
Some links to my codes I use at the moment.
My decryption coded in console application: [URL] ....
My decryption code edited for form application (Did not do anything) [URL] ....
And this is the code I tried to read after it got decrypted (Reading file written in combobox_selectedindexchange: [URL] ....
View 2 Replies
View Related
Jan 5, 2015
I have got to create a program that will gather input from the user and then encrypt & decrypt those characters.
I'm not very confident at coding so I'm sure many parts of my code are written poorly and not following the best practice so I have written a simple version of an algorithm where the program simply adds/subtracts a value of 2 to/from the ASCII values but I have discovered the use of the rand() and srand functions but I'm unsure how to go about using them within both my encrypt and decrypt function as a single value (static variable?).
Here is my code in its entirety at the moment.
#include <iostream >
#include <iomanip>
#include <cstdlib>
#include <ctime>
#include <string>
#include <cstring>
#include <fstream>
using namespace std;
char getMenuSelection (char m);
void encrypt (char key[]);
void decrypt (char code[]);
[code]....
This code currently doesn't execute due to ' undefined reference to 'encrypt(char*) '
Question
I am asking how to generate the random number and incorporate this into my encrypt and decrypt functions.
1. Would the use of a static or global variable make this work as is?
2. Would I need to create separate class files for both functions?
View 2 Replies
View Related
Apr 3, 2015
I have an application which needs to connect to a database. It runs in the background so there is no user input. I therefore need to store the connection string. I want to encrypt the connection details and then store the encrypted information. My thinking is I would read the encrypted details, from wherever I store them, unencrypt them and then connect to my database.
I've done a bit of reading on this and the SHA1CryptoServiceProvider method seems like an option but it appears that this cannot be unencrypted.
So how can I use this encrypted information?
Or is there another method?
View 1 Replies
View Related
Feb 5, 2013
How can decrypt the file that the program below encrypt?
// This program encrypts a file
#include<iostream>
#include<fstream>
using namespace std;
int main() {
const int ENCRYPT=10; // amount to add to a chor
const int SIZE= 255; // array size
[Code]...
View 2 Replies
View Related
Nov 3, 2013
I have been working on some C++ code that doesn't seem to be going right. I'm wanting it to read a (three-digit) integer representing the value to be encrypted, a (one-digit) integer representing the encryption key, encrypt the value and print the encrypted value. The encrypting method used is that each digit in the given number is replaced by ((the sum of that digit plus key) modulo 10) then the first and last “encrypted” digits are swapped.
For example, if the number entered was 216 and the key given was 7, after applying the encryption procedure described the first digit (2) would become 9, the middle digit (1) would become 8 and the last digit (6) would become 3. The first and last encrypted digits are then swapped. The program displays the encrypted number: that is 389 in this case.
#include <iostream>
using namespace std;
int main() {
int isolateDigits();
int replaceDigits();
int swapDigit1withDigit3();
[Code] ....
View 1 Replies
View Related
Apr 12, 2013
I'm very new to MFC & VisualC++. I'm using MSVS2010 Pro. I am trying to write/debug a simple form that saves and restores the content of some edit controls. It seems to work as expected, except the file saves only to the Project Folder, regardless of where I browse and select to save the file.
Code:
void CMFC_FileDialogDlg::OnBnClickedbtnsave() {
this->UpdateData();
CFile f;
//Kinda Correct, Works but still saves in Project Folder
BOOL b_OpenFileDialog = FALSE;//this doesn't act as bool in CFileDialog?
[Code] ....
My only experience is a little simple VB programming in Excel, so any specific examples??? Also, rules seem to change from version to version? I have to "update" a number of undocumented programs.
View 4 Replies
View Related
Aug 23, 2013
I am trying to use ini file for configuring my app.
But GetPrivateProfileString is not working.
I am using Windows 7. I tried "Wow64DisableWow64FsRedirection" also.
Not only this-ATLPath::FileExists is also not working.It gives an error code 0x80070002 which means:
"system could not find the file"
View 14 Replies
View Related
Mar 28, 2013
I need to develop an application in VC++ that will take .WAV files as an input and identify if there is a Gun shot in that wave file. WAVE file with gunshot must be having certain paramaters like frequency, bit rate etc which I don't know right now. But is there a way in VC++ to develop a program that can recognize gunshots by comparing that .WAV file with certain parameters?
View 3 Replies
View Related
Apr 4, 2013
i want to run an .exe file through ShellExecuteW and if there is no .exe file in the path, i would like to return a msg box, but the code
Code:
if(ShellExecuteW!=ERROR_SUCCESS)
is not working and if i report
Code:
int run = ShellExecute(Path)
it says that the "int" is wrong... i barely know about c++, or better, i just know how to interpret basic lines of code..
View 6 Replies
View Related
Jun 4, 2013
I created a new project in Qt Creator, the files included are the .Pro file, and the .Cpp file.
Qt does not recognize the headers I try to reference in the .Cpp file. I am pretty sure it's because of what I don't have in my .Pro file. What do I add to it?
.Cpp
Code:
#include <QApplication> ->No such File or Directory
#include <QPushButton> ->No such File or Directory
#include <QHBoxLayout> ->No such File or Directory
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QWidget *window = new QWidget;
[Code] ....
.Pro
Code:
SOURCES +=
MainWindow.cpp
View 1 Replies
View Related
May 18, 2014
Say, I have the "K: est del USB" folder.
Then I do the following:
Code:
SHFILEOPSTRUCT sfo = {0};
sfo.wFunc = FO_DELETE;
sfo.pFrom = L"K: est del USB";
sfo.fFlags = FOF_ALLOWUNDO |
[Code] ....
So when I run it, the SHFileOperation API shows this warning:
Are you sure you want to permanently delete this folder?
If the end-user clicks "No", SHFileOperation return 0x4c7, which I believe is ERROR_CANCELLED.
My question is, if I don't need any UI, how can I know that my file/folder will be permanently deleted vs. placed into the Recycle Bin?
View 11 Replies
View Related
Nov 30, 2012
I'm trying to build libglib using MSVC. libglib doesn't use dllexport - so to create usable DLLs it needs to generate a .DEF file. It does this by using a .symbols file. Here's a cut-down example:-
Code:
/* This file lists all exported symbols. It is used to generate the glib.def file used to control exports on Windows.*/
/* glib.symbols */
g_mkdir_with_parents
#ifdef G_OS_WIN32
g_file_get_contents_utf8
#endif
The following commands would produce the following files called glib.def
Code:
cl /EP glib.symbols > glib.def
produces this in glib.def:-
g_mkdir_with_parents
Code:
whereas this:-
cl /EP -DG_OS_WIN32 glib.symbols > glib.def
produces this in glib.def:-
g_mkdir_with_parents
g_file_get_contents_utf8
So this is a handy way of producing conditional .DEF files. Fortunately, this can all be built into a Visual Studio macro in my vsprops file - e.g.
Code:
<UserMacro
Name="GlibGenerateGlibDef"
Value="echo >"$(SolutionDir)glib.def" && cl /EP -DG_OS_WIN32 glib.symbols >>"$(SolutionDir)glib.def""
/>
Problem:- Although I can run the macro as a pre-build step (and it does produce conditional entries in the generated .DEF file) it DOESN'T produce the word EXPORTS at the top of the file. So the linker then fails to recognise it as a valid .DEF file.
How can I add that word EXPORTS to the top of the generated file? I tried just adding EXPORTS to the top of the symbols file but that didn't work. I also tried this variation on the macro:-
Code:
Name="GlibGenerateGlibDef"
Value="echo EXPORTS >"$(SolutionDir)glib.def" && cl /EP -DG_OS_WIN32 glib.symbols
But that didn't work either I feel sure there must be a way to do this.
View 1 Replies
View Related
Mar 5, 2014
I am currently writing a program that grabs information from a .dat file. When I go to debut I get this error.
Code:
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
// function step 1 - declare the prototypes
void sort(int n); // catches an integer number from the call
void swap(string *p1, string *p2); //catches the location of data in ram
[Code] .....
View 5 Replies
View Related
Jan 9, 2014
I am developing a CFormView MFC app. When I go to click something on the menu, it takes awhile before the event happens. The project is build optimized in release mode. I have 3 additional threads and I thought they might be blocking the internal MFC framework stuff, but I use the Sleep() call in each thread to yield to the MFC main app.
View 7 Replies
View Related
Mar 14, 2013
I have an MDI application using different menus depending on the current document template in use.
I need to show the top-level File Menu from the IDR_MAINFRAME window when a command is sent from the active document.
I would like to application to deactivate the active child window and then show the File menu as if the alt-F key was pressed from the keyboard.
I have tried CMenu *pMenu=AfxGetMainWnd()->GetMenu();
but this does not display the menu at all.
View 2 Replies
View Related
Oct 10, 2014
When I have loaded a savefile with Serialize, is there some way of telling the name of the currently loaded savefile?
View 2 Replies
View Related
Sep 15, 2012
I have written code that saves a matrix to a utf-8 file. This code works just fine when invoked from a win32 console app, but if I attempt to use the exact same code by invoking it within a SDI Doc/View Serialize(CArchive& ar), if(ar.IsStoring), it fails, but in a somewhat unusual manner. Namely, the file shows up in the designated directory, but it is an empty file (0 bytes), and the 'Unable to open file' message is seen in Debug config. Note that both the win32 console app and the SDI app are both using a Unicode character set, however, only the SDI app uses the method inside a Serialize(CArchive& ar) method, whereas the win32 console app evokes the save method directly from within _tmain. Why this seemingly illogical disparity occurs.
Here's the template code I have used in innumerable applications to save matrices to a disk file.
Code:
namespace TNT {
// saves a TNT double matrix, discriminating between real and complex matrices by virtue of the respective file markers, 'MATCALC94R' and 'MATCALC94C'.
template <class T>
void SaveRealBMatrix(const Matrix<T> &M, string sfilename) {
_RPT0(0, "SaveRealBMatrix:
");
_RPT1(0, "sfilename =: |%s|
[Code] ....
Here's the code from the SDI document Serialize(CArchive& ar) that fails as described above. Note that m_M is a class member TNT::Matrix<double> m_M that has been verified to exist in the Serialize method.
Code:
void CMyWndDoc::Serialize(CArchive& ar) {
if (ar.IsStoring()) {
CString csFileName = ar.m_strFileName;
wstring ws = csFileName.GetBuffer(0);
string s(ws.begin(), ws.end());
[Code] .....
View 2 Replies
View Related
May 6, 2013
I write a small application and using the following API to open the file:
hHandle = CreateFile(lpszFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
Then I pass the hHandle to a DLL exported function, in that function, I will call
DWORD dwFlags = 0;
ASSERT(GetHandleInformation(hFile,&dwFlags) != 0)
to check if the handle is valid. However, the assert fails. And I use GetLastError to get the error code 6, which means invalid handle.
What is the problem with my codes?
View 4 Replies
View Related
Nov 8, 2012
The program then asks the user for a search string, which may contain white space. The program should search the file for every occurrence of the search string. When the string is found, the line that contains it should be displayed in the following format
nnnnn:Line Contents
That is the line number of the line, 5 columns wide, right justified, followed by a colon, followed by the contents of the line.
And this is what I've got so far:
Code:
#include<iostream>
#include<fstream>
#include<string>
#include<iomanip>
using namespace std;
int main(int argc, char *argv[]) {
ifstream inFile;
string fileName,
[code]....
But this doesn't work. It prints everything in the file, not just the lines where the string is found.
View 9 Replies
View Related
Jul 20, 2013
I have experiences to localize a few MFC executable files, first create a resource dll file then add following code in InitInstance():
Code:
BOOL CMyApp::InitInstance()
{
//Default Application Wizard code.
HINSTANCE hRes = NULL;
hRes= LoadLibrary("ResourceD.dll");
if(hRes)
AfxSetResourceHandle(hRes);
//Rest of wizard code
return CWinApp::InitInstance();
}
Now I need to localize a dll file which is an IE web browser toolbar, who could tell me how localize the dll file?
View 6 Replies
View Related
Apr 26, 2013
I have a jpg file. I have extracted the width and the length of the image. I have done that with some codes and markers. Now I need the image data starts as from that place i would like read the data and print the pixel value. I would like to display the pixels later.
View 2 Replies
View Related
Nov 3, 2013
Visual studio 2012
I have a project that has a few .asm files (assembly language code), I have the compiler/assembler set to create a list file for the assembly code and would like the debugger to use the .lst file for the source instead of the .asm files because in the .asm files the macros are not expanded like they are in the .lst files which makes debugging difficult sometimes.
View 1 Replies
View Related