> Let me see if I understand you correctly.
>
> You have a hosting provider that will only allow you to upload stuff
> through FTP. You want to hack past their restriction. Is that a correct
> way to put it?

First of all, no. You are completely wrong :) I am not a criminal and I
am not trying to violate or bend any rules, nor hack nor crack nor do
any evil (TM).

/legal disclaimer.

If you will agree to rephrase your question in more positive
and non-accusing language, I may be willing to agree :)

I *am* allowed to create symlinks, and view outside of my chroot, it is
just very inconvenient to have to write and upload a script when you
want to do something like

ls ..

in a dir that you cannot see from ftp

Below is my botch that I forgot to include last time.

RP


------- begin ssh-fakeoverftp.sh -------
#!/bin/bash

SERVER=nonsense.netzach.biz

# If uname and pwd are not specified as env variables then prompt for
them
if ! [ "$USER" ]; then
  read -p 'Enter Username: ' USER
  read -p 'Enter Password: ' PASSWD
fi

# Create a PHP file that we will upload each time
tmpfile=`tempfile`;
echo $tmpfile
mv $tmpfile $tmpfile.php
phpfile=$tmpfile.php
echo $phpfile
remfile=ssh-fakehostdime.php

CMD=""
WD=""

read -p "[EMAIL PROTECTED]:$WD\$ " CMD
until [[ "$CMD" == "exit" ]]; do
  echo "Executing command: $CMD"
  echo -e "<PRE>\n<?php\n" \
          "system(\"cd $WD; $CMD 2>&1\");\n" \
          "?>\n</PRE>" > "$phpfile"
  echo | lftp -e "cd public_html; put $phpfile -o $remfile" -u "$USER,$PASSWD" 
"$SERVER"
  lynx -dump "http://$SERVER/$remfile";
  read -p "[EMAIL PROTECTED]:$WD\$ " CMD
done

echo | lftp -e "cd public_html; rm $remfile" -u "$USER,$PASSWD" "$SERVER"


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to