How to create a Windows Service without any third party app - windows-services

I'm currently developing a keylogger for my client (so that he could monitor his employees) using python. I've converted the ".py" file to the executable, but now I want it to run in the background as a windows service so that nobody could end the process. I searched online and found that I need to download some third party software for that. Can't I do it using a single batch file or something like that? Because my client has no knowledge about these things, so, it would be difficult for him to install all that stuff.

Related

Does flutter/dart work on desktop as a native app?

I'm interested in learning Google's flutter/dart but I want to be able to create desktop x86 apps with it like with react native. Is there built in support or any 3rd party addons that I can use to make drsktop applications with flutter/dart?
I'm having a hard time deciding whether this question is off-topic or not; I won't vote to close it for now but I wouldn't be surprised if someone does (since it veers pretty close to the 'recommend a tool' type of question).
To answer your question though, the answer is sort-of for now. From the flutter FAQ:
Can I use Flutter to build desktop apps? Yes, but right now it’s not
very well supported. We’re working on making this a first class
experience. Our current progress is documented on our wiki.
The wiki is here and at the current time of this answer it has some basic information on how to set up building a flutter app for windows, mac, and linux, along with warnings that everything may change at any point and that any plugin needing native code won't work as they only contain code for iOS/Android. The flutter-desktop-embedding repository (left-over from before google officially started working on desktop embedding) is an example of how to get started but your mileage may vary as I'm not sure how up to date it is.
Basically, you could start developing a flutter app now on desktop now, but I wouldn't expect to be able to publish that app any time soon without a significant amount of work to get everything to line up properly. Also, publishing it might be difficult at least on windows, and on windows the current shell uses GLFW which isn't probably something you'd want to use in a released app if possible. I'm not from google so I can't speak as to their plans but I would guess (and hope) that there will be some sort of announcement at Google I/O about desktop embedding, but no guarantees.
So TLDR; yes for development purposes but no for deployment.

hybrid mobile app development features

I am developing one mobile app, the requirement is as follows.
1.The app should work offline and online.
2.It should have database in both local device and in the server.
3.When internet is on data has to be synced between local and server.
4.At any point of time local data and server data should be the same.
I have done lot of research on this but not able to find whether hybrid app development supports or not. Some one says we can do but other link says it's difficult and might not be possible.
Please help to me sort out this issue.Thanks in advance
for sure it is possible to have those features in an hybrid app. All depend what you choose to use to deal with that or how you choose to program it.
Remember than an hybrid app have almost all features that a web application could have as it could use almost all technologies, tricks, frameworks and libraries out there.
I have already developed an hybrid mobile app using cordova, jquery and jquery mobile that meet points 1 to 3. Though I am not saying you need to use jquery, or any of the other tools. I described the solutions I use for that app, however they are maybe not the best but it was the most practical and easiest solutions given the time frame and budget.
Was achieved by mirroring the server "data base" the first time the app is installed with WiFi access. When no internet is available the the app use the local data, when it is available then it take the data from the server and update the local data.
The local database was not a formal one, just JSON data files, very similar to the ones provided by the web service.
You can be checking for an active internet connection with the cordova network functions, once detected try to reach the server to check if the actual connection is working, on success then proceed to request mirroring the data. Just be sure to check if the local data is newer to the server one and instead of overriding you should first update the changes in the server.
I think this point is a bit difficult given the fact that you want to work offline. When you are offline you couldn´t do too much to reflect the server data into the app, as you are offline. Then having an exact mirror at any time is not feasible. However having a mirror when you have connection then that is another story.
Having a perfect data sync should be done carefully and instead of programming you own solution try to use a service or tools for that, like http://www.couchbase.com/mobile.
Hope it helps.
Hybrid applications are, at core, websites packaged into a native wrapper. They look and feel like a native app. Hybrid app have main features are portability (one code base, multiple platforms), Access to various hardware/software capabilties, cheaper orginigation costs, faster speed to market.

Possible to create a zeroconf service with Delphi XE5?

Working on an appliance and would like to support zero configuration feature. That way users can look for the device on the network and simply double click an icon to access the web interface without having to configure it or know its ip address.
Tried to use UPNPLib_TLB but functions seem to be read-only; am I right? I can create a device using CoUPnPDevice.Create but can't set a FriendlyName or a URL.
Tried to use Deltics Bonjour service but it crashes on create (ACCESS_VIOLATION). The demo code uses a custom test unit which complicates experimentation.
After much research it does not look like there is a component available for this and would appreciate some pointers. Has anyone successfully created a zeroconf broadcast either via UPnP or Bonjour with Delphi XE2/5.. I can go back to Delphi 7 if required. Target = Windows 7.
NOTE: To be clear, I can find existing devices on the network and don't want to enumerate existing devices but what I want is to broadcast my service so that my box behaves like a network printer for example. The only service I need to expose is the URL so that users can access an embedded web server.
Appreciate the help!
EDIT
With the tips provided I did some research and getting this done the RAD way is not possible.
Using MS APIs directly is time consuming and requires a level of understanding of C that I don't have. Porting the Delphi 5/Indy 7 component to XE2/5 will require a good amount of work and debugging.
I discovered UPnP developer tools from Intel now open source here: Developer Tools for UPnP. This tools makes it really simply to create a server in 10-15 lines of code. Intel provides a DLL that I can call from VS Express as follows and it works great:
device = UPnPDevice.CreateRootDevice();
device.FriendlyName = 'My name';
device.PresentationURL = 'URLToEmbeddedServer";
..
I tried to use headconv7 tool to convert the .h file Intel's UPNP.DLL to a pascal file and call the external functions within the DLL directly from Delphi but there were too many problems with the conversion.
It's too bad because the Intel library makes it really simple to create UPnP stacks and the approach would apply itself very well to a component but for now its quicker to use .NET and VS Express to get the job done.
When using UPNPLib_TLB, you are not supposed to create a UPnPDevice object directly. UPnpDevice describes a known device on the network, which is why its properties are read-only.
Read the documentation:
Control Point API
Finding Devices
You are supposed to create an instance of the UPnPDeviceFinder class instead. Its search methods will give you a UPnDevice object for each device that is found.

Can I distribute my BlackBerry 10 WebWorks app via web server (OTA)?

I have a multi-platform mobile app that I am releasing on iOS, Android, Windows Phone 8, and Blackberry 10 (WebWorks). For the other three non-BB platforms, I have a way to distribute the enterprise app via a web server (user installs by clicking a link on a web page inside of a mobile browser). However, for BB10 Webworks, I can't seem to find a documented way to distribute a .bar file in this same manner.
Options:
1) I have seen docs that discuss placing Java-based apps (.jad and .cod files) on a web server for OTA distro, but can't find any documentation on being able to do the same with BB10 .bar files.
2) Blackberry App World - but this is public, which is not what I want for this enterprise app
3) Blackberry App World for Work and BlackBerry Enterprise Service 10 - both of these seem to be overkill for my modest purpose. I only have a single app and simply need a download link, not full app/device management, app catalogs, etc.
Is it possible to do #1 with .bars? Or is there another option I have not considered?
Thanks
I was not aware that sandboxed users could see apps other users couldn't, as mentioned in the one of the answer - something for me to try!
The only other option I am aware of is to "side load" the bar file, you can side load with various tools which you can find if you search, such as:
http://forums.crackberry.com/blackberry-10-os-f269/how-get-bb10-hardware-id-sideload-app-bar-file-into-blackberry-10-a-780773/
http://forums.crackberry.com/android-app-sideloading-f279/how-sideload-apps-bb10-device-easy-way-windows-825656/
I haven't tried out these tools, sorry.
I actually do it using the tools you get with the Android Command line toolset - available from BB web site here:
http://developer.blackberry.com/android/tools/
but this approach are not 'user friendly'. I use it because I have converted a few Android apps to run on BB10 and so got to know the tools.
I can't say that these tools are safe, since I don't actually know them, but what I can say is that I am not aware of any way that a PC based tool sending something over the internet (or USB) to your BB10 could break it, nor am I aware of any way that a side loaded app could break your BB10. The days of bricking your BB devise with a dubious bit of software do seem (thankfully) to be over.
Edit: Just thought I would update this given the options that Nate has found, which I also didn't know about!
Both the sites Nate has found seem to work in the same way as the tools I mentioned above. My understanding of all these tools is that they run a deploy utility, that connects to the BB10 device via a TCP/IP connection (which could be routed over WiFi or USB), and sends the bar file over this connection. The connection is initiated by the deploy utility, which is why it has to be in the same network.
There is likely some BBRY proprietary protocol involved, which includes an exchange of the password, as the password supplied to the deploy utility must match the development password on the device.
Now I strongly suspect that BBRY have not published the specification for this communication. I also strongly suspect that the password is never seen in the clear, so you could not use some tool like Wireshark to reverse engineer this. My suspicions therefore is that the tools, including the two I have pointed you at, all run something like the Android Command line tool under the covers - and they got this from BBRY. So perhaps you can build something like the web sites yourself - assuming you have the time and inclination of course.
Just a thought and just my opinion.
There is probably a better way, but I don't know about it. Anyway: you can deploy an app to the BB World, but not put it up for sale, then add users accounts to your sandbox. They, and only them, will be able to download your application, which will not be shown on the BB World to anyone else.
This isn't natively supported on BlackBerry 10, but it looks like there are a few hacks that people have already figured out to make this work.
Depending on your needs, these may or may not work for you (see especially the security caveats on the FAQ pages).
https://sideswype.me/
https://barinstall.com
These appear to take advantage of a VPN security hole. BlackBerry has previously patched this hole, but according to the BarInstall site, the owner just added support for 10.2, to work around the patch.
Both of these services do charge a modest fee, but it may be easier for you than maintaining a BES server.
Peter Strange's answer is quite comprehensive for the time it was written. I will just add that with the release of BB 10.2 you have the option to distribute your application OTA as an APK. Since you are using HTML5 for development I suspect there will be little performance difference between running the APK and running the BAR. But that is something you can check out if you have, or know someone with a BB10 device. Performance should improve with the release of 10.3.

Can someone check/revise my understanding of Blackberry development options?

I'd like my Blackberry devices to get and possibly set data to the server, and am a little confused by all the options:
RIM-Push/Pap-Push. Use any library that is able to compose a HTTP GET request to the MDS-CS service (not MDS-IS). This is a one way operation from the server to the device.
RIM-Push (Push a URL and or shorcut to a device for possible offline viewing)
PAP-Push (Same as above, BUT allows for message confirmation of delivery)
WebServices: Use Visual Studio 2008 to create a Web Services only project. I'm unclear if this is supported anymore, or if MDS-IS is used. This is a 2 way operation.
MDS-IS: Use Eclipse to develop the applications and Java is required, I am unsure of what client libraries are able to do (2 way operation).
Let me know if missing any option, or if I need to revise my understanding of the basics
This is actually quite a broad question - there are a lot of ways for a BlackBerry device to interact with a server, and the ideal way depends heavily on your specific application.
Generally:
MDS Studio: the Visual Studio 2008 method is no longer actively supported. It was a mostly visual forms designer, but not a great solution for a lot of reasons. Basically, don't use it.
Mobile Web: Depending on what you need to do, this might work. Everything server side. The thing to be aware of (and why this doesn't work for a lot of problems) is that prior to BlackBerry 6 the browser wasn't very capable, either in terms of HTML support or JavaScript support. You can, however, create shortcuts to mobile web sites which appear as icons on the BlackBerry homescreen. And you can use BlackBerry Web Signals: http://na.blackberry.com/eng/developers/browserdev/websignals.jsp to push changes to mobile web pages to devices
Widgets: Supported in BlackBerry OS 5 and higher. http://na.blackberry.com/eng/developers/browserdev/widgetsdk.jsp These are packaged much like 'native' BlackBerry apps, but written using HTML and JavaScript. Can be a good option for rapid development if you're ok with just targeting OS 5, and with the limitations of the BlackBerry Browser. Lots of JavaScript hooks to system functions, so they give you more functionality than pure mobile web, and you can distribute them through App World and the like.
Java Apps: Most development work, but you get potentially the best user experience, and the most functionality. Too broad a topic to cover adequately here, but there are a lot of questions related to these on SO and elsewhere. A good starting point is the BlackBerry developer zone: http://www.blackberry.com/developers RIM Push and PAP Push both fall into this category, as they interact with Java apps, though there are other methods that you can use to achieve similar results (client polling, or I've even seen SMS or email used to push info or wake up a client, though this isn't recommended by RIM).
For a deeper overview of the options I'd recommend a book by my friend John Wargo, called BlackBerry Development Fundamentals. He covers the various options pretty well.

Resources