curl für die DBox2?
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
curl für die DBox2?
Hallo Zusammen,
nachdem ja der wget der Busybox ja sehr eingeschränkt ist, wollte ich mal fragen, ob es eine Möglichkeit gibt, curl zu installieren.
Da ich eine 1GB SD-Karte eingebaut habe, sollte es vom Platz her keine Probleme geben.
Das müsste doch mit: LD_LIBRARY_PATH= zu machen sein, oder?
nachdem ja der wget der Busybox ja sehr eingeschränkt ist, wollte ich mal fragen, ob es eine Möglichkeit gibt, curl zu installieren.
Da ich eine 1GB SD-Karte eingebaut habe, sollte es vom Platz her keine Probleme geben.
Das müsste doch mit: LD_LIBRARY_PATH= zu machen sein, oder?
-
- Developer
- Beiträge: 2183
- Registriert: Mittwoch 10. Dezember 2003, 07:59
Re: curl für die DBox2?
ist doch schon mit drin:
Code: Alles auswählen
/ # ls -la /lib/libcu*
-rw-r--r-- 1 root root 124236 Jan 16 21:21 /lib/libcurl.so.2
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
....Nur leider bin ich da nicht so der Profi.Houdini hat geschrieben:ist doch schon mit drin:Code: Alles auswählen
/ # ls -la /lib/libcu* -rw-r--r-- 1 root root 124236 Jan 16 21:21 /lib/libcurl.so.2
Was muss ich denn tun, um curl benutzen zu können?
-
- Developer
- Beiträge: 2183
- Registriert: Mittwoch 10. Dezember 2003, 07:59
Re: curl für die DBox2?
ok, du hast Recht, libcurl ist mit drin aber nicht curl
dann also zusätzlich noch das curl-binary mit ins image machen
(curl wird zusammen mit libcurl gebaut, oder du nimmst es aus einer yadd-distri)
dann also zusätzlich noch das curl-binary mit ins image machen
(curl wird zusammen mit libcurl gebaut, oder du nimmst es aus einer yadd-distri)
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
Nun, wie schon gesagt, ich bin da nicht so der Profi....
Könntest Du evtl. bitte kurz beschreiben was zu tun ist?
Könntest Du evtl. bitte kurz beschreiben was zu tun ist?
-
- Developer
- Beiträge: 4189
- Registriert: Sonntag 2. November 2003, 12:36
-
- Foren-Moderator
- Beiträge: 297
- Registriert: Montag 11. Oktober 2004, 14:51
Re: curl für die DBox2?
Naja, wie houdini schrieb, kopierst du dir das binary entweder aus einer yadd oder du baust dir, wie seife sagte einmal das cdk.
Am Ende des Build Prozesses wirst du das curl binary finden.
Dieses strippst du sinnvollerweise noch (ist aber kein Muss) und kopierst es auf deine SD Card.
Dann machst du es ausführbar (mit chmod 755 /pfad/zu/deinem/curl) und benutzt es anschliessend)
Am Ende des Build Prozesses wirst du das curl binary finden.
Dieses strippst du sinnvollerweise noch (ist aber kein Muss) und kopierst es auf deine SD Card.
Dann machst du es ausführbar (mit chmod 755 /pfad/zu/deinem/curl) und benutzt es anschliessend)
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
So viel Aufand wollte wollte eigenlich nicht treiben.....
Aber vlt. hat ja Jemand schon eine fertig compilerte curl, und stellt diese freundlicher weise zur Verfügung.
Aber vlt. hat ja Jemand schon eine fertig compilerte curl, und stellt diese freundlicher weise zur Verfügung.
-
- Erleuchteter
- Beiträge: 600
- Registriert: Samstag 14. Oktober 2006, 10:53
Re: curl für die DBox2?
Wo ist denn beim "rauskopieren aus 'ner YADD" und "kopieren auf Deine SD" der Aufwand?
Das ist doch schon auf dem Silbertablett präsentiert...
Das ist doch schon auf dem Silbertablett präsentiert...
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
ingrid hat geschrieben:Wo ist denn beim "rauskopieren aus 'ner YADD" und "kopieren auf Deine SD" der Aufwand?
Das ist doch schon auf dem Silbertablett präsentiert...
Geht leider nicht.
Code: Alles auswählen
~ # curl http://xxxxxxxxxxxxxx
curl: symbol lookup error: curl: undefined symbol: curl_version
~ #
-
- Developer
- Beiträge: 4189
- Registriert: Sonntag 2. November 2003, 12:36
Re: curl für die DBox2?
Du mußt natürlich auch die libcurl.so dazu kopieren, denn die im Image hat dieses Symbol rausgestripped - weil es keines der binaries im Image benötigt.
Du wärst schon dreimal fertig, wenn du den Link oben beachtet und dir einfach ein eigenes Image gebaut hättest ;-)
Du wärst schon dreimal fertig, wenn du den Link oben beachtet und dir einfach ein eigenes Image gebaut hättest ;-)
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
So, vielen Dank für Eure Geduld und vor allem für die hillfreichen Tipps, - es hat doch noch geklappt.
Siehe:
Jetzt hätte ich aber noch eine Frage:
Geht das auch mit dem wget Befehl und Falls ja, wie?
Denn der ist doch eigentlich, wenn auch sehr stark kastriert, in der BusyBox schon mit drin....
Siehe:
Code: Alles auswählen
Using username "root".
BusyBox v1.2.1 (2007.12.14-15:13+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ # curl --help
curl 7.10.1 (powerpc-tuxbox-linux-gnu) libcurl/7.10.1
Usage: curl [options...] <url>
Options: (H) means HTTP/HTTPS only, (F) means FTP only
-a/--append Append to target file when uploading (F)
-A/--user-agent <string> User-Agent to send to server (H)
-b/--cookie <name=string/file> Cookie string or file to read cookies from (H)
-B/--use-ascii Use ASCII/text transfer
-c/--cookie-jar <file> Write all cookies to this file after operation (H)
-C/--continue-at <offset> Specify absolute resume offset
-d/--data <data> HTTP POST data (H)
--data-ascii <data> HTTP POST ASCII data (H)
--data-binary <data> HTTP POST binary data (H)
--disable-epsv Prevents curl from using EPSV (F)
-D/--dump-header <file> Write the headers to this file
--egd-file <file> EGD socket path for random data (SSL)
-e/--referer Referer page (H)
-E/--cert <cert[:passwd]> Specifies your certificate file and password (HTTPS)
--cert-type <type> Specifies certificate file type (DER/PEM/ENG) (HTTPS)
--key <key> Specifies private key file (HTTPS)
--key-type <type> Specifies private key file type (DER/PEM/ENG) (HTTPS)
--pass <pass> Specifies passphrase for the private key (HTTPS)
--engine <eng> Specifies the crypto engine to use (HTTPS)
--cacert <file> CA certifciate to verify peer against (SSL)
--capath <directory> CA directory (made using c_rehash) to verify
peer against (SSL, NOT Windows)
--ciphers <list> What SSL ciphers to use (SSL)
--compressed Request a compressed response (using deflate).
--connect-timeout <seconds> Maximum time allowed for connection
--crlf Convert LF to CRLF in upload. Useful for MVS (OS/390)
-f/--fail Fail silently (no output at all) on errors (H)
-F/--form <name=content> Specify HTTP POST data (H)
-g/--globoff Disable URL sequences and ranges using {} and []
-G/--get Send the -d data with a HTTP GET (H)
-h/--help This help text
-H/--header <line> Custom header to pass to server. (H)
-i/--include Include the HTTP-header in the output (H)
-I/--head Fetch document info only (HTTP HEAD/FTP SIZE)
-j/--junk-session-cookies Ignore session cookies read from file (H)
--interface <interface> Specify the interface to be used
--krb4 <level> Enable krb4 with specified security level (F)
-k/--insecure Allow curl to connect to SSL sites without certs (H)
-K/--config Specify which config file to read
-l/--list-only List only names of an FTP directory (F)
--limit-rate <rate> Limit how fast transfers to allow
-L/--location Follow Location: hints (H)
-m/--max-time <seconds> Maximum time allowed for the transfer
-M/--manual Display huge help text
-n/--netrc Must read .netrc for user name and password
--netrc-optional Use either .netrc or URL; overrides -n
-N/--no-buffer Disables the buffering of the output stream
-o/--output <file> Write output to <file> instead of stdout
-O/--remote-name Write output to a file named as the remote file
-p/--proxytunnel Perform non-HTTP services through a HTTP proxy
-P/--ftpport <address> Use PORT with address instead of PASV when ftping (F)
-q When used as the first parameter disables .curlrc
-Q/--quote <cmd> Send QUOTE command to FTP before file transfer (F)
-r/--range <range> Retrieve a byte range from a HTTP/1.1 or FTP server
-R/--remote-time Set the remote file's time on the local output
-s/--silent Silent mode. Don't output anything
-S/--show-error Show error. With -s, make curl show errors when they occur
--stderr <file> Where to redirect stderr. - means stdout.
-t/--telnet-option <OPT=val> Set telnet option
--trace <file> Dump a network/debug trace to the given file
--trace-ascii <file> Like --trace but without the hex output
-T/--upload-file <file> Transfer/upload <file> to remote site
--url <URL> Another way to specify URL to work with
-u/--user <user[:password]> Specify user and password to use
Overrides -n and --netrc-optional
-U/--proxy-user <user[:password]> Specify Proxy authentication
-v/--verbose Makes the operation more talkative
-V/--version Outputs version number then quits
-w/--write-out [format] What to output after completion
-x/--proxy <host[:port]> Use proxy. (Default port is 1080)
--random-file <file> File to use for reading random data from (SSL)
-X/--request <command> Specific request command to use
-y/--speed-time Time needed to trig speed-limit abort. Defaults to 30
-Y/--speed-limit Stop transfer if below speed-limit for 'speed-time' secs
-z/--time-cond <time> Includes a time condition to the server (H)
-Z/--max-redirs <num> Set maximum number of redirections allowed (H)
-0/--http1.0 Force usage of HTTP 1.0 (H)
-1/--tlsv1 Force usage of TLSv1 (H)
-2/--sslv2 Force usage of SSLv2 (H)
-3/--sslv3 Force usage of SSLv3 (H)
-#/--progress-bar Display transfer progress as a progress bar
~ # netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.178.202:ssh wks-1:3211 ESTABLISHED
tcp 0 132 192.168.178.202:ssh wks-1:3212 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 3 [ ] STREAM CONNECTED 6979 /tmp/camd.socket
unix 3 [ ] STREAM CONNECTED 6978
~ # cd /mmc
/mmc # cd wget
/mmc/wget # ./wget
/mmc/wget # wget
/mmc/wget # ./mmc/wget/wget
-sh: ./mmc/wget/wget: not found
/mmc/wget # ls
wget
/mmc/wget # /mmc/wget/wget
/mmc/wget # /mmc/wget/wget http://hhöhjvhj
wget: bad address 'hhöhjvhj'
/mmc/wget # /mmc/wget/wget --help
/mmc/wget # clerar
-sh: clerar: not found
/mmc/wget # cd /
/ # clerar
-sh: clerar: not found
/ # clear
/ # curl --help
curl 7.10.1 (powerpc-tuxbox-linux-gnu) libcurl/7.10.1
Usage: curl [options...] <url>
Options: (H) means HTTP/HTTPS only, (F) means FTP only
-a/--append Append to target file when uploading (F)
-A/--user-agent <string> User-Agent to send to server (H)
-b/--cookie <name=string/file> Cookie string or file to read cookies from (H)
-B/--use-ascii Use ASCII/text transfer
-c/--cookie-jar <file> Write all cookies to this file after operation (H)
-C/--continue-at <offset> Specify absolute resume offset
-d/--data <data> HTTP POST data (H)
--data-ascii <data> HTTP POST ASCII data (H)
--data-binary <data> HTTP POST binary data (H)
--disable-epsv Prevents curl from using EPSV (F)
-D/--dump-header <file> Write the headers to this file
--egd-file <file> EGD socket path for random data (SSL)
-e/--referer Referer page (H)
-E/--cert <cert[:passwd]> Specifies your certificate file and password (HTTPS)
--cert-type <type> Specifies certificate file type (DER/PEM/ENG) (HTTPS)
--key <key> Specifies private key file (HTTPS)
--key-type <type> Specifies private key file type (DER/PEM/ENG) (HTTPS)
--pass <pass> Specifies passphrase for the private key (HTTPS)
--engine <eng> Specifies the crypto engine to use (HTTPS)
--cacert <file> CA certifciate to verify peer against (SSL)
--capath <directory> CA directory (made using c_rehash) to verify
peer against (SSL, NOT Windows)
--ciphers <list> What SSL ciphers to use (SSL)
--compressed Request a compressed response (using deflate).
--connect-timeout <seconds> Maximum time allowed for connection
--crlf Convert LF to CRLF in upload. Useful for MVS (OS/390)
-f/--fail Fail silently (no output at all) on errors (H)
-F/--form <name=content> Specify HTTP POST data (H)
-g/--globoff Disable URL sequences and ranges using {} and []
-G/--get Send the -d data with a HTTP GET (H)
-h/--help This help text
-H/--header <line> Custom header to pass to server. (H)
-i/--include Include the HTTP-header in the output (H)
-I/--head Fetch document info only (HTTP HEAD/FTP SIZE)
-j/--junk-session-cookies Ignore session cookies read from file (H)
--interface <interface> Specify the interface to be used
--krb4 <level> Enable krb4 with specified security level (F)
-k/--insecure Allow curl to connect to SSL sites without certs (H)
-K/--config Specify which config file to read
-l/--list-only List only names of an FTP directory (F)
--limit-rate <rate> Limit how fast transfers to allow
-L/--location Follow Location: hints (H)
-m/--max-time <seconds> Maximum time allowed for the transfer
-M/--manual Display huge help text
-n/--netrc Must read .netrc for user name and password
--netrc-optional Use either .netrc or URL; overrides -n
-N/--no-buffer Disables the buffering of the output stream
-o/--output <file> Write output to <file> instead of stdout
-O/--remote-name Write output to a file named as the remote file
-p/--proxytunnel Perform non-HTTP services through a HTTP proxy
-P/--ftpport <address> Use PORT with address instead of PASV when ftping (F)
-q When used as the first parameter disables .curlrc
-Q/--quote <cmd> Send QUOTE command to FTP before file transfer (F)
-r/--range <range> Retrieve a byte range from a HTTP/1.1 or FTP server
-R/--remote-time Set the remote file's time on the local output
-s/--silent Silent mode. Don't output anything
-S/--show-error Show error. With -s, make curl show errors when they occur
--stderr <file> Where to redirect stderr. - means stdout.
-t/--telnet-option <OPT=val> Set telnet option
--trace <file> Dump a network/debug trace to the given file
--trace-ascii <file> Like --trace but without the hex output
-T/--upload-file <file> Transfer/upload <file> to remote site
--url <URL> Another way to specify URL to work with
-u/--user <user[:password]> Specify user and password to use
Overrides -n and --netrc-optional
-U/--proxy-user <user[:password]> Specify Proxy authentication
-v/--verbose Makes the operation more talkative
-V/--version Outputs version number then quits
-w/--write-out [format] What to output after completion
-x/--proxy <host[:port]> Use proxy. (Default port is 1080)
--random-file <file> File to use for reading random data from (SSL)
-X/--request <command> Specific request command to use
-y/--speed-time Time needed to trig speed-limit abort. Defaults to 30
-Y/--speed-limit Stop transfer if below speed-limit for 'speed-time' secs
-z/--time-cond <time> Includes a time condition to the server (H)
-Z/--max-redirs <num> Set maximum number of redirections allowed (H)
-0/--http1.0 Force usage of HTTP 1.0 (H)
-1/--tlsv1 Force usage of TLSv1 (H)
-2/--sslv2 Force usage of SSLv2 (H)
-3/--sslv3 Force usage of SSLv3 (H)
-#/--progress-bar Display transfer progress as a progress bar
/ #
Jetzt hätte ich aber noch eine Frage:
Geht das auch mit dem wget Befehl und Falls ja, wie?
Denn der ist doch eigentlich, wenn auch sehr stark kastriert, in der BusyBox schon mit drin....
-
- Developer
- Beiträge: 2183
- Registriert: Mittwoch 10. Dezember 2003, 07:59
Re: curl für die DBox2?
Die curl Hilfeseite anzeigen? - Wohl kaumGeht das auch mit dem wget Befehl und Falls ja, wie?
Jetzt wäre der geeignete Zeitpunkt, um uns mal mitzuteilen was du eigentlich vorhast...
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
Das ist mir auch klar...Houdini hat geschrieben:Die curl Hilfeseite anzeigen? - Wohl kaum.Geht das auch mit dem wget Befehl und Falls ja, wie?
Ich wollte damit nur ausdrücken, das curl geht.
Nun, wie ich schon gepostet habe ist der "integrierte" wget Befehf eben doch sehr eingeschränkt, deshalb bin ich auf curl ausgewichen.Jetzt wäre der geeignete Zeitpunkt, um uns mal mitzuteilen was du eigentlich vorhast...
(--> Dazu habe ich ein Script, dass das Aler von Dateien auf einen Webserver abfagen kann, ohne diese erst herunterladen zu müssen..)
Da ja nun curl geht, wollte ich eben wissen, ob man wget auch, oder so ähnlich einbauen kann.....
Der Hintergrund ist folgender:
Ich habe hier einen kleinen NAS mit FreeNAS.
Nun wolte ich mir ein kleines Plugin basteln, mit dem ich, bei Bedarf, den FreeNAS herunterfahren kann.
Dazu habe ich in der Dokumentation von FreeNAS gefunden, das man das mit dem wget Befehl machen kann:
Code: Alles auswählen
wget --post-data='Submit= Yes ' --user=LOGIN --password=PASSWORD http://<IP_DES_FREENAS_PC>/shutdown.php
Gibt es eine Möglichkeit den wget Befehl so einzubauen oder "aufzubohren", dass er die o.g. Funkton kann?
-
- Developer
- Beiträge: 2183
- Registriert: Mittwoch 10. Dezember 2003, 07:59
Re: curl für die DBox2?
Das busybox wget kann keinen post Befehl.
Dazu das "ausgewachsene" wget benutzen.
Dazu gibts hier auch was im Forum
Dazu das "ausgewachsene" wget benutzen.
Dazu gibts hier auch was im Forum
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
Nun, ich nehme mal an, dass Du diesen Tread hier meinst: wget bauen ohne busybox ?Houdini hat geschrieben:Das busybox wget kann keinen post Befehl.
Dazu das "ausgewachsene" wget benutzen.
Dazu gibts hier auch was im Forum
Aber wie schon gesagt, ich bin nicht so der Profi, was das Imagebauen angeht.....
-
- Erleuchteter
- Beiträge: 600
- Registriert: Samstag 14. Oktober 2006, 10:53
Re: curl für die DBox2?
Wenn's mehr nicht ist...
hat wget 1.10.2 gebaut, ich hab's dir hier hochgeladen: wget.zip
Ohne Gewähr, ich hab's nur fix gebaut, mehr nicht. Fragen zwecklos.
Edit: Ist übrigens ungestripped, also nicht über die Größe meckern. Darüber kannste Dir ja später Gedanken machen, wenn Du das wget wirklich brauchen solltest...
Code: Alles auswählen
make wget
Ohne Gewähr, ich hab's nur fix gebaut, mehr nicht. Fragen zwecklos.
Edit: Ist übrigens ungestripped, also nicht über die Größe meckern. Darüber kannste Dir ja später Gedanken machen, wenn Du das wget wirklich brauchen solltest...
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
Re: curl für die DBox2?
Vielen 1000 Dank großer Meister.
Funktioniert 100%ig.
btw: Über die Größe mache ich mit keine Gedanken, da ich eine SD-Karte mit 1GB in der Box habe.
Funktioniert 100%ig.
btw: Über die Größe mache ich mit keine Gedanken, da ich eine SD-Karte mit 1GB in der Box habe.
-
- Einsteiger
- Beiträge: 140
- Registriert: Mittwoch 9. August 2006, 10:29
-
- Interessierter
- Beiträge: 36
- Registriert: Sonntag 23. Mai 2004, 09:16
-
- Einsteiger
- Beiträge: 140
- Registriert: Mittwoch 9. August 2006, 10:29
Re: curl für die DBox2?
@3PO
sorry, wenn ich mich so spät etwas wortkarg ausgedrückt habe.
Unter den 3 Links ist eine Möglichkeit beschrieben, wie man mit
netcat den wget-Post Befehl simulieren (ersetzen) kann.
Ich habe dies bei meinem Fritzbox-Plugin erfolgreich angewendet
(unter anderem um die Passwortabfrage der Fritzbox von der dbox aus
zu verwirklichen) -stolzbin-
Da mir nicht bekannt ist, welche Daten Du per wget und post holen willst,
kann ich nicht garantieren, ob diese Methode bei Dir funktioniert,
aber ich denke ein Versuch wäre es wert...
...nichts für ungut.
Gruß musicus
sorry, wenn ich mich so spät etwas wortkarg ausgedrückt habe.
Unter den 3 Links ist eine Möglichkeit beschrieben, wie man mit
netcat den wget-Post Befehl simulieren (ersetzen) kann.
Ich habe dies bei meinem Fritzbox-Plugin erfolgreich angewendet
(unter anderem um die Passwortabfrage der Fritzbox von der dbox aus
zu verwirklichen) -stolzbin-
Da mir nicht bekannt ist, welche Daten Du per wget und post holen willst,
kann ich nicht garantieren, ob diese Methode bei Dir funktioniert,
aber ich denke ein Versuch wäre es wert...
...nichts für ungut.
Gruß musicus