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

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


  Mostrar Mensajes
Páginas: [1] 2 3
1  Programación / Bases de Datos / Update con clausala where id in () solo actualiza el primer valor del criterio en: 9 Mayo 2010, 18:55 pm
Hola a todos, pues resulta que tengo el siguiente problema, tengo un procedimiento almacenado:

Código
  1. DROP PROCEDURE IF EXISTS sp_actualiza_estado_control //
  2. CREATE PROCEDURE sp_actualiza_estado_control(control text)
  3. BEGIN
  4. UPDATE control SET estado='1' WHERE idcontrol IN (control);
  5. END //

Lo llamo asi:

Código
  1. CALL sp_actualiza_estado_control('1, 2, 3');

El problema es que solo considera el primer valor, es decir solo registro cuyo ID es 1.

Yo supongo que es porque la consulta queda asi:

Código
  1. UPDATE control SET estado='1' WHERE idcontrol IN (1,2,3);

Y deberia ser asi:

Código
  1. UPDATE control SET estado='1' WHERE idcontrol IN ('1,2,3');

Haber si alquien me hecha una mano.

Saludos.
2  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 6 Mayo 2010, 19:03 pm
Pues si .. en breve arreglo lo de las interfaces ... y si tengo salida a WAN =D

Gracias ...

 ;-) ;-) ;-)

En un par de dias podre poner mi web que ando haciendo .. haber que opinan y haber si sirve de guia a algunos ...  gracias nuevamente.
3  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 6 Mayo 2010, 16:20 pm
Funciono ... =D ...
4  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 6 Mayo 2010, 16:08 pm
Nada aun .. no pude hacer ping y tampoco pude pude logear con putty .... :| .. Creen que el problema pueda rapicar porque tengo dos tarjetas ? ..  aqui dejo una infor del ifconfig ( puede que quizas sirva de algo )

Citar
eth0      Link encap:Ethernet  HWaddr 00:24:1D:1E:5D:0B 
          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:757052061 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:251

eth1      Link encap:Ethernet  HWaddr 00:24:1D:1E:5C:FB 
          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::224:1dff:fe1e:5cfb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5454 errors:0 dropped:757053511 overruns:0 frame:0
          TX packets:4448 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6971551 (6.6 Mb)  TX bytes:444631 (434.2 Kb)
          Interrupt:250 Base address:0x6000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1324 (1.2 Kb)  TX bytes:1324 (1.2 Kb)

pan0      Link encap:Ethernet  HWaddr 06:92:A4:37:33:C2 
          inet6 addr: fe80::492:a4ff:fe37:33c2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:468 (468.0 b)

Les tendre informados.
5  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 3 Mayo 2010, 04:59 am
http://192.168.1.20:80

No carga

La carpeta web si existe.
6  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 3 Mayo 2010, 03:51 am
http://192.168.1.20:80

Citar
It' Works ¡¡¡

Desde otra pc de la LAN (con windows) ... ping 192.168.1.20

Tiempo de espera agotado.

Desde OpenSUSE a la pc con windows .. ping 192.168.1.47

Citar
PING 192.168.1.47 (192.168.1.47) 56(84) bytes of data.
From 192.168.1.20: icmp_seq=1 Destination Host Unreachable
From 192.168.1.20 icmp_seq=1 Destination Host Unreachable
From 192.168.1.20 icmp_seq=2 Destination Host Unreachable

Desde la PC con windows ... http://192.168.1.20/web

Citar
La pagina no se puede mostrar.

Cabe recalcar que he desactivado el firewall y aun asi nada ocurre. Tambien que la instalacion del Apache, mysql, php las hice cuando instale mi openSuse con el DVD .. mas no uno por uno.
7  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 3 Mayo 2010, 02:37 am
iptables   -F

No salio nada.

iptables -L


Citar
Chain INPUT (policy DROP)
target     prot opt source               destination        

Chain FORWARD (policy DROP)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        

Chain forward_ext (0 references)
target     prot opt source               destination        

Chain input_ext (0 references)
target     prot opt source               destination        

Chain reject_func (0 references)
target     prot opt source               destination

vim  /etc/hosts.deny

Comente # http-rman : ALL EXCEPT LOCAL ... se me fue el internet asi que tuve que reiniciar el network

service network restart
service apache2 restart

Todo bien ... pero sigo sin tener acceso desde LAN ni WAN .. ojo que lo que busco es activar para WAN. desde el mismo PC todo va bien.
8  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 3 Mayo 2010, 01:12 am
nmap  192.168.1.20
Citar
Starting Nmap 4.75 ( http://nmap.org ) at 2010-05-02 18:08 PET
Interesting ports on Cioouw (192.168.1.20):
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
111/tcp  open  rpcbind
3306/tcp open  mysql

Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds

nmap localhost

Citar
Starting Nmap 4.75 ( http://nmap.org ) at 2010-05-02 18:09 PET
Interesting ports on localhost (127.0.0.1):
Not shown: 994 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
80/tcp   open  http
111/tcp  open  rpcbind
631/tcp  open  ipp
3306/tcp open  mysql

Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds

iptables -L


Citar
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere            state ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere            state RELATED
input_ext  all  --  anywhere             anywhere           
input_ext  all  --  anywhere             anywhere           
input_ext  all  --  anywhere             anywhere           
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-IN-ILL-TARGET '
DROP       all  --  anywhere             anywhere           

Chain FORWARD (policy DROP)
target     prot opt source               destination         
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-FWD-ILL-ROUTING '

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere            state NEW,RELATED,ESTABLISHED
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-OUT-ERROR '

Chain forward_ext (0 references)
target     prot opt source               destination         

Chain input_ext (3 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            PKTTYPE = broadcast
ACCEPT     icmp --  anywhere             anywhere            icmp source-quench
ACCEPT     icmp --  anywhere             anywhere            icmp echo-request
LOG        tcp  --  anywhere             anywhere            limit: avg 3/min burst 5 tcp dpt:http flags:FIN,SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-TCP '
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
LOG        tcp  --  anywhere             anywhere            limit: avg 3/min burst 5 tcp dpt:https flags:FIN,SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-TCP '
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https
ACCEPT     udp  --  anywhere             anywhere            udp dpt:https
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 PKTTYPE = multicast LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
DROP       all  --  anywhere             anywhere            PKTTYPE = multicast
LOG        tcp  --  anywhere             anywhere            limit: avg 3/min burst 5 tcp flags:FIN,SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
LOG        icmp --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
LOG        udp  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 state INVALID LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT-INV '
DROP       all  --  anywhere             anywhere           

Chain reject_func (0 references)
target     prot opt source               destination         
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-proto-unreachable

cat /etc/hosts.deny

Citar
# /etc/hosts.deny
# See 'man tcpd' and 'man 5 hosts_access' as well as /etc/hosts.allow
# for a detailed description.

http-rman : ALL EXCEPT LOCAL

Haber si al final soluciono este problema.
Saludos y Gracias.
9  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 2 Mayo 2010, 06:41 am
MI ip es 192.168.1.20
El rango de ip es 192.168.1.2 - 192.168.1.254
La puerta de enlace es 192.168.1.1
EL firewall esta desactivado

Cuando dejo en Listen 80 solo tengo acceso desde la misma pc .. no LAN, no WAN. T_T
10  Programación / Desarrollo Web / Re: Ayuda con httpd.conf OpenSuse en: 1 Mayo 2010, 15:54 pm
Haber la ip de mi Opensuse es 192.168.1.20

Ahora con la configuracion:

- Cuando pongo 127.0.0.1:80 Tengo acceso desde la misma pc, pero no desde LAN ni WAN.
- Cuando pongo 192.168.1.20:80 no tengo acceso desde la misma pc, ni la LAN, ni WAN.
- Cuando pongo 80 solo tengo acceso desde mi pc, no LAN, no WAN

Ojo que reinicio el servicio con esta instruccion: service apache2 restart

Cabe decir que he abierto el puerto 80 de mi router con direccion a mi IP 192.168.1.20, el firewall esta asi (visto desde YAST):

Mi interfaz eth0 esta en la zona externa.
Servicios autorizados http y https

La config del HTTP esta asi (visto desde YAST):

- Servicio HTTP habilitado
- Puerto 80 desde todas las direcciones

Haber que opinan.
Páginas: [1] 2 3
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines