Solved

curl and mtr for windows BusyBox

Posted on 2015-01-13
21
391 Views
Last Modified: 2015-01-30
I have been searching and cannot find curl and mtr for the windows version of BusyBox.
Might someone know where I can find these or if they do not exist.

If they do not exist, are there any options for compiling for this version of BusyBox?
0
Comment
Question by:projects
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 10
21 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40553533
Which version? busybox is just packager that takes all executables you want in single one.
0
 

Author Comment

by:projects
ID: 40553783
What ever the latest version is... but the one I am using right now is;

BusyBox v1.19.1_18_0-306-geb28f73.git (2011-01-16 17:56:02 ICT) multi-call binary.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40553885
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:projects
ID: 40556310
Yes, I know about that FAQ and that is why I posted this question, because it is still not clear if mtr and curl code might be available for this version of busybox.

I know where to find mtr and curl source for openwrt busybox but I cannot confirm anywhere if this source of other would be available for the win based busybox.
0
 

Author Comment

by:projects
ID: 40556453
In fact, the question could be...

The openWrt project uses BusyBox and of course we have BusyBox for windows.
Could the mtr and curl code for the openwrt project be re-compiled to work with win based BusyBox?
0
 
LVL 62

Expert Comment

by:gheist
ID: 40556491
curl and mtr are separate programs, not busybox on openwrt, your assumption is wrong. You need to use pure mtr and curl sources with busybox (that involves programming)
0
 

Author Comment

by:projects
ID: 40556649
I know they are separate programs and need to be added to busybox.

OpenWrt busybox doesn't package these two tools but you can include them in your custom build, which is what I do, or simply use opkg to install them.

For the win version of busybox, there are no assumptions being made, I am wanting to know if the curl and mtr for openwrt could be modified to be included in the win version of busybox.

Yes, with some programming involved :)
0
 
LVL 62

Expert Comment

by:gheist
ID: 40557126
You called in openwrt, not me. mtr and curl are fairly big packages for environments where busybox is relevant.

1) download, unzip busybox
2) download and add mtr
2A) change it accordingly to FAQ entry
3) download and add curl
3A) change it accordingly to FAQ entry
4) compile and enjoy
0
 

Author Comment

by:projects
ID: 40558652
I run curl and mtr on all of my openwrt routers. When I make a build, I simply add these extras into the build.

What I am wanting to find is more information on how I can do the same for a win busybox build, you know, without having to install a full separate version of curl and mtr.

Are you talking about the Linux (openwrt) version of bb or the win version? I'm not sure what you are suggesting in your last post. Based on the work we've done so far, it's more complicated than what you are suggesting but heck, if you know its this easy, I'd love more details.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40558676
Read the busybox FAQ again
In case if doubt re-read it.

What help? On windows you should use powershell, cmd, vbs and all that nice stuff, not unix.
0
 

Author Comment

by:projects
ID: 40566913
My goal is to maintain a Linux script based application as closely as possible on win as well using something like bb. That is why I am trying to find tools which will run from the command line, able to use scripts only.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40566936
cygwin?
0
 

Author Comment

by:projects
ID: 40570890
The work first started with cygwin but it is much too bloated. Bb works out nicer.

So far, the downloadable curl was used and we've modified the mtr source code to work from command line but the problem is now that we have a raw sockets issue preventing mtr from running unless by admin.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40570903
Yes, raw sockets are only for administrator, it is suid on Linux, so on windows it must be asking for elevation.
0
 

Author Comment

by:projects
ID: 40570913
The script will run as a console app I think it's called, as a service is the hope. Since the System or Local user would start that service, then would that take care of the raw sockets problem?
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 40570920
Make mtr a separate program, just in case it needs elevation... Curl will not complain about being part of busybox.
0
 

Author Comment

by:projects
ID: 40570947
Yes, it is a separate, stand alone executable at this moment.
From the command line using PowerShell in win 7...

W:/uploads/win_script $ ./mtr.exe
socket(sendsock4): Not owner
mtr: unable to get raw sockets.

W:/uploads/win_script $ ./mtr.exe  -h
socket(sendsock4): Not owner
mtr: unable to get raw sockets.
0
 

Author Comment

by:projects
ID: 40571017
That seems to say that it will prompt a user for access every time? In my case, I need this to run autonomously once installed.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40571077
There is no secret elevation in windows. User or service must be in administrators group, i.e permanently elevated.
0
 

Author Closing Comment

by:projects
ID: 40580998
We ended up building a custom version of mtr and using a separate version of curl.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question