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

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


+  Foro de elhacker.net
|-+  Sistemas Operativos
| |-+  GNU/Linux (Moderador: MinusFour)
| | |-+  enviar un mensaje a una ip determinada...
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: enviar un mensaje a una ip determinada...  (Leído 2,029 veces)
ceibe

Desconectado Desconectado

Mensajes: 131



Ver Perfil
enviar un mensaje a una ip determinada...
« en: 27 Febrero 2019, 17:18 pm »

Hola existe algun comando o script para mandar un mensaje a una ip fuera de tu red


En línea

animanegra

Desconectado Desconectado

Mensajes: 287



Ver Perfil
Re: enviar un mensaje a una ip determinada...
« Respuesta #1 en: 27 Febrero 2019, 17:36 pm »

¿Que quieres decir con mensaje? Si te refieres a envío de datos hacia una dirección IP el propio navegador ya lo hace. si en la URL pones http://IP/loquesea en realidad la otra IP esta recibiendo:

Código:
GET /loquesea HTTP/1.1
Host: IP
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1

Eso si, tiene que haber alguien escuchando, si no el handshake no se finaliza y no se envia nada.

Por ejemplo, con el programa nc (netcat) puedes poner un servidor en otro lado, y un cliente en tu ordenador, y puedes usarlo como si fuese un chat entre los dos ordenadores.


En línea


42
No contesto mensajes por privado, si tienes alguna pregunta, consulta o petición plantéala en el foro para que se aproveche toda la comunidad.
ceibe

Desconectado Desconectado

Mensajes: 131



Ver Perfil
Re: enviar un mensaje a una ip determinada...
« Respuesta #2 en: 28 Febrero 2019, 19:12 pm »

me refiero como en windows cuando utilizas el cmd  por terminal para enviar un mensaje a una ip determinada  de tu red ,ya que creo que fuera de tu dominio no va..

y este si se modifica ....

import os

def Menu():
   os.system("clear")
   print "---NetSend---"
   print "[1] Send message to a single computer"
   print "[2] Send message to multiple computers"
   print "[3] Send spam to a single computer"
   print "[4] Send spam to multiple computers"
   print "[5] view computers on network"
   
   try:
      option = int(raw_input("Option: "))

      if option == 1:
         get_mach("single", "one", "single_msg_one_mach")

      elif option == 2:
         get_mach("single", "multi", "single_msg_multi_mach")

      elif option == 3:
         get_mach("spam", "one", "spam_msg_one_mach")

      elif option == 4:
         get_mach("spam", "multi", "spam_msg_multi_mach")

      elif option == 5:
         view_comps_on_network()

      else:
         print "error testing..."
         pause = raw_input()
         exit()
         errors("menu_option_err")

   except ValueError:
      print "error testing..."
      pause = raw_input()
      exit()
      errors("menu_option_err")

def get_mach(msg_type, mach_type, net_send_type):
   if mach_type == "one":
      computer_name = raw_input("computer name or ip: ")

      if len(computer_name) == 0:
         #call error
         print "error testing..."
         pause = raw_input()
         exit()

      else:
         get_msg(msg_type, mach_type, net_send_type, computer_name)

   elif mach_type == "multi":
      computer_names = []

      try:
         print "enter the name or ip of the computes with a space between each one"
         print "for example: computer1 computer2 computer3\n"
         computer_names_str = raw_input("computer names: ")

         if len(computer_names_str) < 1:
            #calls errors
            print "error testing..."
            pause = raw_input()
            exit()

         else:
            computer_names = computer_names_str.split()
            get_msg(msg_type, mach_type, net_send_type, computer_names)

      except ValueError:
         #call errors
         print "error testing..."
         pause = raw_input()
         exit()

def get_msg(msg_type, mach_type, net_send_type, computerNames):
   message = raw_input("message: ")

   if len(message) == 0:
      #calls errors
      print "error testing..."
      pause = raw_input()
      exit()

   else:
      if msg_type == "single":
         net_send(net_send_type, computerNames, message, "NA")

      else:
         try:
            spam_count = int(raw_input("number of times to spam: "))

            if spam_count == 0:
               #calls errors
               print "error testing..."
               pause = raw_input()
               exit()

            else:
               net_send(net_send_type, computerNames, message, spam_count)

         except ValueError:
            #calls errors
            print "error testing..."
            pause = raw_input()
            exit()


def net_send(net_send_type, computerNames, message, spamCount):
   if net_send_type == "single_msg_one_mach":
      #send message to single machine
      #os.system("net send %s %s" % (computerNames, message))
      #os.system("PAUSE")
      #Menu()
      print "net send %s %s" % (computerNames, message)
      print "message sent to %s" % computerNames
      pause = raw_input("Press any key to continue...")
      Menu()

   elif net_send_type == "single_msg_multi_mach":
      numb_of_computers = len(computerNames)
      i = 0

      while i < numb_of_computers:
         #os.system("net send %s %s" % (computerNames, message))
         print "net send %s %s" % (computerNames, message)
         print "message sent to %s" % computerNames
         i += 1

      pause = raw_input("Press any key to continue...")
      Menu()

   elif net_send_type == "spam_msg_one_mach":
      print net_send_type
      print computerNames
      print message
      print spamCount

   elif net_send_type == "spam_msg_multi_mach":
      print net_send_type
      print computerNames
      print message
      print spamCount

   else:
      pass

def view_comps_on_network():
   #os.system("net view")
   #os.system("PAUSE")
   print "will use the 'net view' command to list computers on network"
   pause = raw_input()
   Menu()

def errors(error_type):
   print "test1"
   print "error testing..."

Menu()
« Última modificación: 28 Febrero 2019, 19:58 pm por ceibe » En línea

WHK
Moderador Global
***
Desconectado Desconectado

Mensajes: 6.589


Sin conocimiento no hay espíritu


Ver Perfil WWW
Re: enviar un mensaje a una ip determinada...
« Respuesta #3 en: 9 Marzo 2019, 03:29 am »

Para eso existe el comando "wall". Dale un vistazo acá:

https://www.tecmint.com/send-a-message-to-logged-users-in-linux-terminal/

Para enviar mensajes remotamente existe el servicio de correos, en linux cada usuario tiene por defecto un directorio para el recibimiento de correos por parte de la red local.

Saludos.
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Enviar mensaje a la consola « 1 2 »
.NET (C#, VB.NET, ASP)
CH4ØZ 18 10,491 Último mensaje 9 Agosto 2010, 05:15 am
por CH4ØZ
Enviar mensaje por ip
Hacking
Backdoor Joke 2 4,111 Último mensaje 14 Noviembre 2011, 08:27 am
por Backdoor Joke
Enviar mensaje a una IP, es posible?
Seguridad
gatocano 5 11,951 Último mensaje 17 Noviembre 2011, 16:45 pm
por gatocano
Enviar mensaje sockets
Programación C/C++
Stereo 0 2,269 Último mensaje 19 Noviembre 2011, 12:20 pm
por Stereo
Ayuda con enviar mensaje
Desarrollo Web
ime 6 3,011 Último mensaje 23 Mayo 2013, 06:42 am
por #!drvy
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines