bug fixes

master
msmannan00 2019-05-26 16:43:13 +05:00
parent 3cb6fdf3cf
commit 16af40adfb
11 changed files with 260 additions and 76 deletions

View File

@ -44,23 +44,23 @@ android {
productFlavors { productFlavors {
arm { arm {
versionCode 131 versionCode 149
versionName "131" versionName "145"
dimension "abi" dimension "abi"
} }
aarch64 { aarch64 {
versionCode 132 versionCode 150
versionName "132" versionName "146"
dimension "abi" dimension "abi"
} }
x86_64 { x86_64 {
versionCode 135 versionCode 151
versionName "135" versionName "147"
dimension "abi" dimension "abi"
} }
x86 { x86 {
versionCode 134 versionCode 148
versionName "134" versionName "148"
dimension "abi" dimension "abi"
} }
} }
@ -77,10 +77,9 @@ android {
enable true enable true
reset() reset()
include 'arm64-v8a' include 'arm64-v8a'
//include 'x86' include 'x86'
//include 'armeabi-v7a' include 'armeabi-v7a'
//include 'x86_64' include 'x86_64'
//include 'armeabi'
universalApk true universalApk true
} }
@ -105,9 +104,9 @@ dependencies {
implementation 'com.google.android.gms:play-services-ads:17.1.1' 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-nightly-x86:68.0.20190405111221" x86Implementation "org.mozilla.geckoview:geckoview-nightly-x86:68.0.20190405111221"
//x86_64Implementation "org.mozilla.geckoview:geckoview-nightly-x86_64:68.0.20190405111221" x86_64Implementation "org.mozilla.geckoview:geckoview-nightly-x86_64:68.0.20190405111221"
//armImplementation "org.mozilla.geckoview:geckoview-nightly-armeabi-v7a:68.0.20190405111221" armImplementation "org.mozilla.geckoview:geckoview-nightly-armeabi-v7a:68.0.20190405111221"
aarch64Implementation "org.mozilla.geckoview:geckoview-nightly-arm64-v8a:68.0.20190405111221" aarch64Implementation "org.mozilla.geckoview:geckoview-nightly-arm64-v8a:68.0.20190405111221"
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9' implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'

View File

@ -0,0 +1,140 @@
package com.darkweb.genesissearchengine;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import cz.msebera.android.httpclient.HttpHost;
import android.content.Context;
import android.os.Build;
import android.util.Log;
/**
* Utility class for setting WebKit proxy used by Android WebView
*
*/
public class ProxySettings {
private static final String TAG = "GAEProxy.ProxySettings";
static final int PROXY_CHANGED = 193;
private static Object getDeclaredField(Object obj, String name) throws SecurityException,
NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
Field f = obj.getClass().getDeclaredField(name);
f.setAccessible(true);
Object out = f.get(obj);
// System.out.println(obj.getClass().getName() + "." + name + " = "+
// out);
return out;
}
public static Object getRequestQueue(Context ctx) throws Exception {
Object ret = null;
Class networkClass = Class.forName("android.webkit.Network");
if (networkClass != null) {
Object networkObj = invokeMethod(networkClass, "getInstance", new Object[] { ctx },
Context.class);
if (networkObj != null) {
ret = getDeclaredField(networkObj, "mRequestQueue");
}
}
return ret;
}
private static Object invokeMethod(Object object, String methodName, Object[] params,
Class... types) throws Exception {
Object out = null;
Class c = object instanceof Class ? (Class) object : object.getClass();
if (types != null) {
Method method = c.getMethod(methodName, types);
out = method.invoke(object, params);
} else {
Method method = c.getMethod(methodName);
out = method.invoke(object);
}
// System.out.println(object.getClass().getName() + "." + methodName +
// "() = "+ out);
return out;
}
public static void resetProxy(Context ctx) throws Exception {
Object requestQueueObject = getRequestQueue(ctx);
if (requestQueueObject != null) {
setDeclaredField(requestQueueObject, "mProxyHost", null);
}
}
private static void setDeclaredField(Object obj, String name, Object value)
throws SecurityException, NoSuchFieldException, IllegalArgumentException,
IllegalAccessException {
Field f = obj.getClass().getDeclaredField(name);
f.setAccessible(true);
f.set(obj, value);
}
/**
* Override WebKit Proxy settings
*
* @param ctx
* Android ApplicationContext
* @param host
* @param port
* @return true if Proxy was successfully set
*/
public static boolean setProxy(Context ctx, String host, int port) {
boolean ret = false;
setSystemProperties(host, port);
try {
if (Build.VERSION.SDK_INT < 14) {
Object requestQueueObject = getRequestQueue(ctx);
if (requestQueueObject != null) {
// Create Proxy config object and set it into request Q
HttpHost httpHost = new HttpHost(host, port, "http");
setDeclaredField(requestQueueObject, "mProxyHost", httpHost);
ret = true;
}
} else {
ret = setICSProxy(host, port);
}
} catch (Exception e) {
Log.e(TAG, "error setting up webkit proxying", e);
}
return ret;
}
private static boolean setICSProxy(String host, int port) throws ClassNotFoundException,
NoSuchMethodException, IllegalArgumentException, InstantiationException,
IllegalAccessException, InvocationTargetException {
Class webViewCoreClass = Class.forName("android.webkit.WebViewCore");
Class proxyPropertiesClass = Class.forName("android.net.ProxyProperties");
if (webViewCoreClass != null && proxyPropertiesClass != null) {
Method m = webViewCoreClass.getDeclaredMethod("sendStaticMessage", Integer.TYPE,
Object.class);
Constructor c = proxyPropertiesClass.getConstructor(String.class, Integer.TYPE,
String.class);
m.setAccessible(true);
c.setAccessible(true);
Object properties = c.newInstance(host, port, null);
m.invoke(null, PROXY_CHANGED, properties);
return true;
}
return false;
}
private static void setSystemProperties(String host, int port) {
System.setProperty("http.proxyHost", host);
System.setProperty("http.proxyPort", port + "");
System.setProperty("https.proxyHost", host);
System.setProperty("https.proxyPort", port + "");
}
}

View File

@ -13,7 +13,7 @@ public class admanager {
return ourInstance; return ourInstance;
} }
private InterstitialAd mInterstitialAd; private InterstitialAd mInterstitialAd;
int adCount = 0;
private admanager() { private admanager() {
} }
@ -56,10 +56,41 @@ public class admanager {
}); });
} }
public void showAd() 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(); mInterstitialAd.show();
mInterstitialAd.loadAd(new AdRequest.Builder().build()); adCount = 1;
}
else
{
if(adCount%3==0)
{
mInterstitialAd.show();
}
adCount += 1;
}
}
}
} }
} }

View File

@ -1,8 +1,11 @@
package com.darkweb.genesissearchengine; package com.darkweb.genesissearchengine;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.support.constraint.ConstraintLayout; import android.support.constraint.ConstraintLayout;
@ -77,7 +80,7 @@ public class application_controller extends AppCompatActivity
initializeBackgroundColor(); initializeBackgroundColor();
//setOrientation(); //setOrientation();
setContentView(R.layout.application_view); setContentView(R.layout.application_view);
orbot_manager.getInstance().initializeTorClient(this); //orbot_manager.getInstance().initializeTorClient(this);
initializeStatus(); initializeStatus();
initializeRunnable(); initializeRunnable();
initializeConnections(); initializeConnections();
@ -150,17 +153,17 @@ public class application_controller extends AppCompatActivity
public void initializeConnections() public void initializeConnections()
{ {
webView1 = (WebView) findViewById(R.id.pageLoader1); webView1 = findViewById(R.id.pageLoader1);
webView2 = (WebView) findViewById(R.id.pageLoader2); webView2 = findViewById(R.id.pageLoader2);
progressBar = (ProgressBar) findViewById(R.id.progressBar); progressBar = findViewById(R.id.progressBar);
requestFailure = (ConstraintLayout) findViewById(R.id.requestFailure); requestFailure = findViewById(R.id.requestFailure);
splashScreen = (ConstraintLayout) findViewById(R.id.splashScreen); splashScreen = findViewById(R.id.splashScreen);
reloadButton = (Button) findViewById(R.id.reloadButton); reloadButton = findViewById(R.id.reloadButton);
homeButton = (ImageButton) findViewById(R.id.home); homeButton = findViewById(R.id.home);
searchbar = (EditText) findViewById(R.id.search); searchbar = findViewById(R.id.search);
floatingButton = (FloatingActionButton) findViewById(R.id.floatingActionButton3); floatingButton = findViewById(R.id.floatingActionButton3);
topbar = (LinearLayout) findViewById(R.id.topbar); topbar = findViewById(R.id.topbar);
webLoader = (GeckoView) findViewById(R.id.webLoader); webLoader = findViewById(R.id.webLoader);
} }
public void initializeWebViews() public void initializeWebViews()
@ -181,6 +184,12 @@ public class application_controller extends AppCompatActivity
webLoader.setSession(session1); webLoader.setSession(session1);
session1.setProgressDelegate(new progressDelegate()); session1.setProgressDelegate(new progressDelegate());
webLoader.setVisibility(View.INVISIBLE); webLoader.setVisibility(View.INVISIBLE);
Drawable img = getResources().getDrawable( R.drawable.lock );
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, 0, 50, 31 );
searchbar.setCompoundDrawables( img, null, null, null );
} }
/*Initialization*/ /*Initialization*/
@ -203,9 +212,11 @@ public class application_controller extends AppCompatActivity
webView2.animate().setDuration(0).alpha(0f); webView2.animate().setDuration(0).alpha(0f);
progressBar.setVisibility(View.INVISIBLE); progressBar.setVisibility(View.INVISIBLE);
requestFailure.animate().setDuration(0).alpha(0.0f); requestFailure.animate().setDuration(0).alpha(0.0f);
Log.i("PROBLEM26","");
progressBar.animate().setDuration(150).alpha(0f); progressBar.animate().setDuration(150).alpha(0f);
webView1.loadUrl(constants.backendUrl);
try {Thread.sleep(100);} catch (Exception e) {}
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
loadURLAnimate(constants.backendUrl); loadURLAnimate(constants.backendUrl);
initializeViewClients(); initializeViewClients();
@ -272,6 +283,22 @@ public class application_controller extends AppCompatActivity
@Override @Override
public boolean shouldOverrideUrlLoading(WebView view, String url) public boolean shouldOverrideUrlLoading(WebView view, String url)
{ {
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()))
{ {
view.stopLoading(); view.stopLoading();
@ -463,12 +490,10 @@ class progressDelegate implements GeckoSession.ProgressDelegate
} }
datamodel.getInstance().setIsLoadingURL(true); datamodel.getInstance().setIsLoadingURL(true);
if(!isBlackPage) if(!isBlackPage && !wasBackPressed)
{ {
Log.i("HUTEES : 1","11");
searchbar.setText(url); searchbar.setText(url);
checkSSLTextColor(); checkSSLTextColor();
//initGeckoFailureHandler();
} }
if(!isBlackPage && progressBar.getVisibility() == View.INVISIBLE) if(!isBlackPage && progressBar.getVisibility() == View.INVISIBLE)
{ {
@ -480,7 +505,6 @@ class progressDelegate implements GeckoSession.ProgressDelegate
@Override @Override
public void onPageStop(GeckoSession session, boolean success) public void onPageStop(GeckoSession session, boolean success)
{ {
Log.i("STATUS-- : ",success+"");
if(!success) if(!success)
{ {
initGeckoFailureHandler(isGeckoURLLoadded); initGeckoFailureHandler(isGeckoURLLoadded);
@ -488,7 +512,6 @@ class progressDelegate implements GeckoSession.ProgressDelegate
} }
if(success) if(success)
{ {
Log.i("PROBLEM14","");
isGeckoURLLoadded = false; isGeckoURLLoadded = false;
} }
} }
@ -500,17 +523,12 @@ class progressDelegate implements GeckoSession.ProgressDelegate
{ {
geckoHandler.removeCallbacks(geckoRunnableError); geckoHandler.removeCallbacks(geckoRunnableError);
geckoHandler = null; geckoHandler = null;
Log.i("HUTEES : 4","11");
} }
if(progress>=100) if(progress>=100)
{ {
isGeckoURLLoadded = true; isGeckoURLLoadded = true;
floatingButton.animate().alpha(1); floatingButton.animate().alpha(1);
if(status.currentURL.contains("://boogle.store"))
{
admanager.getInstance().showAd();
}
if(!isLoadedUrlSet &&!isOnnionUrlHalted) if(!isLoadedUrlSet &&!isOnnionUrlHalted)
{ {
webLoader.bringToFront(); webLoader.bringToFront();
@ -521,9 +539,16 @@ class progressDelegate implements GeckoSession.ProgressDelegate
boolean isBlackPage = url.equals("about:blank"); boolean isBlackPage = url.equals("about:blank");
if(!isBlackPage && !wasBackPressed) if(!isBlackPage && !wasBackPressed)
{ {
traceUrlList.add(status.currentURL);
searchbar.setText(url);
checkSSLTextColor(); checkSSLTextColor();
traceUrlList.add(status.currentURL);
if(status.currentURL.contains("boogle.store"))
{
admanager.getInstance().showAd(true);
}
else
{
admanager.getInstance().showAd(false);
}
status.currentURL = url; status.currentURL = url;
} }
wasBackPressed=false; wasBackPressed=false;
@ -531,16 +556,10 @@ class progressDelegate implements GeckoSession.ProgressDelegate
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));; progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
isLoadedUrlSet = true; isLoadedUrlSet = true;
} }
else if(progress<100)
{
//Log.i("HUTEES : 3","11");
//initGeckoFailureHandler();
}
if(progress>=100) if(progress>=100)
{ {
datamodel.getInstance().setIsLoadingURL(false); datamodel.getInstance().setIsLoadingURL(false);
} }
//handler.removeCallbacks(geckoRunnable);
} }
@Override @Override
@ -619,6 +638,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
searchbar.setText("https://genesis.onion"); searchbar.setText("https://genesis.onion");
checkSSLTextColor(); checkSSLTextColor();
status.currentURL="https://boogle.store"; status.currentURL="https://boogle.store";
traceUrlList.clear();
progressBar.setAlpha(0f); progressBar.setAlpha(0f);
progressBar.setVisibility(View.VISIBLE); progressBar.setVisibility(View.VISIBLE);
Log.i("PROBLEM18",""); Log.i("PROBLEM18","");
@ -759,13 +779,11 @@ class progressDelegate implements GeckoSession.ProgressDelegate
} }
else else
{ {
if(orbot_manager.getInstance().reinitOrbot(this)) if(orbot_manager.getInstance().reinitOrbot(this) && progressBar.getAlpha()==0)
{ {
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
status.currentURL = traceUrlList.peek().toString(); status.currentURL = traceUrlList.peek().toString();
String prevURL = traceUrlList.pop().toString(); traceUrlList.pop().toString();
boolean init_status=orbot_manager.getInstance().reinitOrbot(application_controller.this); boolean init_status=orbot_manager.getInstance().reinitOrbot(application_controller.this);
//isOnnionUrlHalted = true;
if(init_status) if(init_status)
{ {
searchbar.setText(status.currentURL.replaceAll("boogle.store","genesis.onion")); searchbar.setText(status.currentURL.replaceAll("boogle.store","genesis.onion"));
@ -774,13 +792,7 @@ class progressDelegate implements GeckoSession.ProgressDelegate
progressBar.setVisibility(View.VISIBLE); progressBar.setVisibility(View.VISIBLE);
wasBackPressed = true; wasBackPressed = true;
requestFailure.animate().alpha(0); requestFailure.animate().alpha(0);
session1.goBack(); session1.loadUri(status.currentURL);
}
else
{
session1.stop();
session1.close();
orbot_manager.getInstance().reinitOrbot(application_controller.this);
} }
} }
} }

View File

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

View File

@ -21,10 +21,10 @@ public class message_manager {
{ {
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context) CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT) .setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT)
.setTitle("DeepWeb Gateway | Welcome") .setTitle("Welcome | Deep Web Gateway")
.setBackgroundColor(Color.argb(230,33,45,69)) .setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,0,38,77)) .setTextColor(Color.argb(255,0,38,77))
.setMessage("\nWelcome to DeepWeb | Darkweb Gateway. This application provide you a platform to Search and Open DarkWeb 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") .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) -> { .addButton("Deep Web Online Market", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss(); dialog.dismiss();
@ -36,7 +36,7 @@ public class message_manager {
controller.initializePopupView("https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all"); 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"); controller.loadURLAnimate("https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all");
}) })
.addButton("Darkweb News and Articles", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> { .addButton("Dark Web News and Articles", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss(); dialog.dismiss();
controller.initializePopupView("https://boogle.store/search?q=latest%20news&p_num=1&s_type=news"); 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"); controller.loadURLAnimate("https://boogle.store/search?q=latest%20news&p_num=1&s_type=news");
@ -76,7 +76,7 @@ public class message_manager {
{ {
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context) CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET) .setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Darkweb URL | Invalid URL") .setTitle("Dark Web URL | Invalid URL")
.setBackgroundColor(Color.argb(230,33,45,69)) .setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255)) .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") .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")
@ -110,7 +110,7 @@ public class message_manager {
{ {
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context) CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET) .setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Darkweb URL | Invalid") .setTitle("Dark Web URL | Invalid")
.setBackgroundColor(Color.argb(230,33,45,69)) .setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255)) .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") .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")
@ -128,7 +128,7 @@ public class message_manager {
.setTitle("URL Reported Successfully") .setTitle("URL Reported Successfully")
.setBackgroundColor(Color.argb(230,33,45,69)) .setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255)) .setTextColor(Color.argb(255,255,255,255))
.setMessage("URL has been succuessfully repotorted. It will take about a week to completely remove this website from our server\n") .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) -> { .addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss(); dialog.dismiss();
}); });
@ -140,7 +140,7 @@ public class message_manager {
{ {
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context) CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET) .setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Report URL | "+status.currentURL.substring(0,status.currentURL.indexOf(".onion"))) .setTitle("Report This Website")
.setBackgroundColor(Color.argb(230,33,45,69)) .setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255)) .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") .setMessage("If you think url is illegal or disturbing report us so that we can update our database\n")
@ -162,7 +162,7 @@ public class message_manager {
{ {
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context) CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET) .setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle("Initializing Darkweb") .setTitle("Initializing Dark Web")
.setBackgroundColor(Color.argb(230,33,45,69)) .setBackgroundColor(Color.argb(230,33,45,69))
.setTextColor(Color.argb(255,255,255,255)) .setTextColor(Color.argb(255,255,255,255))
.setMessage("Please wait! While we connect you to hidden web. This might take few seconds\n") .setMessage("Please wait! While we connect you to hidden web. This might take few seconds\n")

View File

@ -13,6 +13,7 @@ public class orbot_manager {
boolean isOrbotRunning = false; boolean isOrbotRunning = false;
boolean isLoading = false; boolean isLoading = false;
OnionProxyManager onionProxyManager = null; OnionProxyManager onionProxyManager = null;
Context applicationContext = null;
public static orbot_manager getInstance() { public static orbot_manager getInstance() {
return ourInstance; return ourInstance;
@ -37,6 +38,7 @@ public class orbot_manager {
public void restartOrbot(Context applicationContext) public void restartOrbot(Context applicationContext)
{ {
this.applicationContext = applicationContext;
isOrbotRunning = false; isOrbotRunning = false;
status.isTorInitialized = false; status.isTorInitialized = false;
if(onionProxyManager!=null) if(onionProxyManager!=null)
@ -132,6 +134,7 @@ public class orbot_manager {
PrefsHelper.setPref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0"); 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.enabled",false);
PrefsHelper.setPref("privacy.donottrackheader.value",1); PrefsHelper.setPref("privacy.donottrackheader.value",1);
ProxySettings.setProxy(applicationContext, "127.0.0.1", status.port);
} }

View File

@ -3,8 +3,8 @@
<item <item
android:drawable="@drawable/lock" android:drawable="@drawable/lock"
android:width="26dp" android:width="5dp"
android:height="16dp" android:height="5dp"
/> />
</layer-list > </layer-list >

View File

@ -132,7 +132,6 @@
android:textColor="#333333" android:textColor="#333333"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:drawableLeft="@drawable/lockstyle"
android:paddingRight="15dp" android:paddingRight="15dp"
android:textColorHighlight="#b3d1ff" android:textColorHighlight="#b3d1ff"
android:background="@drawable/searchbar" android:background="@drawable/searchbar"

View File

@ -132,7 +132,6 @@
android:textColor="#333333" android:textColor="#333333"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:drawableLeft="@drawable/lockstyle"
android:paddingRight="15dp" android:paddingRight="15dp"
android:textColorHighlight="#b3d1ff" android:textColorHighlight="#b3d1ff"
android:background="@drawable/searchbar" android:background="@drawable/searchbar"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB