Code Intentation

master
msmannan00 2019-06-15 22:13:52 +05:00
parent 3a7f1f3896
commit 16c20006e7
69 changed files with 1301 additions and 1930 deletions

View File

@ -3,31 +3,12 @@
<JetCodeStyleSettings> <JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings> </JetCodeStyleSettings>
<Objective-C-extensions> <codeStyleSettings language="JAVA">
<file> <option name="BRACE_STYLE" value="2" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" /> <option name="CLASS_BRACE_STYLE" value="2" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" /> <option name="METHOD_BRACE_STYLE" value="2" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" /> <option name="LAMBDA_BRACE_STYLE" value="2" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" /> </codeStyleSettings>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
<codeStyleSettings language="kotlin"> <codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings> </codeStyleSettings>

4
.idea/encodings.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

View File

@ -3,6 +3,9 @@
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<compositeConfiguration>
<compositeBuild compositeDefinitionSource="SCRIPT" />
</compositeConfiguration>
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules"> <option name="modules">

View File

@ -8,6 +8,7 @@ ext {
geckoviewVersion = "64.0.20180927100037" geckoviewVersion = "64.0.20180927100037"
} }
repositories { repositories {
maven { maven {
url "https://maven.mozilla.org/maven2/" url "https://maven.mozilla.org/maven2/"
@ -48,19 +49,21 @@ android {
versionName "156" versionName "156"
dimension "abi" dimension "abi"
buildConfigField "String", "VARIANT", "\"arm\"" buildConfigField "String", "VARIANT", "\"arm\""
} }*/
aarch64 { aarch64 {
versionCode 157 versionCode 157
versionName "157" versionName "157"
dimension "abi" dimension "abi"
buildConfigField "String", "VARIANT", "\"aarch64\"" buildConfigField "String", "VARIANT", "\"aarch64\""
}*/ }
/*
x86 { x86 {
versionCode 158 versionCode 158
versionName "158" versionName "158"
dimension "abi" dimension "abi"
buildConfigField "String", "VARIANT", "\"i686\"" buildConfigField "String", "VARIANT", "\"i686\""
}/* }
x86_64 { x86_64 {
versionCode 159 versionCode 159
versionName "159" versionName "159"
@ -105,21 +108,26 @@ configurations.all {
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
implementation "cz.msebera.android:httpclient:4.4.1.2" implementation "cz.msebera.android:httpclient:4.4.1.2"
x86Implementation "org.mozilla.geckoview:geckoview-x86:67.0.20190521210220" //x86Implementation "org.mozilla.geckoview:geckoview-x86:67.0.20190521210220"
//x86_64Implementation "org.mozilla.geckoview:geckoview-x86_64:67.0.20190521210220" //x86_64Implementation "org.mozilla.geckoview:geckoview-x86_64:67.0.20190521210220"
//armImplementation "org.mozilla.geckoview:geckoview-armeabi-v7a:67.0.20190521210220" //armImplementation "org.mozilla.geckoview:geckoview-armeabi-v7a:67.0.20190521210220"
//aarch64Implementation "org.mozilla.geckoview:geckoview-arm64-v8a:67.0.20190521210220" aarch64Implementation "org.mozilla.geckoview:geckoview-arm64-v8a:67.0.20190521210220"
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9' implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0' implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0'
implementation 'com.github.jehy:Tor-Onion-Proxy-Library:0.0.7' implementation 'com.github.jehy:Tor-Onion-Proxy-Library:0.0.7'
implementation 'org.slf4j:slf4j-api:1.7.7' implementation 'org.slf4j:slf4j-api:1.7.7'
implementation 'org.slf4j:slf4j-android:1.7.7' implementation 'org.slf4j:slf4j-android:1.7.7'
implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:design:28.0.0'
implementation 'com.google.android.gms:play-services-ads:17.2.1'
implementation 'com.android.support:appcompat-v7:28.1.1'
implementation 'com.android.support:design:28.1.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true;
}
} }
apply plugin: 'com.android.application' apply plugin: 'com.android.application'

View File

@ -17,7 +17,7 @@
<uses-library <uses-library
android:name="org.apache.http.legacy" android:name="org.apache.http.legacy"
android:required="false" /> android:required="false" />
<activity android:name="com.darkweb.genesissearchengine.application_controller" <activity android:name="com.darkweb.genesissearchengine.appManager.application_controller"
android:screenOrientation="portrait" > android:screenOrientation="portrait" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
@ -27,7 +27,7 @@
</activity> </activity>
<meta-data <meta-data
android:name="io.fabric.ApiKey" android:name="io.fabric.ApiKey"
android:value="be76c64dae2519d4ab8daaed88298da14c7candroid:largeScreens294f" android:value="be76c64dae2519d4ab8daaed88298da14c7c294f"
/> />
<meta-data <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID" android:name="com.google.android.gms.ads.APPLICATION_ID"

View File

@ -1,42 +0,0 @@
package com.darkweb.genesissearchengine;
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public class KeyboardUtils {
public static void hideKeyboard(Activity activity) {
View view = activity.findViewById(android.R.id.content);
if (view != null) {
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}
public static void showKeyboard(Activity activity) {
InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
public static void addKeyboardVisibilityListener(View rootLayout, OnKeyboardVisibiltyListener onKeyboardVisibiltyListener) {
rootLayout.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
Rect r = new Rect();
rootLayout.getWindowVisibleDisplayFrame(r);
int screenHeight = rootLayout.getRootView().getHeight();
// r.bottom is the position above soft keypad or device button.
// if keypad is shown, the r.bottom is smaller than that before.
int keypadHeight = screenHeight - r.bottom;
boolean isVisible = keypadHeight > screenHeight * 0.15; // 0.15 ratio is perhaps enough to determine keypad height.
onKeyboardVisibiltyListener.onVisibilityChange(isVisible);
});
}
public interface OnKeyboardVisibiltyListener {
void onVisibilityChange(boolean isVisible);
}
}

View File

@ -1,313 +0,0 @@
package com.darkweb.genesissearchengine;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.net.Proxy;
import android.os.Build;
import android.os.Parcelable;
import android.util.Log;
import android.webkit.WebView;
import cz.msebera.android.httpclient.HttpHost;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.util.ArrayMap;
/**
* Code from http://stackoverflow.com/questions/4488338/webview-android-proxy
*/
public class WebkitProxy3 {
public static String LOG_TAG = "WebkitProxy3";
public static boolean setProxy(WebView webview, String host, int port, String applicationClassName) {
if (host == null)
return false;
// 3.2 (HC) or lower
if (Build.VERSION.SDK_INT <= 13) {
return setProxyUpToHC(webview, host, port);
}
// ICS: 4.0
else if (Build.VERSION.SDK_INT <= 15) {
return setProxyICS(webview, host, port);
}
// 4.1-4.3 (JB)
else if (Build.VERSION.SDK_INT <= 18) {
return setProxyJB(webview, host, port);
}
// 4.4 (KK) & 5.0 (Lollipop)
else {
return setProxyKKPlus(webview, host, port, applicationClassName);
}
}
/**
* Set Proxy for Android 3.2 and below.
*/
@SuppressWarnings("all")
private static boolean setProxyUpToHC(WebView webview, String host, int port) {
Log.d(LOG_TAG, "Setting proxy with <= 3.2 API.");
HttpHost proxyServer = new HttpHost(host, port);
// Getting network
Class networkClass = null;
Object network = null;
try {
networkClass = Class.forName("android.webkit.Network");
if (networkClass == null) {
Log.e(LOG_TAG, "failed to get class for android.webkit.Network");
return false;
}
Method getInstanceMethod = networkClass.getMethod("getInstance", Context.class);
if (getInstanceMethod == null) {
Log.e(LOG_TAG, "failed to get getInstance method");
}
network = getInstanceMethod.invoke(networkClass, new Object[]{webview.getContext()});
} catch (Exception ex) {
Log.e(LOG_TAG, "error getting network: " + ex);
return false;
}
if (network == null) {
Log.e(LOG_TAG, "error getting network: network is null");
return false;
}
Object requestQueue = null;
try {
Field requestQueueField = networkClass
.getDeclaredField("mRequestQueue");
requestQueue = getFieldValueSafely(requestQueueField, network);
} catch (Exception ex) {
Log.e(LOG_TAG, "error getting field value");
return false;
}
if (requestQueue == null) {
Log.e(LOG_TAG, "Request queue is null");
return false;
}
Field proxyHostField = null;
try {
Class requestQueueClass = Class.forName("android.net.http.RequestQueue");
proxyHostField = requestQueueClass
.getDeclaredField("mProxyHost");
} catch (Exception ex) {
Log.e(LOG_TAG, "error getting proxy host field");
return false;
}
boolean temp = proxyHostField.isAccessible();
try {
proxyHostField.setAccessible(true);
proxyHostField.set(requestQueue, proxyServer);
} catch (Exception ex) {
Log.e(LOG_TAG, "error setting proxy host");
} finally {
proxyHostField.setAccessible(temp);
}
Log.d(LOG_TAG, "Setting proxy with <= 3.2 API successful!");
return true;
}
@SuppressWarnings("all")
private static boolean setProxyICS(WebView webview, String host, int port) {
try
{
Log.d(LOG_TAG, "Setting proxy with 4.0 API.");
Class jwcjb = Class.forName("android.webkit.JWebCoreJavaBridge");
Class params[] = new Class[1];
params[0] = Class.forName("android.net.ProxyProperties");
Method updateProxyInstance = jwcjb.getDeclaredMethod("updateProxy", params);
Class wv = Class.forName("android.webkit.WebView");
Field mWebViewCoreField = wv.getDeclaredField("mWebViewCore");
Object mWebViewCoreFieldInstance = getFieldValueSafely(mWebViewCoreField, webview);
Class wvc = Class.forName("android.webkit.WebViewCore");
Field mBrowserFrameField = wvc.getDeclaredField("mBrowserFrame");
Object mBrowserFrame = getFieldValueSafely(mBrowserFrameField, mWebViewCoreFieldInstance);
Class bf = Class.forName("android.webkit.BrowserFrame");
Field sJavaBridgeField = bf.getDeclaredField("sJavaBridge");
Object sJavaBridge = getFieldValueSafely(sJavaBridgeField, mBrowserFrame);
Class ppclass = Class.forName("android.net.ProxyProperties");
Class pparams[] = new Class[3];
pparams[0] = String.class;
pparams[1] = int.class;
pparams[2] = String.class;
Constructor ppcont = ppclass.getConstructor(pparams);
updateProxyInstance.invoke(sJavaBridge, ppcont.newInstance(host, port, null));
Log.d(LOG_TAG, "Setting proxy with 4.0 API successful!");
return true;
}
catch (Exception ex)
{
Log.e(LOG_TAG, "failed to set HTTP proxy: " + ex);
return false;
}
}
/**
* Set Proxy for Android 4.1 - 4.3.
*/
@SuppressWarnings("all")
private static boolean setProxyJB(WebView webview, String host, int port) {
Log.d(LOG_TAG, "Setting proxy with 4.1 - 4.3 API.");
try {
Class wvcClass = Class.forName("android.webkit.WebViewClassic");
Class wvParams[] = new Class[1];
wvParams[0] = Class.forName("android.webkit.WebView");
Method fromWebView = wvcClass.getDeclaredMethod("fromWebView", wvParams);
Object webViewClassic = fromWebView.invoke(null, webview);
Class wv = Class.forName("android.webkit.WebViewClassic");
Field mWebViewCoreField = wv.getDeclaredField("mWebViewCore");
Object mWebViewCoreFieldInstance = getFieldValueSafely(mWebViewCoreField, webViewClassic);
Class wvc = Class.forName("android.webkit.WebViewCore");
Field mBrowserFrameField = wvc.getDeclaredField("mBrowserFrame");
Object mBrowserFrame = getFieldValueSafely(mBrowserFrameField, mWebViewCoreFieldInstance);
Class bf = Class.forName("android.webkit.BrowserFrame");
Field sJavaBridgeField = bf.getDeclaredField("sJavaBridge");
Object sJavaBridge = getFieldValueSafely(sJavaBridgeField, mBrowserFrame);
Class ppclass = Class.forName("android.net.ProxyProperties");
Class pparams[] = new Class[3];
pparams[0] = String.class;
pparams[1] = int.class;
pparams[2] = String.class;
Constructor ppcont = ppclass.getConstructor(pparams);
Class jwcjb = Class.forName("android.webkit.JWebCoreJavaBridge");
Class params[] = new Class[1];
params[0] = Class.forName("android.net.ProxyProperties");
Method updateProxyInstance = jwcjb.getDeclaredMethod("updateProxy", params);
updateProxyInstance.invoke(sJavaBridge, ppcont.newInstance(host, port, null));
} catch (Exception ex) {
Log.e(LOG_TAG,"Setting proxy with >= 4.1 API failed with error: " + ex.getMessage());
return false;
}
Log.d(LOG_TAG, "Setting proxy with 4.1 - 4.3 API successful!");
return true;
}
// from https://stackoverflow.com/questions/19979578/android-webview-set-proxy-programatically-kitkat
@SuppressLint("NewApi")
@SuppressWarnings("all")
private static boolean setProxyKKPlus(WebView webView, String host, int port, String applicationClassName) {
Log.d(LOG_TAG, "Setting proxy with >= 4.4 API.");
Context appContext = webView.getContext().getApplicationContext();
System.setProperty("http.proxyHost", host);
System.setProperty("http.proxyPort", port + "");
System.setProperty("https.proxyHost", host);
System.setProperty("https.proxyPort", port + "");
try {
Class applictionCls = Class.forName(applicationClassName);
Field loadedApkField = applictionCls.getField("mLoadedApk");
loadedApkField.setAccessible(true);
Object loadedApk = loadedApkField.get(appContext);
Class loadedApkCls = Class.forName("android.app.LoadedApk");
Field receiversField = loadedApkCls.getDeclaredField("mReceivers");
receiversField.setAccessible(true);
ArrayMap receivers = (ArrayMap) receiversField.get(loadedApk);
for (Object receiverMap : receivers.values()) {
for (Object rec : ((ArrayMap) receiverMap).keySet()) {
Class clazz = rec.getClass();
if (clazz != null && clazz.getName() != null && clazz.getName().contains("ProxyChangeListener")) {
Method onReceiveMethod = clazz.getDeclaredMethod("onReceive", Context.class, Intent.class);
if (onReceiveMethod == null)
continue;
Intent intent = new Intent(Proxy.PROXY_CHANGE_ACTION);
try {
/*********** optional, may be need in future *************/
String CLASS_NAME;
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
CLASS_NAME = "android.net.ProxyProperties";
} else {
CLASS_NAME = "android.net.ProxyInfo";
}
Class cls = Class.forName(CLASS_NAME);
Constructor constructor = cls.getConstructor(String.class, Integer.TYPE, String.class);
constructor.setAccessible(true);
Object proxyProperties = constructor.newInstance(host, port, null);
intent.putExtra("proxy", (Parcelable) proxyProperties);
/*********** optional, may be need in future *************/
} catch (Exception e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();
Log.v(LOG_TAG, e.getMessage());
Log.v(LOG_TAG, exceptionAsString);
}
onReceiveMethod.invoke(rec, appContext, intent);
}
}
}
Log.d(LOG_TAG, "Setting proxy with >= 4.4 API successful!");
return true;
} catch (ClassNotFoundException e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();
Log.v(LOG_TAG, e.getMessage());
Log.v(LOG_TAG, exceptionAsString);
} catch (NoSuchFieldException e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();
Log.v(LOG_TAG, e.getMessage());
Log.v(LOG_TAG, exceptionAsString);
} catch (IllegalAccessException e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();
Log.v(LOG_TAG, e.getMessage());
Log.v(LOG_TAG, exceptionAsString);
} catch (IllegalArgumentException e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();
Log.v(LOG_TAG, e.getMessage());
Log.v(LOG_TAG, exceptionAsString);
} catch (NoSuchMethodException e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();
Log.v(LOG_TAG, e.getMessage());
Log.v(LOG_TAG, exceptionAsString);
} catch (InvocationTargetException e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();
Log.v(LOG_TAG, e.getMessage());
Log.v(LOG_TAG, exceptionAsString);
}
return false;
}
private static Object getFieldValueSafely(Field field, Object classInstance) throws IllegalArgumentException, IllegalAccessException {
boolean oldAccessibleValue = field.isAccessible();
field.setAccessible(true);
Object result = field.get(classInstance);
field.setAccessible(oldAccessibleValue);
return result;
}
}

View File

@ -1,106 +0,0 @@
package com.darkweb.genesissearchengine;
import android.content.Context;
import android.util.Log;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
public class admanager {
private static final admanager ourInstance = new admanager();
public static admanager getInstance() {
return ourInstance;
}
private InterstitialAd mInterstitialAd;
int adCount = 0;
private admanager() {
}
public void initialize(Context applicationContext)
{
MobileAds.initialize(applicationContext, "ca-app-pub-5074525529134731~2926711128 ");
mInterstitialAd = new InterstitialAd(applicationContext);
mInterstitialAd.setAdUnitId("ca-app-pub-5074525529134731/8478420705");
implementListeners();
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
public void implementListeners()
{
mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
// Code to be executed when an ad finishes loading.
}
@Override
public void onAdFailedToLoad(int errorCode) {
}
@Override
public void onAdOpened() {
}
@Override
public void onAdLeftApplication() {
// Code to be executed when the user has left the app.
}
@Override
public void onAdClosed() {
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
});
}
public void showAd(boolean isAdForced)
{
Log.i("SHITSS","SHITSS 1" + " --- " + mInterstitialAd.isLoading() + " --- " + mInterstitialAd.isLoaded());
if(!mInterstitialAd.isLoading() && !mInterstitialAd.isLoaded())
{
Log.i("SHITSS","SHITSS 2");
mInterstitialAd.loadAd(new AdRequest.Builder().build());
if(isAdForced || adCount==0 || adCount%3==0)
{
Log.i("SHITSS","SHITSS 3");
adCount = 0;
}
else
{
Log.i("SHITSS","SHITSS 4");
adCount+=1;
}
}
else
{
Log.i("SHITSS","SHITSS 5");
if(mInterstitialAd.isLoaded())
{
Log.i("SHITSS","SHITSS 6");
if(isAdForced)
{
Log.i("SHITSS","SHITSS 7");
mInterstitialAd.show();
adCount = 1;
}
else
{
Log.i("SHITSS","SHITSS 8");
if(adCount%3==0)
{
Log.i("SHITSS","SHITSS 9");
mInterstitialAd.show();
}
adCount += 1;
}
}
}
}
}

View File

@ -0,0 +1,74 @@
package com.darkweb.genesissearchengine.appManager;
import android.content.Context;
public class app_model
{
/*Data Objects*/
private static String currentURL = "http://boogle.store/";
private static int port = 9150;
private boolean isLoadingURL = false;
private Context appContext;
private application_controller appInstance;
/*Initializations*/
private static final app_model ourInstance = new app_model();
public static app_model getInstance()
{
return ourInstance;
}
/*Getters Setters*/
public boolean getIsLoadingURL()
{
return isLoadingURL;
}
public void setIsLoadingURL(boolean status)
{
isLoadingURL = status;
}
public int getPort()
{
return port;
}
public void setPort(int port)
{
this.port = port;
}
public String getCurrentURL()
{
return currentURL;
}
public void setCurrentURL(String currentURL)
{
this.currentURL = currentURL;
}
public Context getAppContext()
{
return appContext;
}
public void setAppContext(Context appContext)
{
this.appContext = appContext;
}
public application_controller getAppInstance()
{
return appInstance;
}
public void setAppInstance(application_controller appInstance)
{
this.appInstance = appInstance;
}
}

View File

@ -0,0 +1,82 @@
package com.darkweb.genesissearchengine.appManager;
import android.support.constraint.ConstraintLayout;
import android.view.View;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.ProgressBar;
import com.darkweb.genesissearchengine.constants.constants;
public class applicationViewController
{
/*ViewControllers*/
private WebView webView1;
private WebView webView2;
private ProgressBar progressBar;
private EditText searchbar;
private ConstraintLayout splashScreen;
private ConstraintLayout requestFailure;
/*Initializations*/
private static final applicationViewController ourInstance = new applicationViewController();
public static applicationViewController getInstance()
{
return ourInstance;
}
private applicationViewController()
{
}
public void initialization(WebView webView1,WebView webView2,ProgressBar progressBar,EditText searchbar,ConstraintLayout splashScreen,ConstraintLayout requestFailure)
{
this.webView1 = webView1;
this.webView2 = webView2;
this.progressBar = progressBar;
this.searchbar = searchbar;
this.splashScreen = splashScreen;
this.requestFailure = requestFailure;
}
public void onRequestURL()
{
webView1.stopLoading();
webView2.stopLoading();
progressBar.setProgress(5);
progressBar.setVisibility(View.VISIBLE);
progressBar.animate().setDuration(150).alpha(1f);
}
/*Helper Methods*/
public void onInternetError()
{
splashScreen.animate().setStartDelay(2000).alpha(0);
progressBar.animate().alpha(0);
requestFailure.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(1f).setDuration(300);
}
public void loadUrlOnWebview(String html)
{
WebView webView = getCurrentView();
webView.bringToFront();
webView.loadDataWithBaseURL(app_model.getInstance().getCurrentURL(),html, "text/html", "utf-8", null);
}
public WebView getCurrentView()
{
WebView tempView;
if(webView1.getAlpha()==0)
{
tempView = webView1;
}
else
{
tempView = webView2;
}
return tempView;
}
}

View File

@ -1,9 +1,8 @@
package com.darkweb.genesissearchengine; package com.darkweb.genesissearchengine.appManager;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.Point; import android.graphics.Point;
@ -13,7 +12,6 @@ import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.support.constraint.ConstraintLayout; import android.support.constraint.ConstraintLayout;
import android.os.Bundle; import android.os.Bundle;
import android.support.constraint.ConstraintSet;
import android.support.design.widget.FloatingActionButton; import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.text.SpannableString; import android.text.SpannableString;
@ -24,12 +22,16 @@ import android.util.Log;
import android.util.Patterns; import android.util.Patterns;
import android.view.*; import android.view.*;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.RotateAnimation; import android.view.animation.RotateAnimation;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.webkit.*; import android.webkit.*;
import android.widget.*; import android.widget.*;
import com.crashlytics.android.Crashlytics; import com.crashlytics.android.Crashlytics;
import com.darkweb.genesissearchengine.*;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.httpManager.webRequestHandler;
import com.darkweb.genesissearchengine.pluginManager.*;
import com.example.myapplication.BuildConfig; import com.example.myapplication.BuildConfig;
import io.fabric.sdk.android.Fabric; import io.fabric.sdk.android.Fabric;
import java.io.IOException; import java.io.IOException;
@ -43,7 +45,6 @@ import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoView; import org.mozilla.geckoview.GeckoView;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static java.lang.Thread.sleep; import static java.lang.Thread.sleep;
public class application_controller extends AppCompatActivity public class application_controller extends AppCompatActivity
@ -52,14 +53,15 @@ public class application_controller extends AppCompatActivity
/*View Objects*/ /*View Objects*/
public WebView webView1; public WebView webView1;
public WebView webView2; public WebView webView2;
private GeckoView webLoader;
private ProgressBar progressBar; private ProgressBar progressBar;
private ConstraintLayout requestFailure; private ConstraintLayout requestFailure;
private ConstraintLayout splashScreen; private ConstraintLayout splashScreen;
private EditText searchbar;
private GeckoView webLoader;
private FloatingActionButton floatingButton; private FloatingActionButton floatingButton;
private Button reloadButton; private Button reloadButton;
private ImageButton homeButton; private ImageButton homeButton;
private EditText searchbar;
private LinearLayout topbar; private LinearLayout topbar;
private GeckoSession session1; private GeckoSession session1;
private GeckoRuntime runtime1; private GeckoRuntime runtime1;
@ -86,10 +88,14 @@ public class application_controller extends AppCompatActivity
setContentView(R.layout.application_view); setContentView(R.layout.application_view);
if(BuildConfig.FLAVOR.equals("aarch64")&&Build.SUPPORTED_ABIS[0].equals("arm64-v8a") || BuildConfig.FLAVOR.equals("arm")&&Build.SUPPORTED_ABIS[0].equals("armeabi-v7a") || BuildConfig.FLAVOR.equals("x86")&&Build.SUPPORTED_ABIS[0].equals("x86") || BuildConfig.FLAVOR.equals("x86_64")&&Build.SUPPORTED_ABIS[0].equals("x86_64")) if(BuildConfig.FLAVOR.equals("aarch64")&&Build.SUPPORTED_ABIS[0].equals("arm64-v8a") || BuildConfig.FLAVOR.equals("arm")&&Build.SUPPORTED_ABIS[0].equals("armeabi-v7a") || BuildConfig.FLAVOR.equals("x86")&&Build.SUPPORTED_ABIS[0].equals("x86") || BuildConfig.FLAVOR.equals("x86_64")&&Build.SUPPORTED_ABIS[0].equals("x86_64"))
{ {
initializeCrashlytics(); //initializeCrashlytics();
initializeBackgroundColor(); initializeBackgroundColor();
setContentView(R.layout.application_view); setContentView(R.layout.application_view);
orbot_manager.getInstance().initializeTorClient(this, webView1, webView2); app_model.getInstance().setAppContext(this);
app_model.getInstance().setAppInstance(this);
preference_manager.getInstance().initialize(this);
orbot_manager.getInstance().initializeTorClient();
initializeStatus(); initializeStatus();
initializeRunnable(); initializeRunnable();
initializeConnections(); initializeConnections();
@ -102,7 +108,7 @@ public class application_controller extends AppCompatActivity
else else
{ {
setContentView(R.layout.invalid_setup); setContentView(R.layout.invalid_setup);
message_manager.getInstance().abiError(this,Build.SUPPORTED_ABIS[0]); message_manager.getInstance().abiError(Build.SUPPORTED_ABIS[0]);
} }
} }
@ -188,33 +194,34 @@ public class application_controller extends AppCompatActivity
public void initializeBackgroundColor() public void initializeBackgroundColor()
{ {
/*
if (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.M){ if (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.M){
getWindow().setBackgroundDrawableResource(R.drawable.backgradientwhite); getWindow().setBackgroundDrawableResource(R.xml.splash_wall_white);
} else{ } else{
getWindow().setBackgroundDrawableResource(R.drawable.backgradientblack); getWindow().setBackgroundDrawableResource(R.xml.splash_wall_black);
} }*/
} }
public void initializeStatus() public void initializeStatus()
{ {
helperMethod.setPlaystoreStatus(this); //helperMethod.setPlaystoreStatus(this);
} }
public void initializeCrashlytics() public void initializeCrashlytics()
{ {
Fabric.with(this, new Crashlytics()); Fabric.with(this, new Crashlytics());
analyticmanager.getInstance().setDeviceID(this); analyticmanager.getInstance().initialize(this);
analyticmanager.getInstance().logUser(); analyticmanager.getInstance().logUser();
} }
public void versionChecker() public void versionChecker()
{ {
String version = preference_manager.getInstance().getString("version","none",this); /*String version = preference_manager.getInstance().getString("version","none",this);
if(!version.equals(version_code) && !version.equals("none")) if(!version.equals(version_code) && !version.equals("none"))
{ {
message_manager.getInstance().versionWarning(this,Build.SUPPORTED_ABIS[0]); message_manager.getInstance().versionWarning(this,Build.SUPPORTED_ABIS[0]);
} }
webRequestHandler.getInstance().getVersion(this); webRequestHandler.getInstance().getVersion(this);*/
} }
public void initializeRunnable() public void initializeRunnable()
@ -228,10 +235,9 @@ public class application_controller extends AppCompatActivity
if(!isBlackPage || startPage>1) if(!isBlackPage || startPage>1)
{ {
Log.i("PROBLEM24",""); Log.i("PROBLEM24","");
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));; Log.i("SHIT1 : ", app_model.getInstance().getCurrentURL());
Log.i("SHIT1 : ",status.currentURL); //app_model.getInstance().setIsLoadingURL(false);
datamodel.getInstance().setIsLoadingURL(false); message_manager.getInstance().baseURLError();
message_manager.getInstance().URLNotFoundError(application_controller.this);
} }
} }
}; };
@ -239,7 +245,7 @@ public class application_controller extends AppCompatActivity
public void initializeAds() public void initializeAds()
{ {
admanager.getInstance().initialize(this); admanager.getInstance().initialize();
} }
public void initializeConnections() public void initializeConnections()
@ -259,7 +265,7 @@ public class application_controller extends AppCompatActivity
public void initializeWebViews() public void initializeWebViews()
{ {
webRequestHandler.getInstance().initialization(webView1,webView2,progressBar,searchbar, splashScreen,this, requestFailure,this); applicationViewController.getInstance().initialization(webView1,webView2,progressBar,searchbar, splashScreen, requestFailure);
webView1.bringToFront(); webView1.bringToFront();
progressBar.animate().setDuration(150).alpha(0f); progressBar.animate().setDuration(150).alpha(0f);
@ -274,7 +280,7 @@ public class application_controller extends AppCompatActivity
session1.setProgressDelegate(new progressDelegate()); session1.setProgressDelegate(new progressDelegate());
webLoader.setVisibility(View.INVISIBLE); webLoader.setVisibility(View.INVISIBLE);
Drawable img = getResources().getDrawable( R.drawable.lock ); Drawable img = getResources().getDrawable( R.drawable.icon_lock);
searchbar.measure(0, 0); searchbar.measure(0, 0);
img.setBounds( 0, (int)(searchbar.getMeasuredHeight()*0.00), (int)(searchbar.getMeasuredHeight()*1.10), (int)(searchbar.getMeasuredHeight()*0.69) ); img.setBounds( 0, (int)(searchbar.getMeasuredHeight()*0.00), (int)(searchbar.getMeasuredHeight()*1.10), (int)(searchbar.getMeasuredHeight()*0.69) );
searchbar.setCompoundDrawables( img, null, null, null ); searchbar.setCompoundDrawables( img, null, null, null );
@ -298,17 +304,37 @@ public class application_controller extends AppCompatActivity
webView2.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); webView2.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webView2.animate().setDuration(0).alpha(0f); webView2.animate().setDuration(0).alpha(0f);
progressBar.setVisibility(View.INVISIBLE);
requestFailure.animate().setDuration(0).alpha(0.0f); requestFailure.animate().setDuration(0).alpha(0.0f);
progressBar.animate().setDuration(150).alpha(0f);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
loadURLAnimate(constants.backendUrl); loadURLAnimate(constants.backendUrl);
webView2.setAlpha(0);
webView1.setAlpha(0);
initializeViewClients(); initializeViewClients();
} }
private void initializeViewClients() private void initializeViewClients()
{ {
webView1.setWebChromeClient(new WebChromeClient(){
public void onProgressChanged(WebView view, int newProgress){
if(newProgress<95 && newProgress>5 && view.equals(applicationViewController.getInstance().getCurrentView()))
{
Log.i("SHIT","SHIT1 : " + newProgress);
progressBar.setProgress(newProgress);
}
}
});
webView2.setWebChromeClient(new WebChromeClient(){
public void onProgressChanged(WebView view, int newProgress){
if(newProgress<95 && newProgress>5 && view.equals(applicationViewController.getInstance().getCurrentView()))
{
Log.i("SHIT","SHIT2 : " + newProgress);
progressBar.setProgress(newProgress);
}
}
});
searchbar.setOnEditorActionListener((v, actionId, event) -> { searchbar.setOnEditorActionListener((v, actionId, event) -> {
Log.i("1actionId : ",actionId+""); Log.i("1actionId : ",actionId+"");
if (actionId == 5) if (actionId == 5)
@ -326,7 +352,7 @@ public class application_controller extends AppCompatActivity
@Override @Override
public void onClick(View v) public void onClick(View v)
{ {
message_manager.getInstance().reportURL(application_controller.this,searchbar.getText().toString()); message_manager.getInstance().reportURL(searchbar.getText().toString());
} }
}); });
} }
@ -336,17 +362,14 @@ public class application_controller extends AppCompatActivity
public void loadGeckoURL(String url) public void loadGeckoURL(String url)
{ {
boolean init_status=orbot_manager.getInstance().reinitOrbot(application_controller.this); boolean init_status=orbot_manager.getInstance().initOrbot();
if(init_status) if(init_status)
{ {
searchbar.setText(url.replaceAll("boogle.store","genesis.onion")); searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
checkSSLTextColor(); checkSSLTextColor();
KeyboardUtils.hideKeyboard(application_controller.this); helperMethod.hideKeyboard();
progressBar.setAlpha(0);
progressBar.setVisibility(View.VISIBLE);
Log.i("PROBLEM11",""); Log.i("PROBLEM11","");
progressBar.animate().setDuration(150).setDuration(300).alpha(1f);
isOnnionUrlHalted = false; isOnnionUrlHalted = false;
session1.stop(); session1.stop();
@ -369,20 +392,6 @@ public class application_controller extends AppCompatActivity
public boolean shouldOverrideUrlLoading(WebView view, String url) public boolean shouldOverrideUrlLoading(WebView view, String url)
{ {
URL host = null; URL host = null;
try
{
host = new URL(url);
if(host.getHost().contains("play.google.com"))
{
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.darkweb.genesissearchengine"));
startActivity(browserIntent);
return true;
}
}
catch (MalformedURLException e)
{
e.printStackTrace();
}
if(url.equals(searchbar.getText().toString())) if(url.equals(searchbar.getText().toString()))
{ {
@ -394,7 +403,7 @@ public class application_controller extends AppCompatActivity
{ {
try try
{ {
if(orbot_manager.getInstance().reinitOrbot(application_controller.this)) if(orbot_manager.getInstance().initOrbot())
{ {
loadGeckoURL(url); loadGeckoURL(url);
} }
@ -412,16 +421,20 @@ public class application_controller extends AppCompatActivity
searchbar.setText(url.replaceAll("boogle.store","genesis.onion")); searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
checkSSLTextColor(); checkSSLTextColor();
KeyboardUtils.hideKeyboard(application_controller.this); helperMethod.hideKeyboard();
if(traceUrlList.size()==0 || !status.currentURL.equals(traceUrlList.peek())) if(traceUrlList.size()==0 || !app_model.getInstance().getCurrentURL().equals(traceUrlList.peek()))
{ {
traceUrlList.add(status.currentURL); traceUrlList.add(app_model.getInstance().getCurrentURL());
status.currentURL = url;
} }
if(url.contains("?")) if(url.contains("?"))
{ {
url = url+"&savesearch=on"; url = url+"&savesearch=on";
} }
if(!app_model.getInstance().getCurrentURL().equals(url))
{
}
loadURLAnimate(url); loadURLAnimate(url);
return true; return true;
} }
@ -442,30 +455,36 @@ public class application_controller extends AppCompatActivity
public void run() { public void run() {
webView1.stopLoading(); webView1.stopLoading();
webView2.stopLoading(); webView2.stopLoading();
int duration = 200;
if(requestFailure.getAlpha()==1)
duration=1;
progressBar.setProgress(100);
requestFailure.animate().alpha(0f).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
if(webView1.getAlpha()==0) if(webView1.getAlpha()==0)
{ {
webView1.animate().setDuration(250).alpha(1f); webView1.animate().setDuration(duration).alpha(1f).withEndAction((() -> webView2.setAlpha(0)));
} }
else else
{ {
webView2.animate().setDuration(250).alpha(1f); webView2.animate().setDuration(duration).alpha(1f).withEndAction((() -> webView1.setAlpha(0)));
} }
progressBar.animate().alpha(0).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));
//.withEndAction((() -> { //.withEndAction((() -> {
//}));; //}));;
datamodel.getInstance().setIsLoadingURL(false); //app_model.getInstance().setIsLoadingURL(false);
requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));; //requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
Log.i("PROBLEM12",""); Log.i("PROBLEM12","");
if(searchbar.getText().toString().contains("genesis.onion"))
{
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
}
splashScreen.animate().alpha(0.0f).setStartDelay(150).setDuration(200).setListener(null).withEndAction((() -> splashScreen.setVisibility(View.GONE))); splashScreen.animate().alpha(0.0f).setStartDelay(150).setDuration(200).setListener(null).withEndAction((() -> splashScreen.setVisibility(View.GONE)));
if(!status.hasApplicationLoaded) if(!status.isApplicationLoaded)
{ {
status.hasApplicationLoaded = true; status.isApplicationLoaded = true;
handler = new Handler(); handler = new Handler();
Handler popuphandler = new Handler(); Handler popuphandler = new Handler();
@ -473,13 +492,13 @@ public class application_controller extends AppCompatActivity
popuphandler.postDelayed(new Runnable() { popuphandler.postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
if(status.hasApplicationLoaded && !isTutorialPopupShown) if(status.isApplicationLoaded && !isTutorialPopupShown)
{ {
if(!helperMethod.readPrefs("FirstTimeLoaded",application_controller.this)) { if(!preference_manager.getInstance().getBool("FirstTimeLoaded",false)) {
message_manager.getInstance().welcomeMessage(application_controller.this, application_controller.this); message_manager.getInstance().welcomeMessage();
isTutorialPopupShown = true; isTutorialPopupShown = true;
} }
else if(buildconstants.build_type.equals("local")) else if(constants.build_type.equals("local"))
{ {
versionChecker(); versionChecker();
} }
@ -499,27 +518,13 @@ public class application_controller extends AppCompatActivity
@Override @Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
{ {
handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Log.i("PROBLEM13","");
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
datamodel.getInstance().setIsLoadingURL(false);
splashScreen.animate().alpha(0);
requestFailure.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(1.0f);
status.isTorInitialized = false;
}
}, 3000);
super.onReceivedError(view, errorCode, description, failingUrl); super.onReceivedError(view, errorCode, description, failingUrl);
} }
}; };
if(!helperMethod.isNetworkAvailable(this)) if(!helperMethod.isNetworkAvailable())
{ {
status.hasApplicationLoaded = true; status.isApplicationLoaded = true;
splashScreen.animate().setStartDelay(2000).alpha(0.0f).setDuration(300).setListener(null).withEndAction((new Runnable() { splashScreen.animate().setStartDelay(2000).alpha(0.0f).setDuration(300).setListener(null).withEndAction((new Runnable() {
@Override @Override
public void run() public void run()
@ -528,8 +533,8 @@ public class application_controller extends AppCompatActivity
} }
})); }));
requestFailure.setVisibility(View.VISIBLE); //requestFailure.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(1.0f); //requestFailure.animate().alpha(1.0f);
status.isTorInitialized = false; status.isTorInitialized = false;
loadErrorPage(); loadErrorPage();
} }
@ -545,7 +550,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
{ {
isGeckoURLLoadded = false; isGeckoURLLoadded = false;
isBlackPage = url.equals("about:blank"); isBlackPage = url.equals("about:blank");
if(!isBlackPage && !orbot_manager.getInstance().reinitOrbot(application_controller.this)) if(!isBlackPage && !orbot_manager.getInstance().initOrbot())
{ {
session1.stop(); session1.stop();
session1.close(); session1.close();
@ -558,7 +563,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
} }
isLoadedUrlSet = false; isLoadedUrlSet = false;
KeyboardUtils.hideKeyboard(application_controller.this); helperMethod.hideKeyboard();
try try
{ {
URL host = new URL(url); URL host = new URL(url);
@ -567,7 +572,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
session1.stop(); session1.stop();
//session1.close(); //session1.close();
//session1.stop(); //session1.stop();
message_manager.getInstance().baseURLError(application_controller.this); message_manager.getInstance().baseURLError();
} }
} }
catch (MalformedURLException e) catch (MalformedURLException e)
@ -575,7 +580,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
e.printStackTrace(); e.printStackTrace();
} }
datamodel.getInstance().setIsLoadingURL(true); //app_model.getInstance().setIsLoadingURL(true);
if(!isBlackPage && !wasBackPressed) if(!isBlackPage && !wasBackPressed)
{ {
searchbar.setText(url); searchbar.setText(url);
@ -583,9 +588,6 @@ class progressDelegate implements GeckoSession.ProgressDelegate
} }
if(!isBlackPage && progressBar.getVisibility() == View.INVISIBLE) if(!isBlackPage && progressBar.getVisibility() == View.INVISIBLE)
{ {
progressBar.setAlpha(0);
progressBar.setVisibility(View.VISIBLE);
progressBar.animate().setDuration(150).alpha(1f);
} }
} }
@Override @Override
@ -620,14 +622,14 @@ class progressDelegate implements GeckoSession.ProgressDelegate
webLoader.bringToFront(); webLoader.bringToFront();
webLoader.animate().setDuration(100).alpha(1); webLoader.animate().setDuration(100).alpha(1);
webLoader.setVisibility(View.VISIBLE); webLoader.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));; //requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
String url = searchbar.getText().toString(); String url = searchbar.getText().toString();
boolean isBlackPage = url.equals("about:blank"); boolean isBlackPage = url.equals("about:blank");
if(!isBlackPage && !wasBackPressed) if(!isBlackPage && !wasBackPressed)
{ {
checkSSLTextColor(); checkSSLTextColor();
traceUrlList.add(status.currentURL); traceUrlList.add(app_model.getInstance().getCurrentURL());
if(status.currentURL.contains("boogle.store")) if(app_model.getInstance().getCurrentURL().contains("boogle.store"))
{ {
admanager.getInstance().showAd(true); admanager.getInstance().showAd(true);
} }
@ -635,16 +637,15 @@ class progressDelegate implements GeckoSession.ProgressDelegate
{ {
admanager.getInstance().showAd(false); admanager.getInstance().showAd(false);
} }
status.currentURL = url; //app_model.getInstance().setCurrentURL(url);
} }
wasBackPressed=false; wasBackPressed=false;
} }
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
isLoadedUrlSet = true; isLoadedUrlSet = true;
} }
if(progress>=100) if(progress>=100)
{ {
datamodel.getInstance().setIsLoadingURL(false); //app_model.getInstance().setIsLoadingURL(false);
} }
} }
@ -656,7 +657,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
public void initGeckoFailureHandler(boolean hasURLLoaded) public void initGeckoFailureHandler(boolean hasURLLoaded)
{ {
int delay = 15000; int delay = 15000;
if(!helperMethod.isNetworkAvailable(application_controller.this) || hasURLLoaded) if(!helperMethod.isNetworkAvailable() || hasURLLoaded)
{ {
delay=0; delay=0;
} }
@ -669,17 +670,16 @@ class progressDelegate implements GeckoSession.ProgressDelegate
public void run() { public void run() {
floatingButton.animate().alpha(0); floatingButton.animate().alpha(0);
Log.i("PROBLEM15",""); Log.i("PROBLEM15","");
datamodel.getInstance().setIsLoadingURL(false); //app_model.getInstance().setIsLoadingURL(false);
requestFailure.setAlpha(0.0f); //requestFailure.setAlpha(0.0f);
requestFailure.setVisibility(View.VISIBLE); //requestFailure.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(1.0f); //requestFailure.animate().alpha(1.0f);
Log.i("PROBLEM16",""); Log.i("PROBLEM16","");
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
geckoHandler = null; geckoHandler = null;
if(!helperMethod.isNetworkAvailable(application_controller.this)) if(!helperMethod.isNetworkAvailable())
{ {
orbot_manager.getInstance().restartOrbot(application_controller.this); //orbot_manager.getInstance().restartOrbot();
} }
wasBackPressed=false; wasBackPressed=false;
@ -693,13 +693,22 @@ class progressDelegate implements GeckoSession.ProgressDelegate
public void loadErrorPage() public void loadErrorPage()
{ {
requestFailure.animate().alpha(0.0f).setDuration(300).setListener(null).withEndAction((() -> { //requestFailure.animate().alpha(0.0f).setDuration(300).setListener(null).withEndAction((() -> {
requestFailure.setVisibility(View.GONE); // requestFailure.setVisibility(View.GONE);
})); //}));
} }
public void loadURLAnimate(String url) public void loadURLAnimate(String url)
{ {
if(!app_model.getInstance().getCurrentURL().equals(url))
{
loadURL(url);
}
}
public void loadURL(String url)
{
app_model.getInstance().setCurrentURL(url);
applicationViewController.getInstance().onRequestURL();
floatingButton.animate().alpha(0); floatingButton.animate().alpha(0);
webRequestHandler.getInstance().loadURL(url); webRequestHandler.getInstance().loadURL(url);
} }
@ -710,59 +719,40 @@ class progressDelegate implements GeckoSession.ProgressDelegate
{ {
searchbar.setText(url.replaceAll("boogle.store","genesis.onion")); searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
checkSSLTextColor(); checkSSLTextColor();
traceUrlList.add(status.currentURL); traceUrlList.add(app_model.getInstance().getCurrentURL());
status.currentURL=url; //app_model.getInstance().setCurrentURL(url);
progressBar.setAlpha(0f);
progressBar.setVisibility(View.VISIBLE);
Log.i("PROBLEM17",""); Log.i("PROBLEM17","");
progressBar.animate().setDuration(150).alpha(1f);
} }
public void onHomeButtonPressed(View view) public void onHomeButtonPressed(View view)
{ {
webRequestHandler.getInstance().isUrlStoped=true; searchbar.setText(constants.frontUrlSlashed);
searchbar.setText("https://genesis.onion");
checkSSLTextColor(); checkSSLTextColor();
status.currentURL="https://boogle.store";
traceUrlList.clear(); traceUrlList.clear();
progressBar.setAlpha(0f); loadURLAnimate(constants.backendUrlSlashed);
progressBar.setVisibility(View.VISIBLE); helperMethod.hideKeyboard();
Log.i("PROBLEM18","");
progressBar.animate().setDuration(150).alpha(1f);
loadURLAnimate("https://boogle.store");
webView1.stopLoading();
webView2.stopLoading();
session1.close(); session1.close();
isOnnionUrlHalted = true; isOnnionUrlHalted = true;
wasBackPressed = false; wasBackPressed = false;
KeyboardUtils.hideKeyboard(application_controller.this);
webRequestHandler.getInstance().isUrlStoped=false;
} }
public void onReloadButtonPressed(View view) public void onReloadButtonPressed(View view)
{ {
webRequestHandler.getInstance().isReloadedUrl = true;
Log.i("PROBLEM19","");
progressBar.animate().setDuration(150).alpha(0f);
progressBar.setVisibility(View.VISIBLE);
if(searchbar.getText().toString().contains("://genesis.onion")) if(searchbar.getText().toString().contains("://genesis.onion"))
{ {
Log.i("PROBLEM20",""); loadURL(app_model.getInstance().getCurrentURL());
progressBar.animate().setDuration(150).alpha(1f);
loadURLAnimate(status.currentURL);
} }
else else
{ {
if(status.isTorInitialized) if(status.isTorInitialized)
{ {
Log.i("PROBLEM21","");
progressBar.animate().setDuration(150).alpha(1f);
wasBackPressed = true; wasBackPressed = true;
loadGeckoURL(searchbar.getText().toString()); loadGeckoURL(searchbar.getText().toString());
} }
else else
{ {
orbot_manager.getInstance().reinitOrbot(application_controller.this); orbot_manager.getInstance().initOrbot();
} }
} }
} }
@ -804,7 +794,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
{ {
session1.stop(); session1.stop();
session1.close(); session1.close();
if(!status.currentURL.contains("boogle.store")) if(!app_model.getInstance().getCurrentURL().contains("boogle.store"))
{ {
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion")); searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
isOnnionUrlHalted=true; isOnnionUrlHalted=true;
@ -812,37 +802,33 @@ class progressDelegate implements GeckoSession.ProgressDelegate
session1.close(); session1.close();
webLoader.releaseSession(); webLoader.releaseSession();
webLoader.releaseSession(); webLoader.releaseSession();
status.currentURL = traceUrlList.pop().toString(); //app_model.getInstance().setCurrentURL(traceUrlList.pop().toString());
Log.i("PROBLEM22",""); Log.i("PROBLEM22","");
webLoader.animate().alpha(0f).withEndAction((() -> webLoader.setVisibility(View.INVISIBLE)));; webLoader.animate().alpha(0f).withEndAction((() -> webLoader.setVisibility(View.INVISIBLE)));;
//isOnnionUrlHalted = true; //isOnnionUrlHalted = true;
KeyboardUtils.hideKeyboard(application_controller.this); helperMethod.hideKeyboard();
if(requestFailure.getAlpha()==1) if(requestFailure.getAlpha()==1)
{ {
requestFailure.animate().alpha(0f).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));; //requestFailure.animate().alpha(0f).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
} }
else else
{ {
progressBar.animate().alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
} }
floatingButton.animate().alpha(0); floatingButton.animate().alpha(0);
} }
else else
{ {
//if(progressBar.getAlpha()==0)
//{
//progressBar.animate().setDuration(150).setDuration(300).alpha(1f);
Log.i("1LOG3","LOG1"); Log.i("1LOG3","LOG1");
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion")); searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
session1.close(); session1.close();
loadURLAnimate(traceUrlList.pop().toString()); loadURLAnimate(traceUrlList.pop().toString());
if(traceUrlList.size()<=0) if(traceUrlList.size()<=0)
{ {
status.currentURL = "https://boogle.store"; //app_model.getInstance().setCurrentURL("https://boogle.store");
} }
else else
{ {
status.currentURL = traceUrlList.peek().toString(); //app_model.getInstance().setCurrentURL(traceUrlList.peek().toString());
} }
floatingButton.animate().alpha(0); floatingButton.animate().alpha(0);
//} //}
@ -856,7 +842,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
session1.close(); session1.close();
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion")); searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
status.currentURL = "https://boogle.store"; //app_model.getInstance().setCurrentURL("https://boogle.store");
webLoader.animate().setDuration(250).alpha(0); webLoader.animate().setDuration(250).alpha(0);
traceUrlList.pop(); traceUrlList.pop();
wasBackPressed = false; wasBackPressed = false;
@ -865,20 +851,18 @@ class progressDelegate implements GeckoSession.ProgressDelegate
} }
else else
{ {
if(orbot_manager.getInstance().reinitOrbot(this) && progressBar.getAlpha()==0) if(orbot_manager.getInstance().initOrbot() && progressBar.getAlpha()==0)
{ {
status.currentURL = traceUrlList.peek().toString(); //app_model.getInstance().setCurrentURL(traceUrlList.peek().toString());
traceUrlList.pop().toString(); traceUrlList.pop().toString();
boolean init_status=orbot_manager.getInstance().reinitOrbot(application_controller.this); boolean init_status=orbot_manager.getInstance().initOrbot();
if(init_status) if(init_status)
{ {
searchbar.setText(status.currentURL.replaceAll("boogle.store","genesis.onion")); searchbar.setText(app_model.getInstance().getCurrentURL().replaceAll("boogle.store","genesis.onion"));
KeyboardUtils.hideKeyboard(application_controller.this); helperMethod.hideKeyboard();
progressBar.animate().alpha(1);
progressBar.setVisibility(View.VISIBLE);
wasBackPressed = true; wasBackPressed = true;
requestFailure.animate().alpha(0); //requestFailure.animate().alpha(0);
session1.loadUri(status.currentURL); session1.loadUri(app_model.getInstance().getCurrentURL());
} }
} }
} }
@ -899,7 +883,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
public boolean onEditorClicked(TextView v, int actionId, KeyEvent event) public boolean onEditorClicked(TextView v, int actionId, KeyEvent event)
{ {
KeyboardUtils.hideKeyboard(application_controller.this); helperMethod.hideKeyboard();
try try
{ {
session1.stop(); session1.stop();
@ -931,7 +915,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
{ {
if(!url.contains("://boogle.store")) if(!url.contains("://boogle.store"))
{ {
orbot_manager.getInstance().reinitOrbot(this); orbot_manager.getInstance().initOrbot();
} }
if(status.isTorInitialized) if(status.isTorInitialized)
@ -941,22 +925,22 @@ class progressDelegate implements GeckoSession.ProgressDelegate
} }
else else
{ {
orbot_manager.getInstance().reinitOrbot(application_controller.this); orbot_manager.getInstance().initOrbot();
message_manager.getInstance().startingOrbotInfo(this); message_manager.getInstance().startingOrbotInfo();
} }
return true; return true;
} }
else else
{ {
message_manager.getInstance().baseURLError(this); message_manager.getInstance().baseURLError();
return true; return true;
} }
} }
else else
{ {
String editedURL = "https://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all&savesearch=on"; String editedURL = "https://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all&savesearch=on";
status.currentURL = editedURL; //app_model.getInstance().setCurrentURL(editedURL);
searchbar.setText(editedURL.replace("boogle.store","genesis.onion")); searchbar.setText(editedURL.replace("boogle.store","genesis.onion"));
searchbar.clearFocus(); searchbar.clearFocus();
loadURLAnimate(editedURL); loadURLAnimate(editedURL);
@ -966,7 +950,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
catch (IOException e) catch (IOException e)
{ {
String editedURL = "https://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all&savesearch=on"; String editedURL = "https://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all&savesearch=on";
status.currentURL = editedURL; //app_model.getInstance().setCurrentURL(editedURL);
searchbar.clearFocus(); searchbar.clearFocus();
searchbar.setText(editedURL.replace("boogle.store","genesis.onion")); searchbar.setText(editedURL.replace("boogle.store","genesis.onion"));
loadURLAnimate(editedURL); loadURLAnimate(editedURL);
@ -977,5 +961,36 @@ class progressDelegate implements GeckoSession.ProgressDelegate
public void onInternetError()
{
applicationViewController.getInstance().onInternetError();
}
public void loadUrlOnWebview(String html)
{
applicationViewController.getInstance().loadUrlOnWebview(html);
}
} }

View File

@ -1,7 +0,0 @@
package com.darkweb.genesissearchengine;
public class buildconstants
{
public static String build_type = "playstore";
//public static String build_type = "local";
}

View File

@ -1,10 +0,0 @@
package com.darkweb.genesissearchengine;
public class constants
{
public static String backendUrl = "https://boogle.store";
//public static String backendUrl = "http://msydqstlz2kzerdg.onion/";
public static String backendUrlHost = "boogle.store";
public static String frontEndUrlHost = "genesis.store";
public static String allowedHost = ".onion";
}

View File

@ -0,0 +1,36 @@
package com.darkweb.genesissearchengine.constants;
public class constants
{
/*LOCAL URL CONSTANTS*/
public static String blackMarket = "https://boogle.store/search?q=black+market&p_num=1&s_type=all";
public static String leakedDocument = "https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all";
public static String news = "https://boogle.store/search?q=latest%20news&p_num=1&s_type=news";
public static String softwares = "https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all";
/*URL CONSTANTS*/
public static String backendUrl = "https://boogle.store";
public static String backendUrlHost = "boogle.store";
public static String backendUrlSlashed = "https://boogle.store/";
public static String frontUrlSlashed = "https://genesis.onion/";
public static String frontEndUrlHost = "genesis.store";
public static String allowedHost = ".onion";
public static String reportUrl = "https://boogle.store/reportus?r_key=";
public static String updateUrl = "https://boogle.store/manual?abi=";
public static String playstoreUrl = "https://play.google.com/store/apps/details?id=com.darkweb.genesissearchengine";
/*BUILD CONSTANTS*/
public static String build_type = "playstore";
//public static String build_type = "local";
/*BUILD PROXY*/
public static int proxy_type = 1;
public static String proxy_socks = "127.0.0.1";
public static int proxy_socks_version = 5;
public static boolean proxy_socks_remote_dns = true;
public static boolean proxy_cache = false;
public static boolean proxy_memory = false;
public static String proxy_useragent_override = "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0";
public static boolean proxy_donottrackheader_enabled = false;
public static int proxy_donottrackheader_value = 1;
}

View File

@ -0,0 +1,8 @@
package com.darkweb.genesissearchengine.constants;
public class enums
{
public enum webRequestStatus{notRunning,running,repeat;}
}

View File

@ -0,0 +1,23 @@
package com.darkweb.genesissearchengine.constants;
public class keys
{
/*Welcome Message Prefs*/
public static String first_time_loaded = "FirstTimeLoaded";
/*Home page*/
public static String homepage_html_key = "internalhtml";
/*Proxy Manager*/
public static String proxy_type = "network.proxy.type";
public static String proxy_socks = "network.proxy.socks";
public static String proxy_socks_port = "network.proxy.socks_port";
public static String proxy_socks_version = "network.proxy.socks_version";
public static String proxy_socks_remote_dns = "network.proxy.socks_remote_dns";
//public static String proxy_cache = "browser.cache.disk.enable";
//public static String proxy_memory = "browser.cache.memory.enable";
public static String proxy_useragent_override = "general.useragent.override";
public static String proxy_donottrackheader_enabled = "privacy.donottrackheader.enabled";
public static String proxy_donottrackheader_value = "privacy.donottrackheader.value";
}

View File

@ -0,0 +1,10 @@
package com.darkweb.genesissearchengine.constants;
public class messages
{
/*Post Messages*/
public final static int LOCAL_HOMEPAGE_CACHED =3;
public final static int INTERNET_ERROR =2;
public final static int MESSAGE_UPDATE_TEXT_CHILD_THREAD =1;
}

View File

@ -0,0 +1,8 @@
package com.darkweb.genesissearchengine.constants;
public class status
{
public static boolean isApplicationLoaded = false;
public static boolean isPlayStoreInstalled = false;
public static boolean isTorInitialized = false;
}

View File

@ -0,0 +1,42 @@
package com.darkweb.genesissearchengine.constants;
public class strings
{
public static String welcome_message_title = "Welcome | Deep Web Gateway";
public static String welcome_message_desc = "\nWelcome to Deep Web | Dark Web Gateway. This application provide you a platform to Search and Open Dark Web urls.\n\nYou cannot open any url related to normal internet as its not the intended purpose. You can check out following urls to get yourself started\n\nHere are few Suggestions\n";
public static String welcome_message_bt1 = "Deep Web Online Market";
public static String welcome_message_bt2 = "Leaked Documents and Books";
public static String welcome_message_bt3 = "Dark Web News and Articles";
public static String welcome_message_bt4 = "Secret Softwares and Hacking Tools";
public static String welcome_message_bt5 = "Don't Show Again";
public static String base_error_title = "Dark Web URL | Invalid URL";
public static String base_error_desc = "This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing\n";
public static String base_error_bt1 = "Dismiss";
public static String abi_error_title = "Invalid Setup File";
public static String abi_error_desc = "Looks like you messed up the installation. Either Install it from playstore or follow the link";
public static String abi_error_bt1 = "Local Upgrade";
public static String abi_error_bt2 = "Playstore Upgrade";
public static String report_url_title = "Report This Website";
public static String report_url_desc = "If you think url is illegal or disturbing report us so that we can update our database\n";
public static String report_url_bt1 = "Report";
public static String report_url_bt2 = "Dismiss";
public static String orbot_init_title = "Initializing";
public static String orbot_init_desc = "Please wait! While we connect you to hidden web. This might take few minutes\n";
public static String orbot_init_bt1 = "Dismiss";
public static String version_title = "Update Pending";
public static String version_desc = "You have not updated this app for a while please update it to get best performance\n";
public static String version_bt1 = "Update";
public static String report_success_title = "URL Reported Successfully";
public static String report_success_desc = "URL has been successfully reported. It will take about a week to completely remove this website from our servers\n";
public static String report_success_bt1 = "Dismiss";
public static String torfolder = "torfiles";
}

View File

@ -1,27 +0,0 @@
package com.darkweb.genesissearchengine;
public class datamodel
{
private static final datamodel ourInstance = new datamodel();
private boolean isLoadingURL = false;
public static datamodel getInstance()
{
return ourInstance;
}
private datamodel()
{
}
public boolean getIsLoadingURL()
{
return isLoadingURL;
}
public void setIsLoadingURL(boolean status)
{
isLoadingURL = status;
}
}

View File

@ -2,23 +2,20 @@ package com.darkweb.genesissearchengine;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.NetworkInfo; import android.net.NetworkInfo;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.view.View;
import java.io.*; import android.view.inputmethod.InputMethodManager;
import java.util.List; import com.darkweb.genesissearchengine.appManager.app_model;
import java.util.UUID; import com.darkweb.genesissearchengine.constants.keys;
import static android.content.Context.MODE_PRIVATE;
public class helperMethod public class helperMethod
{ {
public static boolean isNetworkAvailable(Context application_context) /*Helper Methods*/
public static boolean isNetworkAvailable()
{ {
ConnectivityManager cm = (ConnectivityManager) application_context.getSystemService(Context.CONNECTIVITY_SERVICE); ConnectivityManager cm = (ConnectivityManager) app_model.getInstance().getAppContext().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = cm.getActiveNetworkInfo(); NetworkInfo networkInfo = cm.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) if (networkInfo != null && networkInfo.isConnected())
{ {
@ -27,53 +24,29 @@ public class helperMethod
return false; return false;
} }
public static boolean readPrefs(String valueKey,Context applicationContext) { public static String readHomepageHTML(Context applicationContext)
SharedPreferences prefs = PreferenceManager {
.getDefaultSharedPreferences(applicationContext); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext);
return prefs.getBoolean(valueKey,false); return prefs.getString(keys.homepage_html_key,"");
} }
public static void savePrefs(String valueKey, boolean value,Context applicationContext) { public static void setHomepageHTML(String html, Context applicationContext)
SharedPreferences prefs = PreferenceManager {
.getDefaultSharedPreferences(applicationContext); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext);
SharedPreferences.Editor edit = prefs.edit(); SharedPreferences.Editor edit = prefs.edit();
edit.putBoolean(valueKey, value); edit.putString(keys.homepage_html_key, html);
edit.commit(); edit.commit();
} }
public static void setPlaystoreStatus(Context context) { public static void hideKeyboard()
{
String GooglePlayStorePackageNameOld = "com.google.market"; View view = app_model.getInstance().getAppInstance().findViewById(android.R.id.content);
String GooglePlayStorePackageNameNew = "com.android.vending"; if (view != null)
PackageManager packageManager = context.getPackageManager();
List<PackageInfo> packages = packageManager.getInstalledPackages(PackageManager.GET_UNINSTALLED_PACKAGES);
for (PackageInfo packageInfo : packages)
{ {
if (packageInfo.packageName.equals(GooglePlayStorePackageNameOld) || InputMethodManager imm = (InputMethodManager) app_model.getInstance().getAppInstance().getSystemService(Context.INPUT_METHOD_SERVICE);
packageInfo.packageName.equals(GooglePlayStorePackageNameNew)) { imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
status.isPlayStoreInstalled = true;
break;
}
} }
} }
public static String readInternalHTML(Context applicationContext)
{
SharedPreferences prefs = PreferenceManager
.getDefaultSharedPreferences(applicationContext);
return prefs.getString("internalhtml","");
}
public static void setInternalHTML(String html,Context applicationContext)
{
SharedPreferences prefs = PreferenceManager
.getDefaultSharedPreferences(applicationContext);
SharedPreferences.Editor edit = prefs.edit();
edit.putString("internalhtml", html);
edit.commit();
}
} }

View File

@ -0,0 +1,107 @@
package com.darkweb.genesissearchengine.httpManager;
import android.os.Handler;
import android.os.Message;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.messages;
import com.darkweb.genesissearchengine.helperMethod;
import cz.msebera.android.httpclient.HttpResponse;
import cz.msebera.android.httpclient.client.HttpClient;
import cz.msebera.android.httpclient.client.methods.HttpGet;
import cz.msebera.android.httpclient.conn.ssl.NoopHostnameVerifier;
import cz.msebera.android.httpclient.conn.ssl.SSLConnectionSocketFactory;
import cz.msebera.android.httpclient.conn.ssl.TrustSelfSignedStrategy;
import cz.msebera.android.httpclient.impl.client.DefaultHttpClient;
import cz.msebera.android.httpclient.impl.client.HttpClients;
import cz.msebera.android.httpclient.ssl.SSLContexts;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
public class httpclient
{
private HttpGet request = null;
private String html = "";
public void httpConnection(String url,Handler updateUIHandler,boolean isCachedRequest)
{
new Thread()
{
public void run()
{
try
{
String c_url = url.replace("http://boogle","https://boogle");
HttpClient client=new DefaultHttpClient();;
SSLConnectionSocketFactory scsf = new SSLConnectionSocketFactory(
SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(),
NoopHostnameVerifier.INSTANCE);
client = HttpClients.custom().setSSLSocketFactory(scsf).build();
request = new HttpGet(c_url);
HttpResponse response = client.execute(request);
InputStream in = response.getEntity().getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuilder str = new StringBuilder();
String line = null;
while((line = reader.readLine()) != null)
{
str.append(line);
}
in.close();
html = str.toString();
if(c_url.equals(constants.backendUrlSlashed))
{
html = html.replace("/privacy","https://boogle.store/privacy").replace("/about","https://boogle.store/about").replace("/reportus","https://boogle.store/reportus").replace("\"search\"","https://boogle.store/search").replace("/create","https://boogle.store/create");
helperMethod.setHomepageHTML(html, app_model.getInstance().getAppContext());
}
if(!isCachedRequest)
{
startPostTask(messages.MESSAGE_UPDATE_TEXT_CHILD_THREAD,updateUIHandler);
}
}
catch (Exception e)
{
if(!request.isAborted() && !isCachedRequest)
{
startPostTask(messages.INTERNET_ERROR,updateUIHandler);
}
}
request = null;
}
}.start();
}
public void startPostTask(int m_id,Handler updateUIHandler)
{
Message message = new Message();
message.what = m_id;
updateUIHandler.sendMessage(message);
}
public String getHtmlResponse()
{
return html;
}
public boolean isRequestLoading()
{
return request!=null;
}
public void stopRequest()
{
new Thread()
{
public void run()
{
request.abort();
}
}.start();
}
}

View File

@ -0,0 +1,75 @@
package com.darkweb.genesissearchengine.httpManager;
import android.content.Context;
import com.darkweb.genesissearchengine.pluginManager.preference_manager;
import cz.msebera.android.httpclient.client.HttpClient;
import cz.msebera.android.httpclient.client.methods.HttpGet;
import cz.msebera.android.httpclient.impl.client.DefaultHttpClient;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
public class serverRequestManager
{
private static final serverRequestManager ourInstance = new serverRequestManager();
public static serverRequestManager getInstance()
{
return ourInstance;
}
private serverRequestManager()
{
}
public void reportURL(String url)
{
try
{
HttpGet reportrequest = new HttpGet(url);
HttpClient client=new DefaultHttpClient();;
client.execute(reportrequest);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
public void getVersion(Context applicationContext)
{
new Thread()
{
public void run()
{
try
{
String webPage = "https://boogle.store/version";
URL url = new URL(webPage);
URLConnection urlConnection = null;
urlConnection = url.openConnection();
InputStream is = urlConnection.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
int numCharsRead;
char[] charArray = new char[1024];
StringBuffer sb = new StringBuffer();
while ((numCharsRead = isr.read(charArray)) > 0) {
sb.append(charArray, 0, numCharsRead);
}
String result = sb.toString();
preference_manager.getInstance().saveString("version",result);
}
catch (IOException e) {
e.printStackTrace();
}
}
}.start();
}
}

View File

@ -0,0 +1,98 @@
package com.darkweb.genesissearchengine.httpManager;
import android.annotation.SuppressLint;
import android.os.Message;
import android.os.Handler;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.messages;
import com.darkweb.genesissearchengine.helperMethod;
import static com.darkweb.genesissearchengine.constants.enums.webRequestStatus.*;
import static java.lang.Thread.sleep;
public class webRequestHandler
{
/*Private Variables*/
private String html = "";
private Handler updateUIHandler = null;
private httpclient client;
/*Initialization*/
private static final webRequestHandler ourInstance = new webRequestHandler();
public static webRequestHandler getInstance() {
return ourInstance;
}
private webRequestHandler()
{
client = new httpclient();
createUpdateUiHandler();
}
/*Helper Methods*/
public void loadURL(final String url)
{
if(client.isRequestLoading())
{
client.stopRequest();
}
cachedURLSelector();
}
public void cachedURLSelector()
{
if(app_model.getInstance().getCurrentURL().equals(constants.backendUrlSlashed))
{
String html_local = helperMethod.readHomepageHTML(app_model.getInstance().getAppContext());
if(html_local.length()>1)
{
html = html_local;
client = new httpclient();
client.httpConnection(app_model.getInstance().getCurrentURL(),updateUIHandler,true);
startPostTask(messages.LOCAL_HOMEPAGE_CACHED);
return;
}
}
client = new httpclient();
client.httpConnection(app_model.getInstance().getCurrentURL(),updateUIHandler,false);
}
public void startPostTask(int m_id)
{
Message message = new Message();
message.what = m_id;
updateUIHandler.sendMessage(message);
}
@SuppressLint("HandlerLeak")
private void createUpdateUiHandler()
{
updateUIHandler = new Handler()
{
@Override
public void handleMessage(Message msg)
{
if(msg.what == messages.LOCAL_HOMEPAGE_CACHED)
{
app_model.getInstance().getAppInstance().loadUrlOnWebview(html);
}
if(msg.what == messages.MESSAGE_UPDATE_TEXT_CHILD_THREAD)
{
app_model.getInstance().getAppInstance().loadUrlOnWebview(client.getHtmlResponse());
}
else if (msg.what == messages.INTERNET_ERROR)
{
app_model.getInstance().getAppInstance().onInternetError();
}
}
};
}
}

View File

@ -1,218 +0,0 @@
package com.darkweb.genesissearchengine;
import android.app.Application;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import com.crowdfire.cfalertdialog.CFAlertDialog;
public class message_manager {
private static final message_manager ourInstance = new message_manager();
public static message_manager getInstance() {
return ourInstance;
}
private message_manager() {
}
public void welcomeMessage(Context application_context, application_controller controller)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT)
.setTitle("Welcome | Deep Web Gateway")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,0,38,77))
.setMessage("\nWelcome to Deep Web | Dark Web Gateway. This application provide you a platform to Search and Open Dark Web urls.\n\nYou cannot open any url related to normal internet as its not the intended purpose. You can check out following urls to get yourself started\n\nHere are few Suggestions\n")
.addButton("Deep Web Online Market", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView("https://boogle.store/search?q=black+market&p_num=1&s_type=all");
controller.loadURLAnimate("https://boogle.store/search?q=black+market&p_num=1&s_type=all");
})
.addButton("Leaked Documents and Books", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView("https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all");
controller.loadURLAnimate("https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all");
})
.addButton("Dark Web News and Articles", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView("https://boogle.store/search?q=latest%20news&p_num=1&s_type=news");
controller.loadURLAnimate("https://boogle.store/search?q=latest%20news&p_num=1&s_type=news");
})
.addButton("Secret Softwares and Hacking Tools", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView("https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all");
controller.loadURLAnimate("https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all");
})
.addButton("Don't Show Again", -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
helperMethod.savePrefs("FirstTimeLoaded",true,application_context);
});
builder.show();
// Create Alert using Builder
/*
new LovelyStandardDialog(application_context)
.setTopColorRes(R.color.header)
.setTopTitleColor(Color.argb(255,255,255,255))
.setTopTitle("Welcome")
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing")
.setPositiveButton(android.R.string.ok, new View.OnClickListener() {
@Override/
public void onClick(View v)
{
}
})
.setNegativeButton("Don't Show Again", null)
.show();*/
}
public void baseURLError(Context application_context)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Dark Web URL | Invalid URL")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing\n")
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void abiError(Context application_context,String currentAbi)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Invalid Setup File")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.onDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
abiError(application_context,currentAbi);
}
})
.setMessage("Looks like you messed up the installation. Either Install it from playstore or follow the link")
.addButton("Local Upgrade", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://boogle.store/manual?abi="+currentAbi));
application_context.startActivity(browserIntent);
})
.addButton("Playstore Upgrade", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.darkweb.genesissearchengine"));
application_context.startActivity(browserIntent);
});
builder.show();
}
public void illegalWarningDialog(Context application_context,application_controller controller)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Illegal Activity Detected")
.setBackgroundColor(Color.argb(255,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing\n")
.addButton("Go Back", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
})
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
controller.backPressed();
});
builder.show();
}
public void URLNotFoundError(Context application_context)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Dark Web URL | Invalid")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing\n")
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void reportedSuccessfully(Context application_context)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("URL Reported Successfully")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.setMessage("URL has been successfully reported. It will take about a week to completely remove this website from our servers\n")
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void reportURL(Context application_context,String URL)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Report This Website")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.setMessage("If you think url is illegal or disturbing report us so that we can update our database\n")
.addButton("Report", -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
String reportURL = "https://boogle.store/reportus?r_key="+URL;
webRequestHandler.getInstance().reportURL(reportURL);
dialog.dismiss();
reportedSuccessfully(application_context);
})
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void startingOrbotInfo(Context application_context)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Initializing")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.setMessage("Please wait! While we connect you to hidden web. This might take few minutes\n")
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void versionWarning(Context application_context,String currentAbi)
{
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Update Pending")
.setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255))
.setMessage("You have not updated this app for a while please update it to get best performance\n")
.addButton("Update", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://boogle.store/manual?abi="+currentAbi));
application_context.startActivity(browserIntent);
});
builder.show();
}
}

View File

@ -1,146 +0,0 @@
package com.darkweb.genesissearchengine;
import android.content.Context;
import android.util.Log;
import android.webkit.WebView;
import com.msopentech.thali.android.toronionproxy.AndroidOnionProxyManager;
import com.msopentech.thali.toronionproxy.OnionProxyManager;
import org.mozilla.gecko.PrefsHelper;
import java.io.IOException;
public class orbot_manager {
private static final orbot_manager ourInstance = new orbot_manager();
boolean isOrbotRunning = false;
boolean isLoading = false;
OnionProxyManager onionProxyManager = null;
Context applicationContext = null;
WebView view1=null;
WebView view2=null;
public static orbot_manager getInstance() {
return ourInstance;
}
private orbot_manager() {
}
public boolean reinitOrbot(Context application_context)
{
if(!status.isTorInitialized)
{
message_manager.getInstance().startingOrbotInfo(application_context);
initializeTorClient(application_context,view1,view2);
return false;
}
else
{
return true;
}
}
public void restartOrbot(Context applicationContext)
{
this.applicationContext = applicationContext;
isOrbotRunning = false;
status.isTorInitialized = false;
if(onionProxyManager!=null)
{
new Thread()
{
public void run()
{
try
{
onionProxyManager.stop();
//initializeTorClient(applicationContext);
}
catch (IOException e)
{
e.printStackTrace();
}
}
}.start();
}
}
public void initializeTorClient(Context applicationContext,WebView view1,WebView view2)
{
if(view1==null)
{
this.view1 = view1;
this.view2 = view2;
}
if(isLoading)
{
return;
}
new Thread()
{
public void run()
{
while (true)
{
try
{
isLoading = true;
String fileStorageLocation = "torfiles";
if(onionProxyManager!=null && onionProxyManager.isRunning())
{
break;
}
onionProxyManager = new AndroidOnionProxyManager(applicationContext, fileStorageLocation);
int totalSecondsPerTorStartup = 4 * 60;
int totalTriesPerTorStartup = 5;
boolean ok = onionProxyManager.startWithRepeat(totalSecondsPerTorStartup, totalTriesPerTorStartup);
if (!ok) {
Log.i("TorTest", "Couldn't start Tor!");
return;
} else {
if (onionProxyManager.isRunning()) {
Log.i("My App", "Tor initialized on port " + onionProxyManager.getIPv4LocalHostSocksPort());
}
}
while (!onionProxyManager.isRunning()) {
sleep(1000);
}
if (onionProxyManager.isRunning()) {
Log.i("My App", "Tor initialized on port " + onionProxyManager.getIPv4LocalHostSocksPort());
status.port = onionProxyManager.getIPv4LocalHostSocksPort();
initializeProxy();
sleep(1500);
status.isTorInitialized = true;
break;
}
isLoading = false;
} catch (Exception ex) {
ex.printStackTrace();
continue;
}
}
}
}.start();
}
public void initializeProxy()
{
PrefsHelper.setPref("network.proxy.type",1); //manual proxy settings
PrefsHelper.setPref("network.proxy.socks","127.0.0.1"); //manual proxy settings
PrefsHelper.setPref("network.proxy.socks_port",status.port); //manual proxy settings
PrefsHelper.setPref("network.proxy.socks_version",5); //manual proxy settings
PrefsHelper.setPref("network.proxy.socks_remote_dns",true); //manual proxy settings
PrefsHelper.setPref("browser.cache.disk.enable",false);
PrefsHelper.setPref("browser.cache.memory.enable",false);
PrefsHelper.setPref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0");
PrefsHelper.setPref("privacy.donottrackheader.enabled",false);
PrefsHelper.setPref("privacy.donottrackheader.value",1);
}
}

View File

@ -0,0 +1,70 @@
package com.darkweb.genesissearchengine.pluginManager;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
public class admanager
{
/*Private Variables*/
private static final admanager ourInstance = new admanager();
private InterstitialAd mInterstitialAd;
private int adCount = 0;
/*Initializations*/
public static admanager getInstance() {
return ourInstance;
}
private admanager() {
}
public void initialize()
{
MobileAds.initialize(app_model.getInstance().getAppContext(), "ca-app-pub-5074525529134731~2926711128 ");
mInterstitialAd = new InterstitialAd(app_model.getInstance().getAppContext());
mInterstitialAd.setAdUnitId("ca-app-pub-5074525529134731/8478420705");
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
/*Helper Methods*/
public void showAd(boolean isAdForced)
{
if(!mInterstitialAd.isLoading() && !mInterstitialAd.isLoaded())
{
mInterstitialAd.loadAd(new AdRequest.Builder().build());
if(isAdForced || adCount==0 || adCount%3==0)
{
adCount = 0;
}
else
{
adCount+=1;
}
}
else
{
if(mInterstitialAd.isLoaded())
{
if(isAdForced)
{
mInterstitialAd.show();
adCount = 1;
}
else
{
if(adCount%3==0)
{
mInterstitialAd.show();
}
adCount += 1;
}
}
}
}
}

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine; package com.darkweb.genesissearchengine.pluginManager;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
@ -6,26 +6,22 @@ import com.crashlytics.android.Crashlytics;
import java.util.UUID; import java.util.UUID;
public class analyticmanager { public class analyticmanager
{
/*Private Variables*/
private static final analyticmanager ourInstance = new analyticmanager(); private static final analyticmanager ourInstance = new analyticmanager();
private String uniqueID = null;
public static analyticmanager getInstance() { public static analyticmanager getInstance() {
return ourInstance; return ourInstance;
} }
String uniqueID = null;
/*Initializations*/
private analyticmanager() private analyticmanager()
{ {
} }
public void logUser() public void initialize(Context context)
{
Crashlytics.setUserIdentifier(uniqueID);
Crashlytics.setUserEmail("user@fabric.io");
Crashlytics.setUserName(uniqueID);
}
public void setDeviceID(Context context)
{ {
final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID"; final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";
@ -43,5 +39,13 @@ public class analyticmanager {
} }
} }
/*Helper Methods*/
public void logUser()
{
Crashlytics.setUserIdentifier(uniqueID);
Crashlytics.setUserEmail("user@fabric.io");
Crashlytics.setUserName(uniqueID);
}
} }

View File

@ -0,0 +1,187 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import com.crowdfire.cfalertdialog.CFAlertDialog;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.appManager.application_controller;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.httpManager.serverRequestManager;
import com.example.myapplication.R;
public class message_manager
{
/*Initializations*/
private static final message_manager ourInstance = new message_manager();
public static message_manager getInstance()
{
return ourInstance;
}
private message_manager()
{
}
/*Helper Methods*/
public void welcomeMessage()
{
Context application_context = app_model.getInstance().getAppContext();
application_controller controller = app_model.getInstance().getAppInstance();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT)
.setTitle(strings.welcome_message_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v1))
.setTextColor(application_context.getResources().getColor(R.color.blue_dark))
.setMessage(strings.welcome_message_desc)
.addButton(strings.welcome_message_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView(constants.blackMarket);
controller.loadURLAnimate(constants.blackMarket);
})
.addButton(strings.welcome_message_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView(constants.leakedDocument);
controller.loadURLAnimate(constants.leakedDocument);
})
.addButton(strings.welcome_message_bt3, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView(constants.news);
controller.loadURLAnimate(constants.news);
})
.addButton(strings.welcome_message_bt4, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.initializePopupView(constants.softwares);
controller.loadURLAnimate(constants.softwares);
})
.addButton(strings.welcome_message_bt5, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
preference_manager.getInstance().saveBool(keys.first_time_loaded,true);
});
builder.show();
}
public void baseURLError()
{
Context application_context = app_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.base_error_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v1))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.base_error_desc)
.addButton(strings.base_error_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void abiError(String currentAbi)
{
Context application_context = app_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.abi_error_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v1))
.setTextColor(application_context.getResources().getColor(R.color.black))
.onDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
abiError(currentAbi);
}
})
.setMessage(strings.abi_error_desc)
.addButton(strings.abi_error_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.updateUrl+currentAbi));
application_context.startActivity(browserIntent);
})
.addButton(strings.abi_error_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.playstoreUrl));
application_context.startActivity(browserIntent);
});
builder.show();
}
public void reportedSuccessfully()
{
Context application_context = app_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.report_success_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v1))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.report_success_desc)
.addButton(strings.report_success_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void reportURL(String URL)
{
Context application_context = app_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.report_url_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v1))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.report_url_desc)
.addButton(strings.report_url_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
String reportURL = constants.reportUrl+URL;
serverRequestManager.getInstance().reportURL(reportURL);
dialog.dismiss();
reportedSuccessfully();
})
.addButton(strings.report_url_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void startingOrbotInfo()
{
Context application_context = app_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.orbot_init_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v1))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.orbot_init_desc)
.addButton(strings.orbot_init_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void versionWarning(String currentAbi)
{
Context application_context = app_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.version_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v1))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.version_desc)
.addButton(strings.version_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.updateUrl+currentAbi));
application_context.startActivity(browserIntent);
});
builder.show();
}
}

View File

@ -0,0 +1,115 @@
package com.darkweb.genesissearchengine.pluginManager;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import com.msopentech.thali.android.toronionproxy.AndroidOnionProxyManager;
import com.msopentech.thali.toronionproxy.OnionProxyManager;
import org.mozilla.gecko.PrefsHelper;
public class orbot_manager {
/*Private Variables*/
private boolean isLoading = false;
/*Local Initialization*/
private static final orbot_manager ourInstance = new orbot_manager();
private OnionProxyManager onionProxyManager = null;
public static orbot_manager getInstance()
{
return ourInstance;
}
private orbot_manager()
{
}
/*Orbot Initialization*/
public boolean initOrbot()
{
if(!status.isTorInitialized)
{
message_manager.getInstance().startingOrbotInfo();
initializeTorClient();
return false;
}
else
{
return true;
}
}
public void initializeTorClient()
{
if(!isLoading)
{
new Thread()
{
public void run()
{
while (true)
{
try
{
isLoading = true;
String fileStorageLocation = strings.torfolder;
if(onionProxyManager!=null && onionProxyManager.isRunning())
{
break;
}
onionProxyManager = new AndroidOnionProxyManager(app_model.getInstance().getAppContext(), fileStorageLocation);
int totalSecondsPerTorStartup = 4 * 60;
int totalTriesPerTorStartup = 5;
boolean ok = onionProxyManager.startWithRepeat(totalSecondsPerTorStartup, totalTriesPerTorStartup);
if (!ok) {
return;
} else {
if (onionProxyManager.isRunning()) {
}
}
while (!onionProxyManager.isRunning()) {
sleep(1000);
}
if (onionProxyManager.isRunning()) {
app_model.getInstance().setPort(onionProxyManager.getIPv4LocalHostSocksPort());
initializeProxy();
sleep(1500);
status.isTorInitialized = true;
break;
}
isLoading = false;
} catch (Exception ex) {
ex.printStackTrace();
continue;
}
}
}
}.start();
}
}
/*Proxy Initialization*/
public void initializeProxy()
{
PrefsHelper.setPref(keys.proxy_type, constants.proxy_type); //manual proxy settings
PrefsHelper.setPref(keys.proxy_socks,constants.proxy_socks); //manual proxy settings
PrefsHelper.setPref(keys.proxy_socks_port, app_model.getInstance().getPort()); //manual proxy settings
PrefsHelper.setPref(keys.proxy_socks_version,constants.proxy_socks_version); //manual proxy settings
PrefsHelper.setPref(keys.proxy_socks_remote_dns,constants.proxy_socks_remote_dns); //manual proxy settings
//PrefsHelper.setPref(keys.proxy_cache,constants.proxy_cache);
//PrefsHelper.setPref(keys.proxy_memory,constants.proxy_memory);
PrefsHelper.setPref(keys.proxy_useragent_override, constants.proxy_useragent_override);
PrefsHelper.setPref(keys.proxy_donottrackheader_enabled,constants.proxy_donottrackheader_enabled);
PrefsHelper.setPref(keys.proxy_donottrackheader_value,constants.proxy_donottrackheader_value);
}
}

View File

@ -0,0 +1,53 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
public class preference_manager
{
/*Private Declarations*/
private static final preference_manager ourInstance = new preference_manager();
private SharedPreferences prefs;
private SharedPreferences.Editor edit;
public static preference_manager getInstance()
{
return ourInstance;
}
/*Initializations*/
private preference_manager()
{
}
public void initialize(Context applicationContext)
{
prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext);
edit = prefs.edit();
}
/*Saving Preferences*/
public void saveString(String valueKey, String value)
{
edit.putString(valueKey, value);
edit.commit();
}
public void saveBool(String valueKey, boolean value)
{
edit.putBoolean(valueKey, value);
edit.commit();
}
/*Recieving Preferences*/
public String getString(String valueKey, String valueDefault)
{
return prefs.getString(valueKey, valueDefault);
}
public boolean getBool(String valueKey, boolean valueDefault)
{
return prefs.getBoolean(valueKey, valueDefault);
}
}

View File

@ -1,29 +0,0 @@
package com.darkweb.genesissearchengine;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
public class preference_manager {
private static final preference_manager ourInstance = new preference_manager();
public static preference_manager getInstance() {
return ourInstance;
}
private preference_manager() {
}
public void saveString(String valueKey, String value, Context applicationContext) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext);
SharedPreferences.Editor edit = prefs.edit();
edit.putString(valueKey, value);
edit.commit();
}
public String getString(String valueKey, String valueDefault,Context applicationContext) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext);
return prefs.getString(valueKey, valueDefault);
}
}

View File

@ -1,10 +0,0 @@
package com.darkweb.genesissearchengine;
public class status
{
public static boolean hasApplicationLoaded = false;
public static String currentURL = "http://boogle.store/";
public static boolean isPlayStoreInstalled = false;
public static int port = 9150;
public static boolean isTorInitialized = false;
}

View File

@ -1,421 +0,0 @@
package com.darkweb.genesissearchengine;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Message;
import android.support.constraint.ConstraintLayout;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import android.os.Handler;
import cz.msebera.android.httpclient.HttpResponse;
import cz.msebera.android.httpclient.client.HttpClient;
import cz.msebera.android.httpclient.client.methods.HttpGet;
import cz.msebera.android.httpclient.conn.ssl.NoopHostnameVerifier;
import cz.msebera.android.httpclient.conn.ssl.SSLConnectionSocketFactory;
import cz.msebera.android.httpclient.conn.ssl.TrustSelfSignedStrategy;
import cz.msebera.android.httpclient.impl.client.DefaultHttpClient;
import cz.msebera.android.httpclient.impl.client.HttpClients;
import cz.msebera.android.httpclient.ssl.SSLContexts;
public class webRequestHandler
{
private static final webRequestHandler ourInstance = new webRequestHandler();
private WebView[] view = new WebView[2];
private ProgressBar progressBar;
private EditText searchbar;
private ConstraintLayout requestFailure;
public boolean reloadError=false;
public boolean isReloadedUrl = false;
public boolean isHomeCacheUpdated = false;
private int viewIndex = 1;
private int currentViewIndex = 0;
private String html = "";
private String baseURL = "";
public Thread clientThread = null;
HttpGet request = null;
private Handler updateUIHandler = null;
public boolean isUrlStoped = false;
private String currenturl = "";
private ConstraintLayout splash;
private final static int INTERNET_ERROR =2;
private final static int MESSAGE_UPDATE_TEXT_CHILD_THREAD =1;
private final static int RELOAD_ERROR =3;
private application_controller controller;
private Context applictionContext;
public static webRequestHandler getInstance() {
return ourInstance;
}
private webRequestHandler()
{
}
public void initialization(WebView view1, WebView view2, ProgressBar progressBar, EditText searchbar, ConstraintLayout splash, Context applicationContext,ConstraintLayout requestFailure,application_controller controller)
{
this.applictionContext = applicationContext;
this.controller = controller;
this.splash = splash;
this.view[0] = view1;
this.view[1] = view2;
this.progressBar = progressBar;
this.searchbar = searchbar;
this.requestFailure = requestFailure;
createUpdateUiHandler();
}
public void loadURL(final String url)
{
Log.i("STEST : 1","1 : " + currenturl.equals(url) + " : " + isReloadedUrl + " : " + !reloadError);
try
{
if(!currenturl.equals(url) || isReloadedUrl || !reloadError)
{
Log.i("STEST : 2","1");
isReloadedUrl = false;
preInitialization(url);
currenturl = url;
}
else
{
Log.i("STEST : 3","1");
Message message = new Message();
message.what = RELOAD_ERROR;
updateUIHandler.sendMessage(message);
return;
}
}
catch (Exception e)
{
Log.i("STEST : 4","1 : " + e.getMessage());
e.printStackTrace();
}
clientThread = new Thread(() -> {
String errorMessage = "";
try
{
Log.i("STEST : 5","1");
currenturl = url;
if(url.contains("boogle.store"))
{
Log.i("STEST : 6","1");
nonProxyConnection(url);
}
else
{
Log.i("STEST : 7","1");
proxyConnection(url);
}
}
catch (Exception e)
{
Log.i("STEST : 8","1 : " + e.getMessage());
errorMessage = e.getMessage();
if(!e.getMessage().contains("Socket closed") && !e.getMessage().contains("failed to respond") && e.getMessage().contains("Unable to resolve host \"boogle.store\""))
{
Log.i("STEST99 : 9","1 : "+e.getMessage());
onError();
reloadError=true;
e.printStackTrace();
}
}
});
clientThread.start();
}
public void preInitialization(String url)
{
Log.i("WOW MAN 0","WOW MAN 2 : " + currenturl + "----" + url);
progressBar.setAlpha(0);
progressBar.setVisibility(View.VISIBLE);
progressBar.animate().setDuration(150).alpha(1f);
Log.i("WOW MAN 1","WOW MAN 2 : " + currenturl + "----" + url);
if(!datamodel.getInstance().getIsLoadingURL())
{
datamodel.getInstance().setIsLoadingURL(true);
}
else
{
request.abort();
isReloadedUrl = true;
if(clientThread!=null)
clientThread.stop();
clientThread = null;
searchbar.setText(url.replace("http://boogle.store","http://genesis.onion"));
}
}
public void nonProxyConnection(String url) throws IOException
{
url = url.replace("http://boogle","https://boogle");
Log.i("SHITS","fizza " + url);
if(url.equals("https://boogle.store"))
{
String html_local = helperMethod.readInternalHTML(applictionContext);
Log.i("SHITS","fizza1 " + html_local);
if(html_local.length()>1)
{
Log.i("SHITS","fizza2 " + url);
html = html_local;
Message message = new Message();
message.what = MESSAGE_UPDATE_TEXT_CHILD_THREAD;
updateUIHandler.sendMessage(message);
updateHomePageCache();
return;
}
}
HttpClient client=new DefaultHttpClient();;
try {
SSLConnectionSocketFactory scsf = new SSLConnectionSocketFactory(
SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(),
NoopHostnameVerifier.INSTANCE);
client = HttpClients.custom().setSSLSocketFactory(scsf).build();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (KeyManagementException e) {
e.printStackTrace();
} catch (KeyStoreException e) {
e.printStackTrace();
}
request = new HttpGet(url);
baseURL = url;
HttpResponse response = client.execute(request);
InputStream in = response.getEntity().getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuilder str = new StringBuilder();
String line = null;
while((line = reader.readLine()) != null)
{
str.append(line);
}
in.close();
html = str.toString();
if(url.equals("https://boogle.store"))
{
html = html.replace("/privacy","https://boogle.store/privacy").replace("/about","https://boogle.store/about").replace("/reportus","https://boogle.store/reportus").replace("\"search\"","https://boogle.store/search").replace("/create","https://boogle.store/create");
Log.i("SHITS","fizza3 " + html);
helperMethod.setInternalHTML(html,applictionContext);
}
Message message = new Message();
message.what = MESSAGE_UPDATE_TEXT_CHILD_THREAD;
updateUIHandler.sendMessage(message);
}
public void reportURL(String url)
{
try
{
HttpGet reportrequest = new HttpGet(url);
HttpClient client=new DefaultHttpClient();;
HttpResponse response = client.execute(reportrequest);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
public void proxyConnection(String url) throws Exception {
}
public void onError()
{
Log.i("WOW222","WOW222 : " + isReloadedUrl);
reloadError = true;
if(!isReloadedUrl)
{
Message message = new Message();
message.what = INTERNET_ERROR;
updateUIHandler.sendMessage(message);
Log.i("WOW222","WOW333 : " + isReloadedUrl);
}
else
{
Log.i("SUSHIT5","5");
Message message = new Message();
message.what = RELOAD_ERROR;
updateUIHandler.sendMessage(message);
}
isReloadedUrl = false;
}
@SuppressLint("HandlerLeak")
private void createUpdateUiHandler()
{
if(updateUIHandler == null)
{
updateUIHandler = new Handler()
{
@Override
public void handleMessage(Message msg) {
if(msg.what == MESSAGE_UPDATE_TEXT_CHILD_THREAD)
{
reloadError = false;
view[viewIndex].setAlpha(0);
view[viewIndex].bringToFront();
view[viewIndex].loadDataWithBaseURL(baseURL,html, "text/html", "utf-8", null);
//view[currentViewIndex].animate().alpha(1);
if(viewIndex==1)
{
viewIndex = 0;
currentViewIndex =1;
}
else
{
viewIndex = 1;
currentViewIndex=0;
}
//view[currentViewIndex].animate().setDuration(0).alpha(0f).withEndAction((() -> {
//}));
}
else if (msg.what == INTERNET_ERROR)
{
splash.animate().setStartDelay(2000).alpha(0);
datamodel.getInstance().setIsLoadingURL(false);
Log.i("PROBLEM28","");
progressBar.animate().setDuration(150).alpha(0f);
requestFailure.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(1f).setDuration(300).withEndAction((() -> {
}));
if(!helperMethod.isNetworkAvailable(controller))
{
orbot_manager.getInstance().restartOrbot(controller);
}
Log.i("SUSHIT2","2");
}
else if (msg.what == RELOAD_ERROR)
{
Log.i("SUSHIT1","1");
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Log.i("PROBLEM29","");
progressBar.animate().setDuration(150).alpha(0f);
}
}, 1000);
}
}
};
}
}
public void getVersion(Context applicationContext)
{
new Thread()
{
public void run()
{
try
{
String webPage = "https://boogle.store/version";
URL url = new URL(webPage);
URLConnection urlConnection = null;
urlConnection = url.openConnection();
InputStream is = urlConnection.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
int numCharsRead;
char[] charArray = new char[1024];
StringBuffer sb = new StringBuffer();
while ((numCharsRead = isr.read(charArray)) > 0) {
sb.append(charArray, 0, numCharsRead);
}
String result = sb.toString();
preference_manager.getInstance().saveString("version",result,applicationContext);
}
catch (IOException e) {
e.printStackTrace();
}
}
}.start();
}
/*****--------------------ASYNC TASK--------------------******/
public void updateHomePageCache()
{
if(!isHomeCacheUpdated)
{
isHomeCacheUpdated = true;
String url = "https://boogle.store";
try
{
HttpClient client=new DefaultHttpClient();;
try {
SSLConnectionSocketFactory scsf = new SSLConnectionSocketFactory(
SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(),
NoopHostnameVerifier.INSTANCE);
client = HttpClients.custom().setSSLSocketFactory(scsf).build();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (KeyManagementException e) {
e.printStackTrace();
} catch (KeyStoreException e) {
e.printStackTrace();
}
request = new HttpGet(url);
baseURL = url;
HttpResponse response = client.execute(request);
InputStream in = response.getEntity().getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuilder str = new StringBuilder();
String line = null;
while((line = reader.readLine()) != null)
{
str.append(line);
}
in.close();
html = str.toString();
helperMethod.setInternalHTML(html,applictionContext);
}
catch (Exception ex)
{
}
}
}
}

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/splashblue"/>
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/splashlogoclip"/>
</item>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 B

View File

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/lock"
android:width="5dp"
android:height="5dp"
/>
</layer-list >

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/progress">
<rotate android:toDegrees="400">
<shape
android:shape="ring"
android:thickness="4dp">
<solid android:color="#ffffff" />
</shape>
</rotate>
</item>
</layer-list>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#ffffff"
android:endColor="@android:color/transparent"
android:angle="90" />
</shape>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="2dp"/>
</shape>
</item>
<item android:state_pressed="false" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<!-- you can use any color you want I used here gray color-->
<solid android:color="#ffffff"/>
<corners android:radius="2dp"/>
</shape>
</item>
</selector>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- State when a row is being pressed, but hasn't yet been activated (finger down) -->
<item android:state_pressed="true" android:color="#000000" />
<!-- When the view is "activated". In SINGLE_CHOICE_MODE, it flags the active row
of a ListView -->
<item android:state_activated="true" android:color="#000000" />
<!-- Default, "just hangin' out" state. -->
<item android:color="@android:color/transparent" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,199 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.darkweb.genesissearchengine.application_controller">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/pageLoader1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="55dp"
tools:layout_editor_absoluteY="0dp" tools:layout_editor_absoluteX="0dp">
</WebView>
<WebView
android:id="@+id/pageLoader2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="55dp"
tools:layout_editor_absoluteY="0dp" tools:layout_editor_absoluteX="0dp">
</WebView>
<org.mozilla.geckoview.GeckoView
android:id="@+id/webLoader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0"
android:layout_marginTop="55dp"
tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="8dp">
</org.mozilla.geckoview.GeckoView>
</FrameLayout>
<android.support.constraint.ConstraintLayout
android:id="@+id/requestFailure"
android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent"
android:background="#ffffff"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent"
>
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f8f8f8"
android:id="@+id/errorBack" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" android:contentDescription="@string/todo"/>
<TextView
android:layout_width="match_parent"
android:textAlignment="viewStart"
android:textStyle="bold"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="@string/errorTiyle"
android:textColor="#4d4d4d"
android:ems="10"
android:id="@+id/editText"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="74dp"
app:layout_constraintEnd_toEndOf="parent" tools:ignore="TextViewEdits"/>
<Button
android:text="@string/reload"
android:onClick="onReloadButtonPressed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/reloadButton"
android:background="@drawable/shape"
android:textColor="#000000"
app:layout_constraintBottom_toBottomOf="parent"
android:radius="1dp"
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:layout_marginBottom="36dp" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.498" app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:text="@string/internetErrorMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:textColor="#4d4d4d"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="120dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" app:layout_constraintEnd_toEndOf="parent"/>
<ImageView
android:layout_width="110dp"
android:layout_height="0dp" app:srcCompat="@drawable/interneticon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintBottom_toTopOf="@+id/reloadButton" android:layout_marginBottom="35dp"
android:layout_marginTop="35dp" android:contentDescription="@string/todo"/>
</android.support.constraint.ConstraintLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="55dp"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:id="@+id/topbar"
android:orientation="horizontal"
android:elevation="10dp"
android:background="@drawable/border"
android:gravity="left" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlHardcoded,UselessParent">
<ImageButton
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="5dp"
android:layout_marginTop="10.5dp"
android:id="@+id/home"
android:bottomRightRadius="13dp"
android:bottomLeftRadius="13dp"
android:topLeftRadius="13dp"
android:topRightRadius="13dp"
android:scaleType="fitCenter"
android:src="@drawable/homeicon"
android:onClick="onHomeButtonPressed"
android:background="@drawable/pressedcolor"
android:contentDescription="@string/todo"/>
<EditText
android:layout_width="0dp"
android:layout_height="match_parent"
android:textSize="16sp"
android:textColor="#333333"
android:selectAllOnFocus="true"
android:paddingLeft="10dp"
android:paddingRight="15dp"
android:textColorHighlight="#b3d1ff"
android:background="@drawable/searchbar"
android:textCursorDrawable="@drawable/cursorcolor"
android:hint="@string/SearchHint"
android:text="@string/homeUrl"
android:ems="10"
android:layout_marginTop="8dp"
android:inputType="textNoSuggestions"
android:layout_marginBottom="8dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="5dp"
android:maxLines="1"
android:id="@+id/search" android:layout_weight="1" android:importantForAutofill="no"
tools:targetApi="o"/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="108dp"
android:indeterminateTint="#dd4b39"
android:id="@+id/progressBar"
android:indeterminateTintMode="src_in"
android:indeterminateOnly="true"
android:progress="50" app:layout_constraintTop_toTopOf="parent"
/>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:background="@color/splashblue"
android:id="@+id/splashScreen"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/backsplash"
android:background="@drawable/backsplash" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<ImageView
android:layout_width="35dp"
android:layout_height="35dp"
app:srcCompat="@drawable/loading"
android:id="@+id/imageView_loading_back" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</android.support.constraint.ConstraintLayout>
</FrameLayout>
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:src="@drawable/ban"
android:layout_height="wrap_content"
android:alpha="0"
app:borderWidth="0dp"
app:elevation="10dp"
android:backgroundTint="#ffffff"
android:clickable="true" app:srcCompat="?attr/actionModeSelectAllDrawable"
android:id="@+id/floatingActionButton3" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"/>
</android.support.constraint.ConstraintLayout>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.constraint.ConstraintLayout>

View File

@ -5,7 +5,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="com.darkweb.genesissearchengine.application_controller"> tools:context="com.darkweb.genesissearchengine.appManager.application_controller">
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -37,7 +37,7 @@
android:id="@+id/requestFailure" android:id="@+id/requestFailure"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
android:background="#ffffff" android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent" android:layout_width="match_parent"
> >
@ -45,7 +45,7 @@
<ImageButton <ImageButton
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#f8f8f8" android:background="@color/white_darker"
android:id="@+id/errorBack" app:layout_constraintTop_toTopOf="parent" android:id="@+id/errorBack" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" android:contentDescription="@string/todo"/> app:layout_constraintEnd_toEndOf="parent" android:contentDescription="@string/todo"/>
@ -56,7 +56,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textPersonName" android:inputType="textPersonName"
android:text="@string/errorTiyle" android:text="@string/errorTiyle"
android:textColor="#4d4d4d" android:textColor="@color/text_color_v1"
android:ems="10" android:ems="10"
android:id="@+id/editText" android:id="@+id/editText"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="74dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="74dp"
@ -67,8 +67,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/reloadButton" android:id="@+id/reloadButton"
android:background="@drawable/shape" android:background="@xml/reload_default_state"
android:textColor="#000000" android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:radius="1dp" android:radius="1dp"
android:bottomRightRadius="10dp" android:bottomRightRadius="10dp"
@ -82,13 +82,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/textView" android:id="@+id/textView"
android:textColor="#4d4d4d" android:textColor="@color/text_color_v1"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="120dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="120dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="10dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" app:layout_constraintEnd_toEndOf="parent"/> android:layout_marginEnd="10dp" app:layout_constraintEnd_toEndOf="parent"/>
<ImageView <ImageView
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="0dp" app:srcCompat="@drawable/interneticon" android:layout_height="0dp" app:srcCompat="@drawable/icon_interneticon"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" app:layout_constraintTop_toBottomOf="@+id/textView"
@ -106,7 +106,7 @@
android:id="@+id/topbar" android:id="@+id/topbar"
android:orientation="horizontal" android:orientation="horizontal"
android:elevation="10dp" android:elevation="10dp"
android:background="@drawable/border" android:background="@xml/floating_button_border"
android:gravity="left" app:layout_constraintTop_toTopOf="parent" android:gravity="left" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlHardcoded,UselessParent"> tools:ignore="RtlHardcoded,UselessParent">
@ -121,21 +121,21 @@
android:topLeftRadius="13dp" android:topLeftRadius="13dp"
android:topRightRadius="13dp" android:topRightRadius="13dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="@drawable/homeicon" android:src="@drawable/icon_homeicon"
android:onClick="onHomeButtonPressed" android:onClick="onHomeButtonPressed"
android:background="@drawable/pressedcolor" android:background="@xml/home_pressed_state"
android:contentDescription="@string/todo"/> android:contentDescription="@string/todo"/>
<EditText <EditText
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="16sp" android:textSize="16sp"
android:textColor="#333333" android:textColor="@color/text_color_v2"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:paddingRight="15dp" android:paddingRight="15dp"
android:textColorHighlight="#b3d1ff" android:textColorHighlight="@color/text_color_highlight_v1"
android:background="@drawable/searchbar" android:background="@xml/search_back_default"
android:textCursorDrawable="@drawable/cursorcolor" android:textCursorDrawable="@xml/search_cursor_state"
android:hint="@string/SearchHint" android:hint="@string/SearchHint"
android:text="@string/homeUrl" android:text="@string/homeUrl"
android:ems="10" android:ems="10"
@ -154,31 +154,31 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ProgressBar <ProgressBar
style="?android:attr/progressBarStyleHorizontal" style="@android:style/Widget.Holo.Light.ProgressBar.Horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="108dp" android:layout_height="108dp"
android:indeterminateTint="#dd4b39" android:progressBackgroundTint="@color/white"
android:id="@+id/progressBar" android:id="@+id/progressBar"
android:indeterminateTintMode="src_in" android:scaleY="0.6"
android:indeterminateOnly="true" android:progressTint="@color/progress_tint"
android:progress="50" app:layout_constraintTop_toTopOf="parent" android:progress="50" app:layout_constraintTop_toTopOf="parent"
/> />
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:background="@color/splashblue" android:background="@color/ease_blue"
android:id="@+id/splashScreen" android:id="@+id/splashScreen"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/backsplash" android:id="@+id/backsplash"
android:background="@drawable/backsplash" app:layout_constraintStart_toStartOf="parent" android:background="@xml/splash_gradient" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/> app:layout_constraintTop_toTopOf="parent"/>
<ImageView <ImageView
android:layout_width="35dp" android:layout_width="35dp"
android:layout_height="35dp" android:layout_height="35dp"
app:srcCompat="@drawable/loading" app:srcCompat="@drawable/icon_loading"
android:id="@+id/imageView_loading_back" app:layout_constraintStart_toStartOf="parent" android:id="@+id/imageView_loading_back" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/> app:layout_constraintTop_toTopOf="parent"/>
@ -186,12 +186,12 @@
</FrameLayout> </FrameLayout>
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:src="@drawable/ban" android:src="@drawable/icon_ban"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:alpha="0" android:alpha="0"
app:borderWidth="0dp" app:borderWidth="0dp"
app:elevation="10dp" app:elevation="10dp"
android:backgroundTint="#ffffff" android:backgroundTint="@color/white"
android:clickable="true" app:srcCompat="?attr/actionModeSelectAllDrawable" android:clickable="true" app:srcCompat="?attr/actionModeSelectAllDrawable"
android:id="@+id/floatingActionButton3" app:layout_constraintBottom_toBottomOf="parent" android:id="@+id/floatingActionButton3" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="24dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="24dp"

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#f2f2f2</item>
<item name="colorPrimaryDark">#f2f2f2</item>
<item name="colorAccent">#f2f2f2</item>
<item name="android:windowBackground">@drawable/backsplash</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>

View File

@ -1,10 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#000000</color>
<color name="blue">#0066FF</color> <color name="blue">#0066FF</color>
<color name="splashblue">#4d88ff</color> <color name="ease_blue">#4d88ff</color>
<color name="cursor_blue">#3385ff</color>
<color name="text_color_highlight_v1">#b3d1ff</color>
<color name="blue_dark">#00264d</color>
<color name="blue_dark_v1">#212d45</color>
<color name="black">#000000</color>
<color name="headerblack">#212f45</color>
<color name="text_color_v1">#4d4d4d</color>
<color name="text_color_v2">#333333</color>
<color name="holo_gray">#b3b3b3</color> <color name="holo_gray">#b3b3b3</color>
<color name="header">#212f45</color> <color name="float_white">#bfbfbf</color>
<color name="button_gray">#d9d9d9</color>
<color name="white_darker">#f8f8f8</color>
<color name="white_dark">#f2f2f2</color>
<color name="white">#ffffff</color>
<color name="progress_tint">#f32323</color>
</resources> </resources>

View File

@ -6,7 +6,7 @@
<item name="colorPrimary">#f9f9f9</item> <item name="colorPrimary">#f9f9f9</item>
<item name="colorPrimaryDark">#f9f9f9</item> <item name="colorPrimaryDark">#f9f9f9</item>
<item name="colorAccent">#f9f9f9</item> <item name="colorAccent">#f9f9f9</item>
<item name="android:windowBackground">@drawable/backsplash</item> <item name="android:windowBackground">@xml/splash_gradient</item>
<item name="android:statusBarColor">#000000</item> <item name="android:statusBarColor">#000000</item>
</style> </style>

View File

@ -3,8 +3,8 @@
<item> <item>
<shape <shape
android:shape="rectangle"> android:shape="rectangle">
<stroke android:width="1px" android:color="#bfbfbf" /> <stroke android:width="1px" android:color="@color/float_white" />
<solid android:color="#ffffff" /> <solid android:color="@color/white" />
</shape> </shape>
</item> </item>
@ -12,8 +12,8 @@
<item android:top="1px" android:bottom="1px"> <item android:top="1px" android:bottom="1px">
<shape <shape
android:shape="rectangle"> android:shape="rectangle">
<stroke android:width="1px" android:color="#ffffff" /> <stroke android:width="1px" android:color="@color/white" />
<solid android:color="#ffffff" /> <solid android:color="@color/white" />
</shape> </shape>
</item> </item>

View File

@ -9,7 +9,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" > android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/> <solid android:color="@color/button_gray"/>
<corners android:radius="125dp"/> <corners android:radius="125dp"/>
</shape> </shape>
@ -23,7 +23,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" > android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/> <solid android:color="@color/button_gray"/>
<corners android:radius="125dp"/> <corners android:radius="125dp"/>
</shape> </shape>
</item> </item>
@ -36,7 +36,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" > android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/> <solid android:color="@color/button_gray"/>
<corners android:radius="125dp"/> <corners android:radius="125dp"/>
</shape> </shape>
</item> </item>
@ -48,7 +48,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" > android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/> <solid android:color="@color/button_gray"/>
<corners android:radius="125dp"/> <corners android:radius="125dp"/>
</shape> </shape>
</item> </item>

View File

@ -5,7 +5,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" > android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/> <solid android:color="@color/button_gray"/>
<corners android:radius="5dp"/> <corners android:radius="5dp"/>
</shape> </shape>
</item> </item>
@ -13,7 +13,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp"> android:shape="rectangle" android:padding="10dp">
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#ffffff"/> <solid android:color="@color/white"/>
<corners android:radius="5dp"/> <corners android:radius="5dp"/>
</shape> </shape>
</item> </item>

View File

@ -5,7 +5,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" > android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/> <solid android:color="@color/button_gray"/>
<corners android:radius="25dp"/> <corners android:radius="25dp"/>
</shape> </shape>
</item> </item>
@ -13,7 +13,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp"> android:shape="rectangle" android:padding="10dp">
<!-- you can use any color you want I used here gray color--> <!-- you can use any color you want I used here gray color-->
<solid android:color="#f2f2f2"/> <solid android:color="@color/white_dark"/>
<corners android:radius="25dp"/> <corners android:radius="25dp"/>
</shape> </shape>
</item> </item>

View File

@ -1,4 +1,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<size android:width="2dp" /> <size android:width="2dp" />
<solid android:color="#3385ff"/> <solid android:color="@color/cursor_blue"/>
</shape> </shape>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/splashblue"/> <item android:drawable="@color/ease_blue"/>
<item> <item>
<bitmap <bitmap
android:gravity="center" android:gravity="center"

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient <gradient
android:startColor="#ffffff" android:startColor="@color/black"
android:endColor="#ffffff" android:endColor="@color/black"
android:angle="90" android:angle="90"
/> />
</shape> </shape>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient <gradient
android:startColor="#4d88ff" android:startColor="@color/ease_blue"
android:endColor="#4d88ff" android:endColor="@color/ease_blue"
android:angle="135" android:angle="135"
/> />
</shape> </shape>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient <gradient
android:startColor="#000000" android:startColor="@color/white"
android:endColor="#000000" android:endColor="@color/white"
android:angle="90" android:angle="90"
/> />
</shape> </shape>

View File

@ -7,8 +7,8 @@ buildscript {
maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.fabric.io/public' }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.1' classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'io.fabric.tools:gradle:1.+' classpath 'io.fabric.tools:gradle:1.29.0'
} }
} }

View File

@ -1,6 +1,6 @@
#Sat Feb 23 18:52:38 PKT 2019 #Thu Jun 13 22:41:26 PKT 2019
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip