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 Mensajes
Páginas: 1 ... 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 ... 235
441  Foros Generales / Noticias / Re: Secuestran más de 400.000 routers en todo el mundo para minar criptomonedas en: 5 Diciembre 2018, 02:38 am
Pero segun tengo entendido la factura de luz de los routers se va a pagar esten o no esten minando croiptos..

Asi que realmente no deberia de exister queja, lo malo es cuando usan los routers para realizar DDoS, ahi si no se puede hacer nada por que son perdidadas economicas.

Saludos!
442  Programación / Programación C/C++ / Re: Problema entrada estándar en: 5 Diciembre 2018, 00:22 am
Si presionas ^D (Control D) en linux o ^Z en windows, generas un eof para la entrada estandar.

Interesante, si es cierto que cuand quiero salir de una terminal linux rapidamente presiono control D y para windows no me sabia lo del control z.

Sin embargo el OP trata de automatizar alguna tarea, que cuando envie texto mediante Echo al programa, este lo capture y lo procese, y cuando envié alguna cadena vacia, no se quede esperando el programa.

Saludos!
443  Programación / Programación C/C++ / Re: Problema entrada estándar en: 4 Diciembre 2018, 23:41 pm
Ya entendi, lo que quieres es que si hay algo en la entrada estandar lo procese, si no, simplemente termine.

te convendría revisar el siguiente tema ¿Queda algo en el Buffer de Entrada stdin? (Solucionado)



Asi no se puede hacer lo que dices con metodos estadar (Segun creo no se puede).

El punto esta en que la mayoria de las funciones tipo getchar, getc, fgets etc......  se quedan esperando entrada hasta que lea algo.

Yo intenten validar si habia algo en la entrada estandar mediante el uso de feof, pero resulta que para Stdin nunca es el FIN del archivo, como lo muestro en una de las replies el link que te pase. sin embargo no se si funcione para el metodo que muestras de echo .... o type. Voy a probarlo y te comento.

Saludos
444  Programación / Programación C/C++ / Re: Compilar C/C++ en Windows en: 4 Diciembre 2018, 22:14 pm
Yo utilizo Notepad++ y de compilador el Gcc de mingw

http://www.mingw.org/

Saludos
445  Programación / Programación C/C++ / Re: cambiar de nombre a un proceso en: 4 Diciembre 2018, 20:11 pm
He leido que con un execl cambiando el argumento argv[0] por "hijo" debería de funcionar pero no me funciona.


Código
  1. int execl(const char *path, const char *arg, ...);

Código:
The const char *arg and subsequent ellipses in the execl(), execlp(), and execle() functions can be thought of as arg0, arg1, ..., argn. 

Eso solo modifica los parametros que procesa el programa llamado mediante execl. normalemnte el argv[0] es el nombre del programa, pero eso solo cambia la forma en la que el programa se ve asi mismo, para el sistema operativo el proceso va seguir teniendo el nombre original.

Si quieres cambiar el nombre del proceso listado en el PS, tienes que "rootkitear" tu sistema operativo y controlar la forma en la que el PS actual afectandi directamente la informacion  que PS esta leyendo actualmente.


Saludos



446  Programación / Programación C/C++ / Re: Problema entrada estándar en: 4 Diciembre 2018, 19:16 pm
echo "123456" | ./programa

Eso es como si ejecutaras el programa y este pidera informacion
Código:
Ingrese el numero X: 
Entonces lo que le pasaste como 123456 mediante el Echo se ingresa en esa primera pregunta ya sea un scanf o un fgets o un cin

Ejemplo:

Código
  1. #include<stdio.h> //Funciones printf, fgets
  2. #include<string.h> //Funciones printf, fgets
  3.  
  4.  
  5. int main() {
  6. char temp[100];
  7. do {
  8. printf("> ");
  9. fgets(temp,100,stdin);
  10. printf("Escribio : %s",temp);
  11. }while(strncmp(temp,"exit",4));
  12. }
  13.  

entrada.txt
Código:
hola
esto es una pruba
de codigo al salir con
exit



Saludos
447  Foros Generales / Noticias / Hackean Quora? en: 4 Diciembre 2018, 03:05 am
Dear ......

We are writing to let you know that we recently discovered that some user data was compromised as a result of unauthorized access to our systems by a malicious third party. We are very sorry for any concern or inconvenience this may cause. We are working rapidly to investigate the situation further and take the appropriate steps to prevent such incidents in the future.

What Happened

On Friday we discovered that some user data was compromised by a third party who gained unauthorized access to our systems. We're still investigating the precise causes and in addition to the work being conducted by our internal security teams, we have retained a leading digital forensics and security firm to assist us. We have also notified law enforcement officials.

While the investigation is still ongoing, we have already taken steps to contain the incident, and our efforts to protect our users and prevent this type of incident from happening in the future are our top priority as a company.

What information was involved

The following information of yours may have been compromised:

    Account and user information, e.g. name, email, IP, user ID, encrypted password, user account settings, personalization data

    Public actions and content including drafts, e.g. questions, answers, comments, blog posts, upvotes

    Data imported from linked networks when authorized by you, e.g. contacts, demographic information, interests, access tokens (now invalidated)

Questions and answers that were written anonymously are not affected by this breach as we do not store the identities of people who post anonymous content.

What we are doing

While our investigation continues, we're taking additional steps to improve our security:

    We’re in the process of notifying users whose data has been compromised.
    Out of an abundance of caution, we are logging out all Quora users who may have been affected, and, if they use a password as their authentication method, we are invalidating their passwords.
    We believe we’ve identified the root cause and taken steps to address the issue, although our investigation is ongoing and we’ll continue to make security improvements.

We will continue to work both internally and with our outside experts to gain a full understanding of what happened and take any further action as needed.

What you can do

We’ve included more detailed information about more specific questions you may have in our help center, which you can find here.

While the passwords were encrypted (hashed with a salt that varies for each user), it is generally a best practice not to reuse the same password across multiple services, and we recommend that people change their passwords if they are doing so.

Conclusion

It is our responsibility to make sure things like this don’t happen, and we failed to meet that responsibility. We recognize that in order to maintain user trust, we need to work very hard to make sure this does not happen again. There’s little hope of sharing and growing the world’s knowledge if those doing so cannot feel safe and secure, and cannot trust that their information will remain private. We are continuing to work very hard to remedy the situation, and we hope over time to prove that we are worthy of your trust.

The Quora Team
448  Programación / Programación C/C++ / Re: POO en: 4 Diciembre 2018, 02:15 am
Menos mal que programo en C# 😂😂😂

El comentario no viene al caso. Favor de no hacer SPAM,

Esto
Código
  1. (const racional &R
Me marié, ya no se que hace este metodo, no se que objeto es el que modifica

El metodo toma los valores de la variable uno, le hace la operacion de potencia con 3 y lo guarda en la variable tres que es la que terminas imprimiendo en pantalla.
449  Programación / Programación C/C++ / Re: POO en: 4 Diciembre 2018, 01:01 am
A mi hay cositas que no me convence como el metodo potencia de la clase racional

Para iniciar esta bien, pero que no te convence de la potencia?

Saludos!
450  Programación / Programación C/C++ / Re: Duda de compiladores en: 3 Diciembre 2018, 15:08 pm
Tal vez te salen mas warnings, algunos compiladores en IDE, son para gente apenas entiende  del tema y le omiten ciertos Warnings.

Yo prefiero utilizar el compilador desde la terminar asi gcc -o blabla.exe blabla.c

Tambien asegurata de estar utilizando el compilador adecuado gcc para archivos c y g++ para archivos cpp hay veces que ese es el problema.

Saludos!
Páginas: 1 ... 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 ... 235
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines