elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


  Mostrar Temas
Páginas: 1 2 [3]
21  Sistemas Operativos / GNU/Linux / sslstrip ImportError: No module named twisted.web en: 18 Julio 2010, 17:26 pm
Cuando trato de ejecutar SSLstrip (0.7) en terminal me sale este mensaje:

sudo sslstrip
Traceback (most recent call last):
File "/usr/bin/sslstrip", line 27, in
from twisted.web import http
ImportError: No module named twisted.web

 :-\
22  Programación / Programación C/C++ / Duda en compilación en: 1 Mayo 2010, 19:43 pm
Me atore y no se x que y creo que todo esta bien declarado y el archivo.txt se encuentra dentro de la carpeta donde guarde mi proyecto

Errores:
26 `FuncionVulnerable' undeclared (first use this function)
39 invalid conversion from `char' to `const char*'
39 initializing argument 1 of `FILE* fopen(const char*, const char*)'
56`int FuncionVulnerable(char*)' used prior to declaration


Código
  1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. /* declaramos la funcion que usaremos para leer el fichero*/
  7.  
  8. int LeerFichero(char*, char*, int);
  9.  
  10.  
  11. int main()
  12.  
  13. {
  14.  
  15. /* esta es la funcion principal en la que declaramos una variable de tipo char que
  16. contendra el string recogido desde "archivo.txt"*/
  17.  
  18.        char buffer[1000];
  19.        char nombre[]="archivo.txt";
  20.  
  21. /* tras declarar las variables llamamos a la funcion leer fichero() que metera en la
  22. variable buffer el contenido del archivo.txt, luego llamaremos a la funcion vulnerable
  23. para que copie el contenido de este a una variable de buffer de menor tamaño que esta */
  24.  
  25.        LeerFichero(buffer,nombre,1000);
  26.        FuncionVulnerable(buffer);
  27.        system("pause");
  28.        return 0;
  29. }
  30.  
  31. /* la funcion leer fichero, abre el fichero, lo lee y lo guarda en la variable buffer */
  32.  
  33. int LeerFichero(char*Fbuffer, char Fnombre, int Limite)
  34. {
  35.        int c;
  36.        int n=0;
  37.  
  38.        FILE *f;
  39.        f=fopen(Fnombre,"r");
  40.        while ((c=getc(f))!=EOF)
  41.        {
  42.                if(n<Limite)
  43.                {Fbuffer[n++]=c;}
  44.        }
  45.        Fbuffer[n++]=0;
  46.        fclose(f);
  47.        return 0;
  48. }
  49.  
  50. /* funcion vulnerable. Esta funcion es lo importante de este codigo, en esta función
  51. recibimos el puntero donde se encuentra la variable que contiene el texto introducido
  52. en archivo.txt. La funcion copiara el contenido de esta variable a una variable de tipo char
  53. de un tamaño inferior a la variable buffer. seguidamente mostrara el contenido de esta.*/
  54.  
  55. int FuncionVulnerable(char *cptr)
  56. {
  57.        char buff[300]= "Datos";
  58.        strcpy(buff,cptr);
  59.        printf("%s\n\n",buff);
  60.        return 0;
  61. }
  62.  
  63.  
  64. /* Funcion Oculta. Ninguna de las otras funciones anteriares llama a esta */
  65.  
  66. int FuncionOculta()
  67. {
  68.        printf("Este texto nunca deberia de mostrarse");
  69.        return 0;
  70. }
  71. /code]
  72.  
  73.  
23  Programación / Programación Visual Basic / Ayuda con Listview (evitar duplicados en lista de facturación) plis!!! en: 20 Septiembre 2009, 15:36 pm
 Es necesario consultar 3 campos en el listview para determinar que no esta repetido (material,medidaancho y medidalargo) si estos 3 son verdadero entonces que me mande un mensaje que ya esta en la lista

Private Sub cmdagregar_Click()
'validar que esten seleccionados los campos
If txtmaterial.Text = "" Then MsgBox " Seleccione el tipo de Material", vbInformation, "Aviso": Exit Sub
If Combo2.Text = "" Then MsgBox "Seleccione Medida de Largo", vbInformation, "Aviso": Exit Sub
If Combo3.Text = "" Then MsgBox "Seleccione la Cantidad a Imprimir", vbInformation, "Aviso": Exit Sub
If Combo1.Text = "" Then MsgBox "Desea Aplicar Descuento", vbInformation, "Aviso": Exit Sub
If txtentrega.Text = "" Then MsgBox "Seleccione Fecha de Entrega", vbInformation, "Aviso": Exit Sub
'validar que el producto no se encuentre ya en el detalle
Dim i As Long
Dim j As Long
With ListView1
    .View = lvwList
For i = 1 To .ListItems.Count
For j = i + 1 To .ListItems.Count
If .ListItems.item(i).ListItems.item(i).SubItems(1) And .ListItems.item(i).SubItems(2) = .ListItems.item(j) And _
                                                                 .ListItems.item(j).SubItems(1) And .ListItems.item(j).SubItems(2) Then
MsgBox "Esa Información ya existe en la lista de Facturación", vbInformation, "Aviso": Exit Sub
End If
If j = .ListItems.Count Then
Exit For
End If
Next

With RsTemporalFacturaPlotter
    .Requery
    .AddNew
    !material = txtmaterial.Text
    !medidaancho = CDbl(txtancho.Text)
    !medidalargo = CDbl(txtlargo.Text)
    !cantidad = txtcantidad.Text
    !descuento = CDbl(txtdescuento.Text)
    !importe = CDbl(txtimporte.Text)
    !semana = lblsemana.Caption
    !Hora = lblhora.Caption
    .Update
End With
agregar                     'llena el listview1 con los datos que meti
'calcular los totales
txtsubtotal.Text = Sumar    'suma toda la lista de precios del campo precio del listview1
txtiva.Text = txtsubtotal.Text * 0.1
txttotal.Text = txtsubtotal.Text + txtsubtotal.Text * 0.1
limpiar         'limpia todo el pedo
End Sub

Gracias por su atención
24  Programación / Programación Visual Basic / Duda con ListView en Visual Basic 6 en: 17 Septiembre 2009, 02:06 am
A la hora de guardar la lista en mi base de datos
With RsDetalleFacturaPlotter
    .Requery
    .AddNew
>  !material = ListView1.ListItems(1)
    !medidaancho = ListView1.ListItems(2)
    !medidalargo = ListView1.ListItems(2)
    !cantidad = ListView1.ListItems(4)
    !descuento = ListView1.ListItems(5)
    !importe = ListView1.ListItems(6)
    !fechadeentrega = ListView1.ListItems(7)
    .Update
End With
Me aparece un error que dice:
El indice está fuera de los limites
Si necesitan mas información porfavor preguntenme esque no me se explicar muy bien ya busque información y los ejemplos que encontré no son lo que yo necesito  -------------------------------------------:huh:--------------------------------------------
25  Programación / Bases de Datos / Duda en Sentencia SQL en Visual Basic 6 en: 21 Agosto 2009, 00:07 am
Lo que deseo es que cuando seleccione en el DTPiker inicial y el DTPfinal un rango de fechas me filtre las facturas creadas en esas fechas y me lo muestre en un List1

'------------------Module Sentence---------------------------------------------------
Sub main()
With Base   
    .CursorLocation = adUseClient
    .Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sistemaelangel.mdb;Persist Security Info=False"
    LoginForm.Show
End With
End Sub
'------------------Module Declare-----------------------------------------------------
Global Base As New ADODB.Connection

Global RsFactura As New ADODB.Recordset



------------------Código en el Form--------------------------------------------------
Sub llenalista1()
Dim sqllista1 As String
sqllista1 = "SELECT COUNT(fecha) as cantidad FROM TablaFactura AND  fecha BETWEEN #" & Format(DTPicker1, "mm/dd/yyyy") & "# AND #" & Format(DTPicker2, "mm/dd/yyyy") & "#"

List1.Clear
Do While Not TablaFactura.EOF
List1.AddItem TablaFactura.Fields("cantidad")
TablaFactura.MoveNext
Loop

End sub                                               :huh:
Páginas: 1 2 [3]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines