Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Ich habe mal wieder ein Problem.

Ich habe hier ein perl-script, dass mir von einem ftp-server eine exe-Datei holen soll, was auch soweit super funktioniert.

Das Verzeichnis, in das die Datei gespeichert wird, ist über Samba freigegeben, was soweit auch funktioniert.

Nun das problem:

Wenn ich die Datei ausführen will geht nur eine MSDOS-Konsole auf und das wars.

Lade ich die Datei hingegen von Hand runter und schiebe sie dann in das Samba-Verzeichnis funktioniert das Ausführen einwandfrei und der erwartete Installer geht auf.

Dabei ist mir aufgefallen, dass die manuell heruntergeladene Datei und die Datei, die das script geladen hat, eine unterschiedliche Größe aufweisen. Der Unterschied ist rund 200Byte. Außerdem fehlt bei der Datei vom Script das Icon der Exe-Datei.

Wo dieser Unterschied herkommt ist mir zur Zeit noch ein Rätsel. Hier sind mal die relvanten Teile des perl-scripts:


.....

#Verbindung zum FTP-Server aufbauen.
$ftp = Net::FTP->new($ftpsrv) or &error("Could not connect to $ftpsrv\n");

$ftp->login($ftpusr, $ftppswd) or &error("Login data invalid\n");

$ftp->cwd($ftpsubdir) or &error("Could not find $ftpsubdir on $ftpsrv\n");

@dirlist = $ftp->ls($ftp->pwd);

$filename = "none";
foreach $file (@dirlist) {
#excepting the filename out of the listing
$file =~ /^(.*)(\/|\\)(.*)$/;
$tempname = $3;

if ($tempname =~ /$regex/i) {
$filename = $tempname;
break;
}
}

if ($filename eq "none") {$ftp->quit; &error("There was no file that matches the given regular expression.\n");}

##Die passende Datei auf dem Server ist gefunden. Wenn nun eine lokale Datei existier, dann muss ?berpr?ft werden, ob
##ein update ?berhaupt notwendig ist.
if ($ftp->mdtm($filename) < $lcdate) {
#No update is needed;
print "No Update needed\n";
exit(0);
}

print "Getting File....Be patient, please.\nIf it tooks too long to get the
data, you have to invest in your Internet Connection \n";
if (!$ftp->get($filename, ($destdir."/".$filename."_parted"))) {
$ftp->quit;
&error("Filetransfer failed!\n");
}

$ftp->quit;

rename (($destdir."/".$filename."_parted"), ($destdir."/".$filename));

.....
[/PHP]

P.S: ich weiß selber, dass das perl-script nicht gehen würde, wenn ich, wie man es sollte, "use strict;" am anfang hinklatschen würde, aber ich bin ja auch noch kein perl-freak und daher seh ich das persönlich noch nicht so "strict" :D

THX

oh man wie *autsch*.

darüber macht man sich mit nem Webbrowser natürlich keine Gedanken. Man sollte wieder mehr mit Telnet arbeiten :D

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.