building tshark - porting

I am porting tshark to a different OS.Can someone tell me which files/folders can be removed from the source code ? I am aware that GTK isnt required;but it would be great if i could do away with all the unnecessary files/folders right at the beginning.
Thanks in advance.

Can someone tell me which files/folders can be removed from the source code ?
ui/gtk and, if you have it, ui/qt. Do not remove anything else under ui; at least some of that code is shared between TShark and the {GTK+,Qt} versions of Wireshark, and the code in ui/cli is the tap code for TShark.
help is Wireshark-specific, so you can probably remove that.
image is necessary if you're building for Windows (it arguably shouldn't contain both images for the GUI and .rc.in files for the Windows resource compiler, but maybe that makes referring to icons in image more complicated).
You could perhaps also remove doc and docbook if you don't plan to build any documentation.
You could perhaps remove test if you're not going to run tests, and packaging and debian if this OS isn't Windows or some flavor of UN*X for which Wireshark provides packaging mechanisms.
I don't know whether any of the autoconf or CMake stuff will break if you remove them, however. Unless you're running low on disk space, I'd leave all the directories and files in the source tree there, and just not bother porting the files that you don't need.

Related

vscode: Speed up navigation througe huge projects - intellisense etc

Objective
I've a huge vscode Project:
2 Mio Files
100+ GB.
a lot of C-Files, but also build folders a lots of other irrelevant crap.
vscode is slow.
The project includes besides a lot of C/C++ files maybe in some parts cmake files, some codegen/glue-code, external headers, build scripts, external includes from SDK.
I want to use vscode to edit the code, not to compile or run it. The project consists besides the relevant c-files out of a lot of precompiled libs, helper tools, a huge amount of other files and images.
I want to speed my vscode setup up.
How to tell the user supporting tools of vscode, where to set their focus?
Are there any other options to speed up vscode?
Approach
My First Idea: "Make vscode ignore of everything I do not need and tell the tools precisely on what to focus and which leave aside."
Is there a way to make vscode ignore all of such folders in search and in the c++ indexer, the tool which supports code navigation and syntax highlighting?
Clarification / Additional info
I do not have configured vscode. I do not know how. Most the time intellisens/code heighlighting / autocompletion etc. works fine and I can jump around in that code. How ever I've encountered some huge projects, where intellisens failed half or in total or took a lot of time to do so. I do want to set up an project properly. I do not know where to find such settings and most important, which behavior it affects:
intellisense, please have a look only at folders ...
actially, ignore everything below those folders
take this single subfolder, but ignore everything around it.
btw, there is an totally different location for SDK headers, could you also use code and header from there?
I do use vscode to edit the code, I do not use it to compile or debug the code.
In short, I do not know which support tool (intellisense, c++ Extension, ???, ...) have which effect and where they can be configured. Like which vscode components make my life as easy as it is and how do I configure them?
EDIT: List of installed Plugins
as from #user requested :). If cmake is known for eating resources, I could discard it. Is it mandatory for the intellisens stuff?
Could discard python too, if necessary.
ms-vscode.cpptools
https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options
ms-vscode.cpptools-extension-pack
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-themes
alefragnani.bookmarks
https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
twxs.cmake
https://marketplace.visualstudio.com/items?itemName=twxs.cmake
ms-vscode.cmake-tools
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
ms-python.python
https://marketplace.visualstudio.com/items?itemName=ms-python.python
ms-python.vscode-pylance
https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance

Can Windows Theme files (aero.msstyles) be sideloaded with spyware in their resources, specifically in UI scripts

Short version: see topic
Detailed version:
I want to use a specific 3rd party theme for Windows. I'm already using an open source solution which I've compiled myself to disable Window's restriction on Themes.
In the past, when using 3rd party theme related mods that come with DLLs (for example authui.dll for the login ui, or imageres.dll for modding system icons), I avoid using unknown DLLs by simply copying the unknown DLL's theme related resources (such as Bitmaps, Icon groups or UI scripts) unto it's virgin MS Dll counterpart. I call this resource grafting, where resource are changed but the executable elements of DLLs or exes are left alone.
Going back to the theme I want to install, I used sha256 hashing to determine that only aero.msstyles which is also modifiable by resource hacker. So I did the same thing I usually do and transferred resources from the third party theme to Window's own aero.msstyles. Problem is that I ran into a type of resource that I am unable to read or know the contents of. It's called VARIANT. From some experiments done in a VM, it seems to be some kind of binary UI script that resource hacker is unable to decompile. I usually like to be able to read any UI scripts that I transfer but I am unable to do so with this one.
Would this constitute any real security risks? Can UI scripts be side-loaded with some kind of exploit? Seems unlikely to me since the function of a theme file (msstyle) is to coordinate the appearance of the system UI but I don't know enough about the inner working of the whole theming system to be sure. I thought I'd get some other point of views before I take the theme out of the Virtual Machine.
I used vBinDiff to compare the hex code the altered VARIANT/NORMAL binary to that of the original theme. You can also copy the binhexes and save them to two text files which you would compare with WinMerge.
vBinDiff and WinMerge will highlight what modifications and what additions/substractions were made to the binaries, displaying them side by side. I read through the differences, 90% of them were no larger than 4 octals (4bytes), typically what you would expect to see when modding colors using a hex editor. The biggest divergence was an added 32bytes of code.
There are two possible explanations for the such an addition: (1) the author added extra image resources and added the entries necessary to reference them, (2) there is some kind of unwanted code that has been slipped in.
To address the possibility of 2, I did a search to see how small trojan code can get. How likely is it that a trojan has been stuffed into 32bytes if compiled UI scripts? I found a few mentions of an old 17byte virus from the DOS era called trivial which I disegarded right away because it would become apparent very quickly given it's known behavior. As far as full fledged trojans with backdoor and downloading abilities, the smallest I found was 20kb (trojan tinba), discovered in 2012. There is also Catchy32 which is still considered a Trojan but with simpler and very specific functionalities and that one's about 580 bytes (reference). Based on this info, I established that it is highly unlikely (if not impossible) to slip any code in 32bytes of code and established that the resource in question is clean.
Mind you, this doesn't answer the question I asked (can binary UI script resources in a theme carry mal-code) but it does solve my dilemma. Thought I'd share it.

Package development for Sublime Text 2 with multiple files without restarting

I am developing a couple of packages for sublime text, and to avoid copy and pasting massive amounts of code I began to move my classes into separate files. I have been avoiding this so far, since, in my current workflow, changes to files that are not in the main plugin file won't get updated when saved and only go into effect when I restart sublime.
Is there a way to reload a package, including all it's files, without restarting Sublime Text?
You don't actually have to restart the editor. You will have to restructure your plugins though to take advantage of this. Essentially, you can load the plugin files from some top level file. As an example, take a look at Package Control. I also do it in PersistentRegexHighlight (though the package control solution is likely more robust (I did base it on that). Still not as good as simply saving a particular file, but better than restarting! In fact, you could probably tie into the on_post_save event to automatically save the top level file when you modify a child file.
I personally found the easiest solution was to install Package Reloader, and just put a new file in the top directory of my plugin named .build. Save your top-level plugin file and enjoy not having to restart.
Virtually no restructuring of code required.
From the unofficial docs:
Sublime Text will reload top-level Python modules from packages as they change (perhaps because you are editing a .py file). By contrast, Python subpackages won’t be reloaded automatically, and this can lead to confusion while you’re developing plugins. Generally speaking, it’s best to restart Sublime Text after you’ve made changes to plugin files, so all changes can take effect.
Unfortunately, plugins are not loaded into a scope visible from the console (Ctrl`), so you can't just reload() it. EDIT But, you can call reload() from within your top-level plugin file, as detailed in #skuroda's answer.
You'll have to make the decisions on when to break classes out into separate files vs. keeping them together in one monolithic collection. Having 50 files, each with only two or three function definitions is overkill in one direction, while having 20 classes each with 10 or 15 methods all in one file is going overboard in the other, so just do what feels best for the particular project. In my experience killing/restarting ST2 doesn't take too long in any of the supported operating systems (except on XP, for some reason...), so hopefully it's not too much of a delay on your workflow. One suggestion I'd give is to create a portable installation (if you're on Windows) with just the bare essentials in extra plugins if your startup time is too long.
Good luck!

What exactly happens when Complex Script Support is enabled?

When we click the check box "Install files for complex script and right to left languages (including Thai)" in Regional and Language settings what exactly happens?
Changes to registry keys?
I noticed that it installs some .fon files and keyboard dlls.
Is this totally necessary if one just wish to read complex script on Windows XP? My test inside VirtualBox as Windows 7 as the host OS seems to indicate that for reading Complex Script need not be enabled. Yet that's not what all the literature on the subject says. What's going on?
Update:
http://hi.wikipedia.org should not be readable if Complex Script is not enabled
http://hi.wikipedia.org/wiki/विकिपीडिया:Devanagari_Help
Problem is that it is readable.
Font files. Rendering libraries ('Uniscript'). Input methods. Certainment beaucoup de cle-registry. (Certainly lots-o-registry-keys.)
Note that IE will tend to get things right even when other things don't, since it builds in a good deal of fancy-pants rendering. Try, oh, Outlook, or some simple sample Win32 program.

Matlab and MrVista

I'm new to MATLAB and mrVista.
I'm running Matlab Version 7.8.0.347 (R2009a) 32-bit(win32) from February 12, 2009
OS is Windows 7 Professional
I downloaded the most recent MrVista_hourly.zip and extracted it into my C:\Program_Files_(x86)\MATLAB directory.
I think I need to run mrvInstall, but when I do, I get the following:
EDU>> mrvInstall
Checking VISATSOFT installation.
Windows, 32-bit, installation
Checking and possibly installing .NET framework.
This can take several minutes
Checking for visualization library (.dll) files.
You are missing msvcp70.dll.
So, I'm completely lost at this point. Do I just need to download msvcp70.dll from the net? If so, is there a safe place to download it from? If there's some other way I'm supposed to get mrVista to work from MATLAB, instead of mrvInstall, please let me know that.
Thanks in advance for your help.
EDIT: I've downloaded and installed the dll and still isn't working. I'll go ask on Super User. Thanks for trying to help anyway.
EDIT2: before asking on superuser, I tried once more to solve it myself. Turns out, under the File -> Set Path you have to Add_With_Subfolders the specific vistasoft folder. (Even though I'd already added with subfolders the parent directory where vistasoft lives, that wasn't good enough.) So, once I added the path, and made sure I was in the directory where my data lives, I was able to run the initial command from the tutorial:
mrVista inplane
It opens up very nicely now. No compiles or installs or other commands were actually necessary. Methinks I'm going to go edit a wiki now so no one else has this problem.
There's a pretty comprehensive discussion of Visual C++ runtime DLLs here
Whoever built the file that uses msvcp70.dll (and msvcr70.dll) presumably had Visual Studio 2002 and the right to redistribute that file.
You're probably not going to get much help beyond that because I'm a MatLab user and I have no idea what mrVista is. You've provided no link, no explanation, nothing that someone could use to help you.
See this page on MrVista Wiki:
http://white.stanford.edu/newlm/index.php/Troubleshooting#MESH
There is information on this dll and where to get it from.
I guess "serverfault" is VERY badly named if it's the go-to place for things that have zero to do with servers;-). Maybe the complaint shd actually point to superuser.com?
Me, I've researched the top google hits for this DLL, the very top one seems to be on "dll-files.com" which has no bad reports I can see and is rated green/safe by mcafee, so that's where I would risk downloading it from. Weird that I can't find it on a MSFT site, though.