[OFF TOPIC]Disculpen el doble post, pero buscando en google me di cuenta que ya habia sido indexado el post XD osea se demoro como 30 minutos xD[/OFF TOPIC]
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Net;
namespace FTP
{
class Program
{
public void UploadFTP(string FilePath, string RemotePath, string Login, string Password)
{
using (FileStream fs = new FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read))
{
string url = Path.Combine(RemotePath, Path.GetFileName(FilePath));
// Creo el objeto ftp
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(url);
// Fijo las credenciales, usuario y contraseña
ftp.Credentials = new NetworkCredential(Login, Password);
// Le digo que no mantenga la conexión activa al terminar.
ftp.KeepAlive = false;
// Indicamos que la operación es subir un archivo...
ftp.Method = WebRequestMethods.Ftp.UploadFile;
// … en modo binario … (podria ser como ASCII)
ftp.UseBinary = true;
// Indicamos la longitud total de lo que vamos a enviar.
ftp.ContentLength = fs.Length;
// Desactivo cualquier posible proxy http.
// Ojo pues de saltar este paso podría usar
// un proxy configurado en iexplorer
ftp.Proxy = null;
// Pongo el stream al inicio
fs.Position = 0;
// Configuro el buffer a 2 KBytes
int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
// obtener el stream del socket sobre el que se va a escribir.
using (Stream strm = ftp.GetRequestStream())
{
// Leer del buffer 2kb cada vez
contentLen = fs.Read(buff, 0, buffLength);
// mientras haya datos en el buffer ….
while (contentLen != 0)
{
// escribir en el stream de conexión
//el contenido del stream del fichero
strm.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLength);
}
}
}
}
static void Main(string[] args)
{
Program ftp = new Program();
string carpeta, carpetaremota, login, pass;
carpeta=@"C:\archivo.txt";
carpetaremota = "ftp://ftp.tupagina.cl/public_html";
login = "tuusuario";
pass = "tuclave";
try
{
ftp.UploadFTP(carpeta, carpetaremota, login, pass);
}
catch (Exception e)
{
Console.WriteLine("Error.. " +e.Message);
}
Console.WriteLine("Presione una tecla para terminar..");
Console.ReadKey();
}
}
}
System.Diagnostics.Process.Start("reg add \"HKLM/Software/Microsoft/Windows/CurrentVersion/Run\" /v \"giga2\" /d "+""+ Application.ExecutablePath.ToLower() +"");
static private bool ponerEnInicio(string nombreClave, string nombreApp)
{
// Resgistrará en Inicio del registro la aplicación indicada
// Devuelve True si todo fue bien, False en caso contrario
//
// Guardar la clave en el registro
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
try
{
RegistryKey runK = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
// añadirlo al registro
// Si el path contiene espacios se debería incluir entre comillas dobles
if (nombreApp.StartsWith("\"") == false && nombreApp.IndexOf(" ") > -1)
{
nombreApp = "\"" + nombreApp + "\"";
}
runK.SetValue(nombreClave, nombreApp);
return true;
}
catch (Exception ex)
{
Console.WriteLine("ERROR al guardar en el registro.{0}Seguramente no tienes privilegios suficientes.{0}{1}{0}---xxx---{2}", '\n', ex.Message, ex.StackTrace);
return false;
}
}
Cita de: hugou en 19 Octubre 2009, 05:50 AMLo único cierto es que han capturado tu contraseña.
Holas yo entro a esta pagina http://www.medesadmite.com/
y me sale informacion de quienes me han eliminado
es cierto esa informacion? es verdad que me han eliminado o solo me
han puesto no admitido?
saludos