Use Notepad++ as HEX-Editor - plugins

I'm using Notepad++, version 7.8.5 64bit on Windows 10. I'd like to use it as a Hex Editor.
I open a binfile, but Notepad shows it to me as a text with strange characters. In order to visualize the Hex-numbers, I select a part of the text, go and click on the voice
Plugins/Converter/ASCII-->HEX
and it shows me the hex-numbers of the selected part. Now I'd like to see the whole file in hex, but it doesn't work. It seems that selecting some parts it works, other parts it doesn't.
I need to convert or visualize the whole file in HEX.
I have also tried:
Plugins/Plugins Admin…
but the HEX-Editor isn't there.
Thanks 4 help

Edit:
Please note - the installation has been adapted for 64 bit in the meantime.
Please update to e.g. Notepad++ 8.4.7 (64-bit) from the download section
Go to the menu Plugins > Plugins Admin
Enter Hex in the search field.
Select Hex-Editor and press ìnstall.
It seems to me you tried to install a hex editor and ended up in the wrong tool (Plug-In) Converter (ASCII -> HEX) as mentioned in your question above.
The installation process of the HexEditor is somewhat confusing because it is currently available only in the Plugins Admin for the 32-bit version.
A simple solution is to install a Notepad++ x32 version on a USB stick (e.g. using PortableApps).
But, and thanks to Peter Jones, here is a download link to the x64 version. and explanation to actually perform the manual install:
unzip the appropriate downloaded zipfile and open that containing folder (or have the zipfile open in windows explorer)
In Notepad++, use Plugins > Open Plugins Folder.
In the newly-opened plugins folder, add a subfolder HexEditor.
Copy the HexEditor.dll from the zipfile into the HexEditor subfolder… so it should be at ...\notepad++\plugins\HexEditor\HexEditor.dll
Close all open windows of Notepad++.
Restart Notepad++ again.
HexEditor should be available in the Plugins menu, and HexEditor.dll should be listed in the ? > Debug Info plugins list.
Successfully tested by Notepad++ Version 7.8.5 64bit on Windows 10. For further information see the links above. Please note a UAC problem, i.e. run Notepad++ as Administrator.

Answer from help-info.de is working.
However it is not that great if you are in a context where you need to copy paste the result of the hex output provided by the plugin.
For example let's say the following bytes are displayed by the NPP_HexEdit window:
00 06 12 0b
If you select from left to right, copy then paste (in a new text file), you will get:
20 06 12 0b
For some reason, '0x00' are converted into UTF-8 '20' and since '0x20' are also converted into UTF-8 '20' you can't really use the copy + paste feature here.
If you select from right to left, copy then paste (in a new text file), you will get:
12 01 0e 0d
I will not even try to convert this one, clearly unusable....
Solution (Windows)
From Plugins > Plugins Admin select and install NppExec, restart npp.
Select Plugins > NppExec > Npp Execute... and enter the following:
SET local OUTFILE = "$(FULL_CURRENT_PATH).hex.txt"
cmd /c <XXD_DIRECTORY>\xxd.exe -p $(FULL_CURRENT_PATH) >$(OUTFILE)
NPP_OPEN $(OUTFILE)
From the same window save your script, for example bin_to_hex.
From Plugins > NppExec > Advanced Options select your script from Associated script: and add it with Add/Modify then press Ok and restart npp.
In npp, open your bin file.
Select Plugins > NppExec > bin_to_hex and you are done!, should get your bin as HEX in a new tab.
xxd.exe can be recovered from multiple location such as:
C:\Program Files (x86)\Vim\vim74
(I used this on my side, from Cmder) C:\Cmder\vendor\git-for-windows\usr\bin
Edited
Instead of using xxd.exe, you can use the following powershell approach (better format but longer to execute). Replace the script with:
SET local OUTFILE = "$(FULL_CURRENT_PATH).hex.txt"
cmd /c powershell -command "format-hex $(FULL_CURRENT_PATH) > $(OUTFILE);exit"
NPP_OPEN $(OUTFILE)

Related

Visual Studio 2012 strange characters at beginning of file

Whenever i copy a file made in VS2012 over to Eclipse, and open the file in Eclipse doc viewer there always seem to be some extra characters at the beginning (pic below). They arent visible in VS2012, or if I open the file in Notepad. What character is that being put there, and how can i get it to stop? Below is a pic of a JS file I made i VS, and how it appears in Eclipse
Thats a UTF8 BOM, Ive heard thgis works well for windows
http://www.bryntyounce.com/filebomdetector.htm
If you have access to linux you can use awk to remove

External editor for IPython notebook

I am using IPython notebook and I want to edit programs in an external editor.
How do I get the %edit file_name.py to open an editor such as Notepad++.
Running %edit? will give you the help for the %edit magic function.
You need to set c.TerminalInteractiveShell.editor, which is in your ipython_config.py. I'm not quite sure where this is located in Windows; on OS X and Linux, it is in ~/.ipython. You'll want to set the variable to be the full path of the editor you want.
Alternatively, you can create an environment variable EDITOR in Windows itself, and set that equal to the full path of the editor you want. iPython should use that.
I'm using Windows 7 and 8 (and 10TP) and Python 3.4.2.
I started with ipython locate to tell me where ipython thought config files suggested elsewhere should be. When I saw it was different I read around and came up with the following:
On my system, the ipython locate gave me c:\users\osmith\.ipython, not the _ipython you'll see mentioned in the YouTube videos done with Windows XP,
Look in the directory ipython locate specifies for a profile directory; if you aren't actively doing anything with ipython profiles, it should be .ipython\profile_default, if you are using profiles, then I leave it to you to s/profile_default/${YOUR_PROFILE_NAME}/g
Check the profile_default directory for a ipython_config.py file, if it's not there, tell IPython to initialize itself: ipython profile create
Open the config file in a text editor,
If you are the kind of person who hasn't messed around with their console overly much and installs things in standard places, you can skip straight to this step by typing: ipython profile create followed by start notepad .ipython\profile_default\ipython_config.py.
Search for the string c.TerminalInteractiveShell.editor,
The comment above this indicates you can also use the EDITOR environment variable, but hard coding file paths never hurt anyone so lets do eet:
Copy the line and remove the leading hash and spaces from the copy.
Replace the text between the apostrophes ('notepad') with the path of our desired editor, e.g.
c.TerminalInteractiveShell.editor = 'c:/program files (x86)/noddyeditor/noddy.exe'
There is a catch here, though; some modern editors get a bit fancy and automatically and, when invoked like this, detach from the console. Notepad++ and Sublime Text, for example. Sublime accepts a "--wait" option, which works some of the time; this tells the command invocation to hang around until you close the file, for some definition of until and some other definition of close.
However, the following setting will work most of the time for sublime text:
c.TerminalInteractiveShell.editor = '"c:/program files/sublime text 3/subl.exe" --wait'
(assuming c:\program files\ is where your sublime text 3 directory is)
Try the 'Pycharm' editor
This works for me.

Storing code in Google Drive/DropBox

First I understand I should probably be using GitHub or some other online repository, but I would like to explore some of the concepts necessary for my method to work.
I would like to run a batch script/program every time I close Visual Studio, Eclipse, Notepad. Specifically, I would like to run a copy program to copy all of my source code that I generated with that program to a folder inside a Google Drive/Dropbox folder. That way I know it is saved to the cloud. this way I do not have to set up a special backup extension inside each Development enviornment.
Firstly is there a built in simple solution for doing the above? or Do I need to write a custom service that checks to see when those programs are closed? and if that is the way to go where should I look for an example of how to get started?
Thanks.
No, there is no simple built-in method that will backup the files that you want when you want it.
Instead you could simply point your work directories to your Gdrive or DropBox folders, and create a folder inside them for each.
Or you could create a task that copies the files every 10 minutes or however long.
But if you want it to run only when you exit the programs you specify: Yeah, you'll pretty much need to write a batch file for each of the programs you want to back up. Then call the batch file instead of the program.
startVS.bat
set DropBox=C:\Wherever\
start /wait "" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"
xcopy /s /e /d /y "%userprofile%\Documents\Visual Studio 2008\Projects\*.*" "%DropBox%"
If you want to have the same icon, and for the batch file run minimized:
1) Open Windows Explorer, navigate to startVS.bat, right-click on it, and click Create Shortcut.
2) Right-click on startVS - ShortCut -> Click Rename and rename it Visual Studios, then press [ENTER].
3) Right-Click on the new Visual Studios -> Properties -> Change Icon -> Browse
4) Paste %ProgramFiles% (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe into the File Name box.
5) Click Open -> OK
6) Click Normal Window -> Minimized -> OK
7) Put a copy of Visual Studios (really named Visual Studios.lnk) where ever you want it, like in the Start menu.
If you are not running a 64 bit system, at step 4 paste %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe into the File Name box.
I think instead of going for this approach, you can run your script on a timely basis - say every 15 min.
This appraise will have below advantages advantages:
Easy to implement
Tool Independent
Timely Backup
Re-Use
So I think your problem will be solved by this approach.
For Google Drive, I've been messing around with GoogleCL: (I'm on Linux/Crunchbang)
$ sudo apt-get install python-gdata
$ sudo apt-get install googleCL
This'll give you the 'google' command:
$ which google
$ man google
You can upload files:
$ google docs upload foo.txt
(seems to store it as 'foo')
And download it: (in my opinion, syntax is inconsistent)
$ google docs get --title foo
(it won't find foo.txt for some reason)
So far, I'm not that happy with it. I want to encrypt files and park them there,
but it seems to choke on them. I've tried uuencoding them so I can just upload
a text file, but have had inconsistent results on files that aren't all that big
(1.6 Mbytes). Maybe Google doesn't want to deal with files it can't get any search
results out of ? Anyway, maybe Dropbox is better; haven't tried it yet.

How to open Eclipse -- tegra development pack -- in ubuntu

After i installed "tegra development pack" on my ubuntu, the installation opened eclipse IDE for me and then i closed and then figured out that there isn't any shortcut or anything i could launch it from.
Update:
I followed "Venzen" solution till step 3 and used the filtering command. That showed me that there is another folder named "NVPACK" is located in username > NVPACK > eclipse which I didn't know about, I kept locking tipping in "eclipse" in the terminal.
Also, there is something stupid I did I would like to share; what happened here is that I kept looking at NVPACK installation folder at windows files not in linux files. (I'm using ubuntu in windows).
You could open a terminal and try to launch Eclipse from the command line:
$ eclipse
If this does not work it could mean that the eclipse binary was installed somewhere outside of your PATH and you will have to look for it. I am not familiar with Tegra, but here is a general purpose "process of elimination" to find a file in *nix:
update the locate database
$ sudo updatedb
use the which command to interrogate the updated locate database
$ which eclipse
you should have found it by now. If you haven't all is not lost - run the locate command just for good measure
$ sudo locate eclipse
locate could potentially output lots of matches since it outputs any match to your search term whether its a file or a folder. If the output of locate scrolls off the screen then use grep to filter out only matches where eclipse is a file:
$ sudo locate eclipse | grep '.*eclipse$'
If this produces several matches then choose the eclipse file which resides in a bin folder.
If, by now, a file called eclipse has not yet shown itself, then there are 2 more options left - a long way and a short way...
use the find command
post the method (or source) from where you installed
either way, kindly post here should steps 1-3 above not reveal eclipse.

How To Display UTF8 In Netbeans 7?

In my java project, I need to use Arabic text and strings, but the text becomes like "???????" , so what wrong ? and how to resolve this problem?
thanks
You can setup your Netbeans with startup option
place it inside netbeans.conf into netbeans_default_options
-J-Dfile.encoding=UTF-8
In the end it should look like
netbeans_default_options="..... -J-Dfile.encoding=UTF-8"
Hope it'll help you
Here are instructions for setting the default character set in Netbeans to UTF-8 (in Windows):
1 Go to C:\Program Files\netbeans-x.x\etc
2 Open netbeans.conf in Notepad.
3 On the netbeans_default_options add: -J-Dfile.encoding=UTF-8. (make sure to put it within the quotation marks)
4 Project properties -> Build -> Compiling ->
Additional compiler options) text box.- add: -encoding UTF-8
5 You can also check to make sure that you have increased the memory allocation for Netbeans by looking at the netbeans_default_options line. The default max is 128MB. We have increased this to 256MB.
Ubuntu go directory
ex.
sudo gedit /usr/local/netbeans-8.0/etc/netbeans.conf
Add
netbeans_default_options="-J-Dfile.encoding=UTF-8"
Save Fin
Please follow the bellow issue to solve the how to UTF 8 Dari, Pashto, Persian and Arabic Support in Netbeans
open the C:\Program Files\NetBeans 8.0.2\etc PAT form windows
than copy the netbeans.conf into your some place in your computer
add the -J-Dfile.encoding=UTF-8 inside netbeans_default_options=
like bellow code
netbeans_default_options="-J-Dfile.encoding=UTF-8 -J-client -J-Xss2m -J-Xms32m -J- XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true"
than replace the file into C:\Program Files\NetBeans 8.0.2\etc
now close the netbeans and reopen it, so it work all language like Dari, Pashto, Persian, Arabic and etc...