Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Fake Virus Shield AV
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";
static {
DEBUG = Boolean.parseBoolean("true");
}
}
package com.deviant.security.shield;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import com.deviant.security.shield.utility.NotificationHelper;
public class MainActivity extends ActionBarActivity {
public static final String PREFS_NAME = "ShieldPrefs";
public boolean isEnabled;
private Menu menu;
SharedPreferences settings;
public MainActivity() {
this.isEnabled = false;
}
private void toggleShield() {
ImageView enableButton = (ImageView) findViewById(R.id.enableButton);
boolean isEnabled = this.settings.getBoolean("isEnabled", false);
Editor editor = this.settings.edit();
MenuItem status = this.menu.findItem(R.id.action_status);
if (isEnabled) {
editor.putBoolean("isEnabled", false);
status.setTitle(R.string.action_status_disabled);
enableButton.setImageResource(R.drawable.shield_disabled);
} else {
editor.putBoolean("isEnabled", true);
status.setTitle(R.string.action_status_enabled);
enableButton.setImageResource(R.drawable.shield_enabled);
}
editor.commit();
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.settings = getSharedPreferences(PREFS_NAME, 0);
setContentView(R.layout.activity_main);
ImageView enableButton = (ImageView) findViewById(R.id.enableButton);
if (this.settings.getBoolean("isEnabled", false)) {
enableButton.setImageResource(R.drawable.shield_enabled);
} else {
enableButton.setImageResource(R.drawable.shield_disabled);
}
enableButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
MainActivity.this.toggleShield();
}
});
new NotificationHelper(getApplicationContext()).createNotification();
}
public boolean onCreateOptionsMenu(Menu menu) {
this.menu = menu;
getMenuInflater().inflate(R.menu.main, menu);
boolean isEnabled = this.settings.getBoolean("isEnabled", false);
MenuItem status = menu.findItem(R.id.action_status);
if (isEnabled) {
status.setTitle(R.string.action_status_enabled);
} else {
status.setTitle(R.string.action_status_disabled);
}
return true;
}
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == 2131165246) {
return true;
} else {
if (id == 2131165245) {
toggleShield();
}
return super.onOptionsItemSelected(item);
}
}
}
package com.deviant.security.shield.utility;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat.Builder;
import com.deviant.security.shield.R;
public class NotificationHelper {
private int NOTIFICATION_ID;
private Builder mBuilder;
private PendingIntent mContentIntent;
private CharSequence mContentTitle;
private Context mContext;
private Notification mNotification;
private NotificationManager mNotificationManager;
public NotificationHelper(Context context) {
this.NOTIFICATION_ID = 1;
this.mContext = context;
}
public void createNotification() {
this.mNotificationManager = (NotificationManager) this.mContext.getSystemService("notification");
this.mBuilder = new Builder(this.mContext);
this.mBuilder.setContentTitle("Scan in progress").setContentText("Scanning for malicious content").setSmallIcon(R.drawable.shield_notification);
this.mBuilder.setContentInfo("0%");
this.mContentIntent = PendingIntent.getActivity(this.mContext, 0, new Intent(), 0);
this.mBuilder.setContentIntent(this.mContentIntent);
new Thread(new Runnable() {
public void run() {
int incr = 0;
while (incr <= 100) {
NotificationHelper.this.mBuilder.setContentInfo(incr + "%");
NotificationHelper.this.mBuilder.setProgress(100, incr, false);
NotificationHelper.this.mNotificationManager.notify(NotificationHelper.this.NOTIFICATION_ID, NotificationHelper.this.mBuilder.build());
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
incr++;
}
NotificationHelper.this.mBuilder.setContentTitle("Scan complete");
NotificationHelper.this.mBuilder.setContentText("Your device is secure");
NotificationHelper.this.mBuilder.setProgress(0, 0, false);
NotificationHelper.this.mNotificationManager.notify(NotificationHelper.this.NOTIFICATION_ID, NotificationHelper.this.mBuilder.build());
}
}).start();
}
}
package com.deviant.security.shield;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ToggleButton;
public class Settings extends ActionBarActivity {
public static final String PREFS_NAME = "ShieldPrefs";
SharedPreferences settings;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.settings = getSharedPreferences(PREFS_NAME, 0);
setContentView(R.layout.activity_settings);
ToggleButton toggle1 = (ToggleButton) findViewById(R.id.toggle1);
if (this.settings.getBoolean("realtime", false)) {
toggle1.setChecked(true);
} else {
toggle1.setChecked(false);
}
ToggleButton toggle2 = (ToggleButton) findViewById(R.id.toggle2);
if (this.settings.getBoolean("scanning", false)) {
toggle2.setChecked(true);
return;
} else {
toggle2.setChecked(false);
}
}
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.settings, menu);
return true;
}
public boolean onOptionsItemSelected(MenuItem item) {
return item.getItemId() == 2131165250 ? true : super.onOptionsItemSelected(item);
}
public void toggleRealtime(View view) {
Editor editor = this.settings.edit();
ToggleButton toggle = (ToggleButton) findViewById(R.id.toggle1);
if (this.settings.getBoolean("realtime", false)) {
editor.putBoolean("realtime", false);
toggle.setChecked(false);
} else {
editor.putBoolean("realtime", true);
toggle.setChecked(true);
}
editor.commit();
}
public void toggleScanning(View view) {
Editor editor = this.settings.edit();
ToggleButton toggle = (ToggleButton) findViewById(R.id.toggle2);
if (this.settings.getBoolean("scanning", false)) {
editor.putBoolean("scanning", false);
toggle.setChecked(false);
} else {
editor.putBoolean("scanning", true);
toggle.setChecked(true);
}
editor.commit();
}
}
@AlexBorsody

This comment has been minimized.

Show comment Hide comment
@AlexBorsody

AlexBorsody Apr 7, 2014

wtf

wtf

@AlekseyKorzun

This comment has been minimized.

Show comment Hide comment
@AlekseyKorzun

AlekseyKorzun Apr 7, 2014

Is this source code for Doom 3?

Is this source code for Doom 3?

@freeall

This comment has been minimized.

Show comment Hide comment
@freeall

freeall Apr 7, 2014

Well, that's an overdesigned toggle of one image if ever there was one.

freeall commented Apr 7, 2014

Well, that's an overdesigned toggle of one image if ever there was one.

@connorkuehl

This comment has been minimized.

Show comment Hide comment
@connorkuehl

connorkuehl Apr 7, 2014

This reminds me of the "Enterprise Fizzbuzz" written in Java on /r/shittyprogramming

This reminds me of the "Enterprise Fizzbuzz" written in Java on /r/shittyprogramming

@scriptingsoul

This comment has been minimized.

Show comment Hide comment
@scriptingsoul

scriptingsoul Apr 8, 2014

Wow. That's a lot of money for such crap!

Wow. That's a lot of money for such crap!

@aaronbuchanan

This comment has been minimized.

Show comment Hide comment
@aaronbuchanan

aaronbuchanan Apr 8, 2014

How impressively disappointing.

How impressively disappointing.

@real-napster

This comment has been minimized.

Show comment Hide comment
@real-napster

real-napster Apr 8, 2014

Thats why im not Android User... Crap!

Thats why im not Android User... Crap!

@skalski

This comment has been minimized.

Show comment Hide comment
@skalski

skalski Apr 8, 2014

Why i'm try to work so hard for money... the only thing i must do, is to toggle an image file...

skalski commented Apr 8, 2014

Why i'm try to work so hard for money... the only thing i must do, is to toggle an image file...

@frog357

This comment has been minimized.

Show comment Hide comment
@frog357

frog357 Apr 8, 2014

Hahaha that serves them right, they kicked me and many others off their crappy market for absolutely nothing. I am personally happy to see them get a black eye like this.

frog357 commented Apr 8, 2014

Hahaha that serves them right, they kicked me and many others off their crappy market for absolutely nothing. I am personally happy to see them get a black eye like this.

@flying-sheep

This comment has been minimized.

Show comment Hide comment
@flying-sheep

flying-sheep Apr 8, 2014

@real-napster: because there are shitty apps available? but if you conseqiently hate apple’s app store and microsoft’s store as well because of the assload of shitty apps there, what do you use?

and what this really points out: fuck antivirus software.

@real-napster: because there are shitty apps available? but if you conseqiently hate apple’s app store and microsoft’s store as well because of the assload of shitty apps there, what do you use?

and what this really points out: fuck antivirus software.

@wwin3286tw

This comment has been minimized.

Show comment Hide comment
@wwin3286tw

wwin3286tw Apr 8, 2014

This is a part code of android malware
A fake android anti-virus.

Paste by Android Police
中文>
Virus Shield是由名為Deviant Solutions開發的軟體,宣稱可以防止系統被安裝有害程式、確保個人資訊、即時掃瞄應用、設定及多媒體檔案,還能提升電話效能。它甚至宣稱對電池壽命影響極微、可於背景運作,又能封鎖廣告軟體。

不過Android Police指出,經過程式碼解析發現,其實Virus Shield是100%的詐欺軟體,完全不具備任何防護功能,使用者按下掃瞄鍵,它唯一的動作就是將應用中的「X」改成打勾的符號。Android Police並追蹤到Virus Shield的作者之前曾因在某線上論壇中詐騙線上遊戲寶物而被取消會員資格。Android Police並將該app的程式碼公布在Github上以供證明。

This is a part code of android malware
A fake android anti-virus.

Paste by Android Police
中文>
Virus Shield是由名為Deviant Solutions開發的軟體,宣稱可以防止系統被安裝有害程式、確保個人資訊、即時掃瞄應用、設定及多媒體檔案,還能提升電話效能。它甚至宣稱對電池壽命影響極微、可於背景運作,又能封鎖廣告軟體。

不過Android Police指出,經過程式碼解析發現,其實Virus Shield是100%的詐欺軟體,完全不具備任何防護功能,使用者按下掃瞄鍵,它唯一的動作就是將應用中的「X」改成打勾的符號。Android Police並追蹤到Virus Shield的作者之前曾因在某線上論壇中詐騙線上遊戲寶物而被取消會員資格。Android Police並將該app的程式碼公布在Github上以供證明。

@alextsil

This comment has been minimized.

Show comment Hide comment
@alextsil

alextsil Apr 8, 2014

"Your device is secure" - Just like that you receive 5star ratings.

alextsil commented Apr 8, 2014

"Your device is secure" - Just like that you receive 5star ratings.

@LoveDuckie

This comment has been minimized.

Show comment Hide comment
@LoveDuckie

LoveDuckie Apr 8, 2014

hah

hah

@tuky

This comment has been minimized.

Show comment Hide comment
@tuky

tuky Apr 8, 2014

Reminds me of Lisa's tiger repelling rock™.

tuky commented Apr 8, 2014

Reminds me of Lisa's tiger repelling rock™.

@ncbateman

This comment has been minimized.

Show comment Hide comment
@ncbateman

ncbateman Apr 8, 2014

users XD

users XD

@timbunch

This comment has been minimized.

Show comment Hide comment
@timbunch

timbunch Apr 8, 2014

That is hilariously sad. I think I need to create an app that does nothing for half the cost. And I would promise to not do anything. Just an icon that launches an on/off toggle screen.

timbunch commented Apr 8, 2014

That is hilariously sad. I think I need to create an app that does nothing for half the cost. And I would promise to not do anything. Just an icon that launches an on/off toggle screen.

@willmorgan

This comment has been minimized.

Show comment Hide comment
@willmorgan

willmorgan Apr 8, 2014

That's a lot of code to do a bunch of sweet fuck all!

That's a lot of code to do a bunch of sweet fuck all!

@Streusel

This comment has been minimized.

Show comment Hide comment
@Streusel

Streusel Apr 8, 2014

woah, so fast!

Streusel commented Apr 8, 2014

woah, so fast!

@danielschulz

This comment has been minimized.

Show comment Hide comment
@danielschulz

danielschulz Apr 8, 2014

This app is more useless than red traffic lights in GTA.

This app is more useless than red traffic lights in GTA.

@danielschulz

This comment has been minimized.

Show comment Hide comment
@danielschulz

danielschulz Apr 8, 2014

What kind of people do star this 'project'? 24 and counting...

What kind of people do star this 'project'? 24 and counting...

@chankeypathak

This comment has been minimized.

Show comment Hide comment
@chankeypathak

chankeypathak Apr 8, 2014

such crap, much money, play store, wow!

such crap, much money, play store, wow!

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Apr 8, 2014

People who bought that app must be mad

ghost commented Apr 8, 2014

People who bought that app must be mad

@chymz

This comment has been minimized.

Show comment Hide comment
@chymz

chymz Apr 8, 2014

Changelog

1.0 : One image
2.0 : Two images
2.2 : Can toggle images !

chymz commented Apr 8, 2014

Changelog

1.0 : One image
2.0 : Two images
2.2 : Can toggle images !

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Apr 8, 2014

So true @AlekseyKorzun

ghost commented Apr 8, 2014

So true @AlekseyKorzun

@fnatalucci

This comment has been minimized.

Show comment Hide comment
@fnatalucci

fnatalucci Apr 8, 2014

Amazing app! Your life can change after toggle a button..

Amazing app! Your life can change after toggle a button..

@xSplit

This comment has been minimized.

Show comment Hide comment
@xSplit

xSplit Apr 8, 2014

it is hilarious

xSplit commented Apr 8, 2014

it is hilarious

@JGibson4

This comment has been minimized.

Show comment Hide comment
@JGibson4

JGibson4 Apr 8, 2014

LOL this my friends is classic...

JGibson4 commented Apr 8, 2014

LOL this my friends is classic...

@Dorian

This comment has been minimized.

Show comment Hide comment
@Dorian

Dorian Apr 8, 2014

Epic source code is epic!

Dorian commented Apr 8, 2014

Epic source code is epic!

@nickskull

This comment has been minimized.

Show comment Hide comment
@nickskull

nickskull Apr 9, 2014

That is like buying a ticket for this performance - https://www.youtube.com/watch?v=JTEFKFiXSx4

That is like buying a ticket for this performance - https://www.youtube.com/watch?v=JTEFKFiXSx4

@SharpMan

This comment has been minimized.

Show comment Hide comment
@SharpMan

SharpMan Apr 9, 2014

he will have to put random sleep between 1000 and 1200ms

SharpMan commented Apr 9, 2014

he will have to put random sleep between 1000 and 1200ms

@cydrobolt

This comment has been minimized.

Show comment Hide comment
@cydrobolt

cydrobolt Apr 10, 2014

Nice!

Nice!

@KOTRET

This comment has been minimized.

Show comment Hide comment
@KOTRET

KOTRET Apr 10, 2014

proof of concept - snake oil, nothing else. or do you think other anti-malware apps for android doing anything else? ;)

KOTRET commented Apr 10, 2014

proof of concept - snake oil, nothing else. or do you think other anti-malware apps for android doing anything else? ;)

@clarmso

This comment has been minimized.

Show comment Hide comment
@clarmso

clarmso Jul 25, 2014

Just sleep for 1000 seconds and say "your device is secure"! Nice!

clarmso commented Jul 25, 2014

Just sleep for 1000 seconds and say "your device is secure"! Nice!

@forxn

This comment has been minimized.

Show comment Hide comment
@forxn

forxn Oct 8, 2015

i can make available real source of any applications which running on android play stores if any body need any kind of apps source code can ping me or if you are new and want to start carrier in android then i have two choice for you

  1. i will tech all things online cost 500$ one time
    Features included
    a.how to crack any app running on play store
    b.how to get its original source code
    c.how to make new app with these real source code like,new name,new version,new look, all things new
    d.how to generated new apk file
    e.how to remove existing ads network from old app
    f.how to set new ad network
    g.how to make new and bulk google play developer account
    h. how to make aso discriptions for app
    i.how to upload app on android
    j.how to make free promotions for your android apps
    and lots more things
    you can learn all things within one week of time and be expart and can earn daily till 1000$
  2. i will provide you e-book with all above features ( one time cost 199$)

free gift compliments

i will provide you all tools and software for free

my skype: forxn.org
http://4xn.org

forxn commented Oct 8, 2015

i can make available real source of any applications which running on android play stores if any body need any kind of apps source code can ping me or if you are new and want to start carrier in android then i have two choice for you

  1. i will tech all things online cost 500$ one time
    Features included
    a.how to crack any app running on play store
    b.how to get its original source code
    c.how to make new app with these real source code like,new name,new version,new look, all things new
    d.how to generated new apk file
    e.how to remove existing ads network from old app
    f.how to set new ad network
    g.how to make new and bulk google play developer account
    h. how to make aso discriptions for app
    i.how to upload app on android
    j.how to make free promotions for your android apps
    and lots more things
    you can learn all things within one week of time and be expart and can earn daily till 1000$
  2. i will provide you e-book with all above features ( one time cost 199$)

free gift compliments

i will provide you all tools and software for free

my skype: forxn.org
http://4xn.org

@resh-re

This comment has been minimized.

Show comment Hide comment
@resh-re

resh-re Jan 7, 2016

does this code work in emulator??
i have got a project which is android malware detection im looking for it if any one can help me out with that plz...

resh-re commented Jan 7, 2016

does this code work in emulator??
i have got a project which is android malware detection im looking for it if any one can help me out with that plz...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment