Garbled text at end of file. Is this related to DDPE? - encryption

Preface: About a month or so, we upgraded our work systems from a Windows 7 desktop to a Windows 8.1 Dell laptop. Laptop's file system is NTFS with DDPE file encryption and desktop's file system is NTFS, but no encryption. I tagged in Sublime Text 3 because that's where I have been poking around trying to come up with a solution. I am having issues honing into this specific problem, so I am asking a new question.
Problem: We're getting garbled text issues at the end of file with any extension. Randomly happens to some files on computer restarts. Randomly means it sometimes happens, sometimes doesn't. Happens on projects started on desktop and projects started on laptop. Doesn't matter if the project has been opened during the computer's uptime or not. Seems totally random.
Example: filezilla.xml
</LastServer>
</Settings>
</FileZillZY_ ?
Example: Richmond2015.sublime-workspace
"side_bar_width": 514.0,
"status_bar_visible": true,
"template_settings":
{?c??A
Attempts to fix:
changing between unix and windows line endings
"ensure_newline_at_eof_on_save": true
saving with different file encodings, some were defaulting to Western, changed to UTF-8

Related

Qt - Some downloaded files have 0 byte

I'm currently struggling with a Qt app. I'm trying to download some files from Google Drive using QNetworkManager, QNetworkRequest and QNetworkReply.
First of all, my app works fine on a few computers (4 or 5 people tested it and didn't encounter any error). Each file which must be downloaded is effectively downloaded. (About 280 files are downloaded each time this way, and there is no problem.)
The issue is a member of my work team has only 0-byte files. Every single file which is downloaded over SSL doesn't have any content. The only one download on classic HTTP is correctly donwloaded.
Have you ever seen this bug?
All my "download" code comes from this single tutorial.
Edit : After a few tests, we found that the error was Error creating SSL context ().
Thus, we tried to solve it by installing both needed libraries (ssleay32.dll and libeay32.dll) on the computer but it didn't work. Do you know if it needs some other libraries?
It was actually about missing libraries. I had to add to my folder :
libeay32.dll
libssl32.dll
ssleay32.dll
The point was, even on 64-bit systems, these libraries had to be for 32-bit systems because I compiled my applications for 32-bit systems...
Moreover, msvcr120.dll was needed for some computers.

GraphicsMagick outputs empty file

While trying to figure out why my output images from my node applications are not functioning currently, I decided to try the GraphicsMagick GUI.
On a windows 7 pro 64x I open the gm gui, and opened one of the windows default images.
Then, without performing any operations on it, I just saved it under a different filename: "test.jpg"
Save prompts no errors.
Now, when I go to the saved file. I get no thumbnail for it:
When I try to open the file, I get the following error:
I tried googling this error to no avail.
Something is broken when I save my file in gm.
Note: This problem does no occur with ImageMagick.
I tried installing multiple versions and releases of GM. None work.
I am running a windows 7 pro x64 with 64gb ram, and dual cpu (have no idea is that's relevant).
Also, how can I check if this is a permissions issue? The user running this app has administrator permissions, but.. maybe something get's broken?
As you can see i'm completely at a loss.

obtain data from remote computers using autoit

I have been maintaining a program written in batch. I want to write a replacement program using autoit.
The program is downloaded to the desktop of remote computers and prints out a log of the scan results in notepad on the desktop.
I want it to cover windows XP-vista-7-8-8.1-10. At the moment it does not cover 8-8.1 or 10.
This is the printout:
Results of my test version 001
Windows 7 x86 Service Pack 1 ---- (shows in brackets if service pack is out of date)
(UAC) --- shows if UAC is on or disabled.
Internet Explorer----(shows if out of date)
Antivirus/Firewall Check:
Windows Firewall Enabled!
Panda Free Antivirus
WMI entry may not exist for antivirus; attempting automatic update.
Anti-malware/Other Utilities Check:
CCleaner
Java 8 Update 31 (Java version out of Date!)
Adobe Flash Player 17.0.0.188
Adobe Reader XI
Mozilla Firefox (38.0.5)
Thunderbird (38)
System Health check
Total Fragmentation on Drive C: 2%
````````````````````End of Log``````````````````````
So this is possible. To get versions of files(like java and firefox) I think you can use FileGetVersion
To get if windows filewall is enabled you have to read the registry. This key might be a little bit different depending on your system but the one for me was this one
RegRead("HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\", "EnableFirewall")
These two macros should be usefull to determine OS specific information that you request
#OSType
#OSVersion
UAC can also be read from the registry and as with the firewall it might depend on your system but for me this was the registry:
RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA")
Im not quite sure what the Total Fragmentation means so I am not sure how you can get this.
You should be able to compose a txt file with all this information. You should be able to find examples of autoit code that transfers text files just by searching here on stackoverflow or on google.

RStudio R File Corruption

I had a R script open in RStudio. The file was saved many times over the course of several weeks and worked perfectly fine when RStudio was opened and closed. However, today, I restarted my computer and when I opened RStudio and more specifically the script that I mentioned, all of the R code vanished, leaving a single long row of "....." with red highlighting.
When I tried to open the R file in other text processors such as Sublime Text and Notepad++, only a line of zeroes was visible. None of my other R files were affected. I'm currently running Windows 8.1 and have the latest version of R and RStudio. What can I do to recover the code in the file and prevent something like this from happening again?
It might be an old thread and it might have been covered in 'user4458796' answer in suggestion #1 ("Use the history..."), but:
My friend had the same problem and we managed to recover the code from a 'history_database' files located on Windows at:
'C:\Users\%user%\AppData\Local\RStudio-Desktop\'
I assume there is an equivalent location in Linux in general.
Hopefully I won't get downvoted, just sharing my 2cents.
Ben.
It's not clear what happened to corrupt your file (and thus how to fix it if possible) and it is kind of ominous that you're just seeing 0's in other text editors, but I'll give you my best suggestion and some tips.
Suggestions for Attempting Recovery
Since your other R files were unaffected, you should have a messy record of your code in the history. Use the history to reconstruct your code.
Access a copy of your file from any version control, cloud, or offline backup you may have used -- git, SVN, iCloud, SugarSync, Dropbox, etc (I realize you probably wouldn't have posted this question if that were an option, but I had to throw it out there).
Use a Hex or sector editor to try to recover the data.
Use a data recover program to find an old version of your file.
Inspect your trash or recycling bin to see if it has an old version. Depending on your OS and the settings of how you (insecurely or securely) delete files, then you may be able to undelete a deleted version, even if it's not immediately available.
Try different methods of recovering text data from corrupted text files like OpenOffice's and Microsoft's suggestions.
Tips for the Future
I know that hindsight is 20/20, but a few quick tips for good measure:
Use version control. Git is supported in RStudio's GUI interface.
Have more than one version of your file. Many professors and professionals recommend writing/storing code in a text editor and using your IDE only for the working copy.
Make backups. Distinct from #2, you should backup your files to a hard drive, flash drive, or cloud service like Dropbox or Spideroak.

ASP.NET 3.5 / IIS 6 Output Garbled / Corrupt

I have inherited a web application and when trying when trying to put it on the same server on a different IP and IIS site I get a page full of stuff like this in all browsers. (not sure how the server here will output this but it is basically the same as if you were to open a binary in a text editor or bad character encoding).
���r#ə6��{��Ί��&��6�K�MЀh��"Pd�AP;�RN�K9�r��<ϛ���!��GZ�4��J�z�����R'���i�j�uZLe�V`=��&��T!e]rGVx#d��N���V���w>���pc�hw��B>��^�|L�]��3�~-��g��n��n�i�>Z� �ٲ������z_�����U�,i��2��\�+���F��FB���m��r�7�v��7�}�U�N�o�G�K�o?�w凲��و�����ߓ�x!���_?��V��v�/V��olt˭Z����� >M�kwkh&��j�C3�|̓��=�8��jJ����Uo�~��T7�\w�eW�������u*���f0c��}�.����]o������7���|�;}�&O���N�)[ys��+Q��o�T�~����F����c���έm��.�Q�ů�2#P���i�ˠ�~g��u�<| $ۭ>zZ/e��'�;R�'���v�ˠ�����
I've copied the same build and all its files to the site running under another IP, used the <globalization> web.config tag and set all encoding to UTF-8 and for the hell of it I even tried setting it to ASCII.
The application, although written for users in only US cities does make use of localization resource files for Russian and Romanian since it had been outsourced to developers there. I guess they did so to make things easier on developers who may have been less fluent in english, who knows.
Besides using the exact same copy running in production and changing web.config encoding settings I have found it runs fine on my IIS 7/Windows 7 workstation, tried throwing a uncompiled copy up there with .cs files and all, wrote a simple ASPX page that performed a response.write (which came out fine).
So as you can see I am pretty much at a roadblock and decided to ask the fine professional community we have here. Any input you may have on this matter would be highly appreciated.
I fixed it by exporting the IIS settings for the production system that it worked fine on and created a new IIS site from that file. Sadly I could see no difference between the 2 before I did this but if you run into this issue then here is another thing you can add to your list of troubleshooting tasks.
It's probably a long shot based on your description, but from a little Internet digging, a couple of forum posters have mentioned bad NICs corrupting packets. You did say you had the app on a different IP on the server -- does your server have more than 1 NIC?

Resources