update to version 0.0.5

master
Chris Baughman 2014-02-08 20:40:02 -05:00
parent 58fcdf416b
commit a0bc2ecec1
19 changed files with 131 additions and 15 deletions

8
assets/info.txt Normal file
View File

@ -0,0 +1,8 @@
<h3>Google Dorks</h3>
Version 0.5<br />
Copyright 2014<br />
<b>http://cmbaughman.com</b><br /><br />

4
assets/legal.txt Normal file
View File

@ -0,0 +1,4 @@
All rights reserved. Not liable for any damage incurred from
use of this software including but not limited to: monetary loss,
temporary paralysis, halitosis, spontaneous combustion,
road rash, and or premature hair loss.

BIN
res/drawable-hdpi/cube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

BIN
res/drawable/cube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

30
res/layout/about.xml Normal file
View File

@ -0,0 +1,30 @@
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="*">
<TableRow>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cube"
android:layout_gravity="left|center"/>
<TextView
android:id="@+id/info_text"
android:gravity="center"
android:layout_gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/legal_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="8dip"
android:textStyle="italic"
android:layout_span="2"
android:layout_margin="8dip"
android:textColor="#cccccc" />
</TableRow>
</TableLayout>

View File

@ -7,17 +7,15 @@
android:title="@string/action_refresh"
android:showAsAction="ifRoom" />
<!-- Location Found -->
<item android:id="@+id/action_help"
android:icon="@drawable/ic_action_help"
android:title="@string/action_help"
android:showAsAction="ifRoom" />
<!-- Search / will display always -->
<item android:id="@+id/action_share"
android:icon="@drawable/ic_action_share"
android:title="@string/action_share"
android:showAsAction="ifRoom"/>
<!-- Location Found -->
<item android:id="@+id/action_location_found"
android:icon="@drawable/ic_action_location_found"
android:title="@string/action_location_found"
android:showAsAction="ifRoom" />
</menu>

8
res/raw/info.txt Normal file
View File

@ -0,0 +1,8 @@
<h4>Google Dorks</h4>
Version 0.5<br />
Copyright 2014<br />
<b>http://cmbaughman.com</b><br /><br />

4
res/raw/legal.txt Normal file
View File

@ -0,0 +1,4 @@
All rights reserved. Not liable for any damage incurred from
use of this software including but not limited to: monetary loss,
temporary paralysis, halitosis, spontaneous combustion,
road rash, and or premature hair loss.

View File

@ -14,6 +14,9 @@
<item>Online Shopping Info</item>
</string-array>
<string name="action_search">Search</string>
<string name="action_location_found">Location</string>
<string name="action_help">Help</string>
<string name="action_refresh">Refresh</string>
<string name="action_about">About</string>
<string name="action_share">Share</string>
</resources>

View File

@ -16,6 +16,8 @@ public class MainActivity extends Activity
Spinner catSpin;
ListView listV;
final GetGoogleDorks dorks = new GetGoogleDorks();
final public int ABOUT = 0;
ArrayAdapter<String> adapter;
List<String> list= null;
@ -106,14 +108,16 @@ public class MainActivity extends Activity
public boolean onOptionsItemSelected(MenuItem item) {
// Take appropriate action for each action item click
switch (item.getItemId()) {
case R.id.action_search:
case R.id.action_refresh:
// search action
return true;
case R.id.action_location_found:
case R.id.action_help:
// location found
LocationFound();
ShowHelp sh = new ShowHelp(this);
sh.setTitle("About Google Dorks by CMB");
sh.show();
return true;
case R.id.action_refresh:
case R.id.action_share:
// refresh
return true;
default:
@ -124,8 +128,8 @@ public class MainActivity extends Activity
/**
* Launching new activity
* */
private void LocationFound() {
Intent i = new Intent(MainActivity.this, LocationFound.class);
private void ShowShare() {
Intent i = new Intent(MainActivity.this, ShowHelp.class);
startActivity(i);
}
}

View File

@ -0,0 +1,57 @@
package com.cmb.googledorks;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.text.util.Linkify;
import android.graphics.Color;
import android.widget.TextView;
import android.content.res.*;
public class ShowHelp extends Dialog
{
private static Context mContext= null;
public ShowHelp(Context ctx) {
super(ctx);
mContext = ctx;
}
@Override
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.about);
TextView tv = (TextView)findViewById(R.id.legal_text);
tv.setText(readRawTextFile(R.raw.legal));
tv = (TextView)findViewById(R.id.info_text);
tv.setText(Html.fromHtml(readRawTextFile(R.raw.info)));
tv.setLinkTextColor(Color.WHITE);
Linkify.addLinks(tv, Linkify.ALL);
}
public static String readRawTextFile(int id) {
InputStream inputStream = mContext.getResources().openRawResource(id);
InputStreamReader in = new InputStreamReader(inputStream);
BufferedReader buf = new BufferedReader(in);
String line;
StringBuilder text = new StringBuilder();
try {
while (( line = buf.readLine()) != null) text.append(line);
} catch (IOException e) {
return null;
}
return text.toString();
}
}