Has anyone successfully used mach_inject for Finder in Snow Leopard? - osx-snow-leopard

Just wondering if anyone has done this successfully and what were the steps of making it work.
Thanks in advance.

GrowlSafari uses mach_inject.. it works.. I tried reverse engineering but I don't understand why it aint working for my bundle loader (wich is based on growlsafari) there's not really anything in it that would say it is working on snow.. but you could always try iam still a froob

I know that SIMBL use mach_inject ( like dropbox and google drive )
and that the SIMBL Plugin and Open Source ColorfulSidebar inject itself in the Finder
here for the plugin source
Hope that help!

mach_inject is used to inject code into arbitrary Mac OS X process, however mach_override overrides code within the same process. You can see an example of using both in my FinderMenu project, which adds items to Finder context menu. In this project, I use mach_inject to load my custom bundle into Finder process, and after that mach_override to replace context menu class method implementation.

Related

How to lock an exe file?

(Sorry in advance, if I have the wrong tags)
Hello!
So I am trying to work on a personal WPF project which would allow the client application exe to download another application exe (Unity Application) and open it within the client exe's Grid. Everything is working fine.
But, I am wondering if there's a way to "lock" the downloaded application in a way that only my client exe can open the downloaded exe?
Here's the only solution I have thought of but not sure with
Check for command line arguments within the Unity Applications
This works well but people who knows about the existence of decompiler might be able to decode that I am trying to check the arguments, and input relevant data there. :(. So, it won't help too much?
Thanks for any insights.
-Kevin
There is no non-hackable solution, you can only make it harder for crackers to break into the app by code obfuscation (hard to read the code) + adding integrity checks (make sure that your app is not modified).. There are commecial apps out there to do this (ex. PreEmptive), and their solutions differ from each other, nothing is ultimate.
Anyway, You might make Unity Application read some file or some registry value that Client application has updated just before launching the Unity Application, along with command line args method that you mentioned..

Serilog in UWP is not writing the log in D drive

I am using Serilog in my UWP application. I can write the log in App LocalState folder without any issue.
But now I want to write the logs in D: drive specific folder. I have added the broadFileSystemAccess restricted capability and enabled the full access from the settings.
But still it is not creating the file in the specified location and not raising any error.
Anyone know the fix for this? Thanks in advance.
var file = #"D:\Logs\Serilog.txt";
Serilog.Log.Logger = new LoggerConfiguration().WriteTo.File(file).CreateLogger();
There is a very important information about broadFileSystemAccess capability on the File access permissions document. I'm not sure if you note it.
This broadFileSystemAccess capability only works for APIs in the Windows.Storage namespace.
This point is very important. So, your issue actually is you need to check the LoggerConfiguration().WriteTo.File(file).CreateLogger() relevant method if it write to files by using the Windows.Storage APIs.
By my checking, it uses the StreamWriter method to write to files. But this method is not included in the Windows.Storage APIs. So, the issue was very obvious. You need to submit this issue to Github and let the officials to modify this method and make it work in UWP.
Or, if you're interested in serilog-sinks-file source code, you could download it and make the change by yourself, Then, you could compile a custom serilog library version for your UWP project.

Automate download of file dynamically generated by http request

I am trying to automate the download of a bunch of csv files that are generated from a database based on which checkboxes are selected on a form. The website generates the csv file with the click of a 'Download' button. I found the URL to the download prompt using Firebug (and determined how it changes based on checkbox selection), but am unsure how to use it since it is dynamically generated and does not contain a file path. An example URL is the following:
https://www.quantcast.com/download/plannerCSV?&d0Id=10&sc=1&mr=10000
What is the best way to go about doing this? I looked into the Python mechanize module and briefly glazed over pydermonkey, but had trouble finding documentation on downloading dynamically generated files. I also found some suggestions on other forums for using VBscript and Perl-- I prefer to use Python if possible since I am most familiar with it, but if another language is more appropriate, I will learn what I need in order to accomplish this task--I just hope to do it efficiently! Comments from anyone with experience/knowledge/insight on this topic would be appreciated.
Probably the easiest way for you to do this is to use the command line tool wget. If running a UNIX/Linux it's already there. If you're running Windows then a Win32 version can can be downloaded from: http://gnuwin32.sourceforge.net/packages/wget.htm
The you can use a shell/batch script that will download the file for you.
Example for Windows:
set id=10
set sc=1
set mr=10000
set my_url=https://www.quantcast.com/download/plannerCSV?&d0Id=%id%&sc=%sc%&mr=%mr%
set filename=planner.csv
wget %my_url% --output-document=%filename%
:
: do stuff with file
:

Loading modules in Prism from xap without reference

I'm using Prism 4 with Unity. I have a main project, and a module. The module is created as Silverlight Applications, so it builds a separate xap file.
I load the modules in the Bootstrapper's ConfigureModuleCatalog, just like the documentation states.
var moduleType = typeof (MyModule);
this.ModuleCatalog.AddModule(
new ModuleInfo
{
ModuleName = moduleType.Name,
ModuleType = moduleType.AssemblyQualifiedName,
InitializationMode = InitializationMode.WhenAvailable,
});
Everything works fine, but I notice that my main xap file also contains the dlls associated with my module. So, I set Copy Local = False on the module reference, and it builds correctly with the module dlls only in their own xap file.
But now my app won't run because I can't get the type information for MyModule. I get a FileNotFoundException.
I found that I can drop the reference entirely if I manually enter the ModuleName and ModuleType, and also set Ref = "MyModule.xap" on the ModuleInfo. This works fine, but here's the problem: I build frequently and use dynamic verion numbers. So the AssemblyQualifiedName changes too easily. Without the reference, there's no way to get it dynamically. If I drop the version number from the AssemblyQualifiedName, it doesn't work.
Surely there's some other way to get the module to load from its own xap file without it ending up also in the main xap?
Nevermind...
After researching further, it seems my mistake is in using wildcard versioning in the assembly version. It is suggested on many sites to use the wildcard in the assembly FILE version only, and use fixed version numbers on the assembly version. Then I can just drop the reference and refer to the module by its strong name with fixed version number.
I was so locked in to prism on this one. I didn't figure it out until I thought about assembly location in general. The post that solved it for me actual was about resolving sharepoint parts. Just goes to show sometimes you have to think outside the box.
Update
Looks like you can't use the wildcard in the file version... grr... I found an add-in that will work though http://autobuildversion.codeplex.com/
Anyone got a better idea?

where/ how can I get the selenium server source code used to build 2.0b3

I am trying to apply this bug fix http://code.google.com/p/selenium/source/detail?r=11856 to the selenium-server-standalone-2.0b3.jar.
Does anyone know where I can get the source code? The jar only contains class files.
Or if there are alternate ways of getting what I need, please do tell.
Thanks,
-Denali
You should be able to check it out from SVN:
Use this command to anonymously check out the latest project source code:
Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://selenium.googlecode.com/svn/trunk/ selenium-read-only
I am not entirely sure how this project branches their code, but I assume it would be a branch in the project for a release.

Resources