김예미

소스코드

Showing 326 changed files with 4841 additions and 0 deletions
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.dataextraction"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
implementation group: 'io.socket', name: 'socket.io-client', version: '1.0.0'
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.example.dataextraction;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.dataextraction", appContext.getPackageName());
}
}
package com.forensic_tool.android;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.dataextraction", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.dataextraction">
<uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".LoadingActivity"></activity>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.example.dataextraction;
import android.provider.BaseColumns;
public final class AudioDataBase {
public static final class CreateDB implements BaseColumns {
public static final String TITLE = "title";
public static final String DATE_ADDED = "date_added";
public static final String MIME_TYPE = "mime_type";
public static final String PATH = "path";
public static final String ALBUM = "album";
public static final String ARTIST = "artist";
public static final String COMPOSER = "composer";
public static final String YEAR = "year";
; public static final String SIZE = "size";
public static final String _TABLENAME0 = "audio";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+TITLE+" text not null primary key , "
+DATE_ADDED + " text not null ,"
+MIME_TYPE + " text not null ,"
+PATH + " text not null ,"
+ALBUM + " text, "
+ARTIST+ " text, "
+COMPOSER+" text, "
+YEAR+" text, "
+SIZE+" text);";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public final class CalendarDataBase {
public static final class CreateDB implements BaseColumns {
public static final String CALENDAR_ID = "calendar_id";
public static final String TITLE = "title";
public static final String EVENT_LOCATION = "event_location";
public static final String DESCRIPTION = "description";
public static final String DTSTART = "dtstart";
public static final String DTEND = "dtend";
public static final String DURATION = "duration";
public static final String ALL_DAY = "all_day";
public static final String DISPLAY_NAME = "display_name";
public static final String ACCOUNT_NAME = "account_name";
public static final String OWNER_NAME = "owner_name";
public static final String RRULE = "rrlue";
public static final String RDATE = "rdate";
public static final String _TABLENAME0 = "calendar";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+ " id integer primary key autoincrement, "
+TITLE+" text not null , "
+CALENDAR_ID + " text not null, "
+EVENT_LOCATION + " text , "
+DESCRIPTION + " text, "
+DTSTART + " text not null, "
+DTEND + " text not null, "
+DURATION+ " text , "
+ALL_DAY + " text, "
+DISPLAY_NAME + " text not null, "
+ACCOUNT_NAME + " text not null, "
+OWNER_NAME+ " text not null, "
+RRULE + " text, "
+RDATE + " text );";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public class CallLogDataBase {
public static final class CreateDB implements BaseColumns {
public static final String ID = "id";
public static final String TYPE = "type";
public static final String NAME = "name";
public static final String NUMBER = "number";
public static final String DURATION = "duration";
public static final String DATE = "date";
public static final String _TABLENAME0 = "calllog";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+ID+" INTEGER PRIMARY KEY autoincrement, "
+TYPE+" integer,"
+NAME + " text,"
+NUMBER + " text,"
+DURATION + " integer,"
+DATE + " text);";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public class ContactDataBase {
public static final class CreateDB implements BaseColumns {
public static final String NUMBER = "number";
public static final String NAME = "name";
public static final String PHOTO_ID = "photo_id";
public static final String PERSON_ID = "person_id";
public static final String _TABLENAME0 = "contact";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+NUMBER+" text not null primary key, "
+NAME+" text,"
+PHOTO_ID + " integer,"
+PERSON_ID + " integer);";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
import java.lang.reflect.Field;
//데이터베이스 클래스
public final class Databases {
private Databases() {}
public static final class CreateDB_Document implements BaseColumns {
public static final String TABLE_NAME = "DocumentInfo";
public static final String NAME = "name";
public static final String TITLE = "title";
public static final String DATE_ADDED = "date_added";
public static final String DATE_MODIFIED = "date_modified";
public static final String MIME_TYPE = "mime_type";
public static final String PATH = "path";
public static final String SIZE = "size";
public static final String _CREATE_Document = "create table if not exists "+TABLE_NAME+"("
+NAME+" text not null primary key, "
+TITLE+" text not null , "
+MIME_TYPE+" text not null , "
+DATE_ADDED+" timestamp not null , "
+DATE_MODIFIED+" timestamp not null , "
+PATH+" text not null , "
+SIZE+" text not null);";
}
public static final class CreateDB_App implements BaseColumns {
public static final String TABLE_NAME = "AppInfo";
public static final String PACKAGENAME = "packagename";
public static final String VERSION = "version";
public static final String NAME = "name";
public static final String FIRSTINSTALL = "firstinstall";
public static final String LASTUPDATE = "lastupdate";
public static final String WIFIUSAGE = "wifiusage";
public static final String CELLULARUSAGE = "cellularusage";
public static final String USAGETIME = "usagetime";
public static final String _CREATE_AppInfo = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null primary key, "
+VERSION+" text not null , "
+NAME+" text not null , "
+FIRSTINSTALL+" timestamp not null , "
+LASTUPDATE+" timestamp not null , "
+WIFIUSAGE+" bigint not null , "
+CELLULARUSAGE+" bigint not null);";
}
public static final class CreateDB_AppUsage_YEAR implements BaseColumns {
public static final String TABLE_NAME = "AppUsageYear";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_YEAR = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AppUsage_MONTH implements BaseColumns {
public static final String TABLE_NAME = "AppUsageMonth";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_MONTH = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AppUsage_WEEK implements BaseColumns {
public static final String TABLE_NAME = "AppUsageWeek";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_WEEK = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AppUsage_DAY implements BaseColumns {
public static final String TABLE_NAME = "AppUsageDay";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_DAY = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AccountInfo implements BaseColumns {
public static final String TABLE_NAME = "AccountInfo";
public static final String ACCOUNTNAME = "accountname";
public static final String ACCOUNTTYPE = "accounttype";
public static final String _CREATE_AccountInfo = "create table if not exists "+TABLE_NAME+"("
+ACCOUNTNAME+" text not null , "
+ACCOUNTTYPE+" text not null , primary key(" + ACCOUNTNAME + "," + ACCOUNTTYPE + ")) ";
}
public static final class CreateDB_PhoneInfo implements BaseColumns {
public static final String TABLE_NAME = "PhoneInfo";
public static final String PHONETYPE = "phonetype";
public static final String SOFTWARENUMBER = "softwarenumber";
public static final String PHONENUMBER = "phonenumber";
public static final String SUBSCRIBERID = "subscriberid";
public static final String ADID = "adid";
public static final String CALLSTATE = "callstate";
public static final String DATASTATE = "datastate";
public static final String NETWORKTYPE = "networktype";
public static final String NETWORKCOUNTRYISO = "networkcountryiso";
public static final String SIMCOUNTRYISO = "simcountryiso";
public static final String NETWORKOPERATER = "networkoperater";
public static final String SIMOPERATOR = "simoperator";
public static final String NETWORKOPERATORNAME = "networkoperatorname";
public static final String SIMOPERATORNAME = "simoperatorname";
public static final String SIMSERIALNUMBER = "simserialnumber";
public static final String SIMSTATE = "simstate";
public static final String ISNETWORKROMING = "isnetworkroming";
public static final String _CREATE_PhoneInfo = "create table if not exists "+TABLE_NAME+"("
+PHONETYPE+" int not null primary key, "
+SOFTWARENUMBER+" text , "
+PHONENUMBER+" text , "
+SUBSCRIBERID+" text , "
+ADID+" text , "
+CALLSTATE+" int , "
+DATASTATE+" int , "
+NETWORKTYPE+" int , "
+NETWORKCOUNTRYISO+" text , "
+SIMCOUNTRYISO+" text , "
+NETWORKOPERATER+" text , "
+SIMOPERATOR+" text , "
+NETWORKOPERATORNAME+" text , "
+SIMOPERATORNAME+" text , "
+SIMSERIALNUMBER+" text , "
+SIMSTATE+" int , "
+ISNETWORKROMING +" bool ) ";
}
}
package com.example.dataextraction;
import androidx.appcompat.app.AppCompatActivity;
import android.Manifest;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import com.google.gson.JsonObject;
import org.json.JSONException;
import org.json.JSONObject;
import io.socket.client.IO;
import io.socket.client.Socket;
public class MainActivity extends AppCompatActivity {
String[] permission_list = {
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_CALENDAR,
Manifest.permission.ACCESS_NETWORK_STATE,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.READ_PHONE_STATE,
Manifest.permission.GET_ACCOUNTS,
Manifest.permission.READ_CONTACTS,
Manifest.permission.READ_CALL_LOG,
Manifest.permission.READ_PHONE_NUMBERS,
Manifest.permission.READ_CONTACTS,
Manifest.permission.READ_CALL_LOG,
Manifest.permission.READ_SMS,
Manifest.permission.ACCESS_WIFI_STATE
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
AppOpsManager appOps = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);
int mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS, android.os.Process.myUid(), getPackageName());
boolean granted = (mode == AppOpsManager.MODE_ALLOWED);
if (granted == false)
{
Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);
startActivity(intent);
}
checkPermission();
Intent intent = new Intent(this, LoadingActivity.class);
startActivity(intent);
}
public void checkPermission(){
//현재 안드로이드 버전이 6.0미만이면 메서드를 종료한다.
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
return;
for(String permission : permission_list){
//권한 허용 여부를 확인한다.
int chk = checkCallingOrSelfPermission(permission);
if(chk == PackageManager.PERMISSION_DENIED){
//권한 허용을여부를 확인하는 창을 띄운다
requestPermissions(permission_list,0);
}
}
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public final class MobileNetworkDataBase {
public static final class CreateDB implements BaseColumns{
public static final String NET_ID = "net_id";
public static final String DOMAIN = "domain";
public static final String INTERFACE_NAME = "interface_name";
public static final String HOST_ADDRESS = "host_address";
public static final String PREFIX_LENGTH = "prefix_length";
public static final String DESTINATION = "destination";
public static final String D_PREFIX = "d_prefix";
public static final String GATEWAY = "gateway";
public static final String _TABLENAME0 = "network_info";
public static final String _TABLENAME1 = "inetAddress";
public static final String _TABLENAME2 = "linkAddress";
public static final String _TABLENAME3 = "routeinfo";
public static final String _CREATE0 = "create table if not exists "
+_TABLENAME0 + " ( "
+NET_ID + " text not null, "
+DOMAIN + " text, "
+INTERFACE_NAME+ " text); ";
public static final String _CREATE1 = "create table if not exists "
+_TABLENAME1 + " ( "
+NET_ID + " text not null, "
+HOST_ADDRESS + " text not null, "
+" constraint net_id_fk foreign key(net_id) references network_info);";
public static final String _CREATE2 = "create table if not exists "
+_TABLENAME2 + " ( "
+NET_ID + " text not null, "
+HOST_ADDRESS + " text not null, "
+PREFIX_LENGTH+ " integer not null, "
+" constraint net_id_fk foreign key(net_id) references network_info);";
public static final String _CREATE3 = "create table if not exists "
+_TABLENAME3+ " ( "
+NET_ID+ " text not null, "
+DESTINATION + " text not null, "
+D_PREFIX + " integer not null, "
+GATEWAY+ " text not null, "
+INTERFACE_NAME + " text , "
+" constraint net_id_fk foreign key(net_id) references network_info);";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public final class PhotoDataBase {
public static final class CreateDB implements BaseColumns {
public static final String TITLE = "title";
public static final String ID = "id";
public static final String DATE_ADDED = "date_added";
public static final String DISPLAY_NAME = "display_name";
public static final String MIME_TYPE = "mime_type";
public static final String PATH = "path";
public static final String LATITUDE = "latitude";
public static final String LONGITUDE = "longitude";
public static final String SIZE = "size";
public static final String _TABLENAME0 = "photo";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+TITLE+" text not null primary key, "
+ID+" integer not null , "
+DATE_ADDED + " text not null,"
+DISPLAY_NAME + " text not null,"
+MIME_TYPE + " text not null,"
+PATH + " text not null,"
+LATITUDE + " text,"
+LONGITUDE + " text,"
+SIZE + " text);";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public class SMSDataBase {
public static final class CreateDB implements BaseColumns {
public static final String MID = "mid";
public static final String TID = "tid";
public static final String TYPE = "type";
public static final String ADDRESS = "address";
public static final String PERSON = "person";
public static final String CREATOR = "creator";
public static final String DATE = "date";
public static final String BODY = "body";
public static final String READ_C = "read_c";
public static final String _TABLENAME0 = "sms";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+MID+" integer not null primary key, "
+TID+" integer,"
+TYPE + " integer,"
+ADDRESS+" text,"
+PERSON + " text,"
+CREATOR+" text,"
+DATE + " text,"
+BODY + " text,"
+READ_C + " integer);";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public final class VideoDataBase {
public static final class CreateDB implements BaseColumns {
public static final String ALBUM = "album";
public static final String ARTIST = "artist";
public static final String BOOKMARK = "bookmark";
public static final String CATEGORY = "category";
public static final String DESCRIPTION = "description";
public static final String LANGUAGE = "language";
public static final String LATITUDE = "latitude";
public static final String LONGITUDE = "longitude";
public static final String RESOLUTION = "resolution";
public static final String PATH = "path";
public static final String TAGS = "tags";
public static final String DATE_ADDED = "date_added";
public static final String DISPLAY_NAME = "display_name";
public static final String MIME_TYPE = "mime_type";
public static final String TITLE = "title";
public static final String SIZE = "size";
public static final String _TABLENAME0 = "video";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+TITLE+" text not null primary key, "
+DATE_ADDED + " text not null ,"
+DISPLAY_NAME + " text not null ,"
+MIME_TYPE + " text not null ,"
+PATH + " text not null ,"
+LATITUDE + " text ,"
+LONGITUDE + " text,"
+ALBUM+ " text, "
+ARTIST+ " text, "
+BOOKMARK+ " text, "
+CATEGORY + " text, "
+DESCRIPTION + " text, "
+LANGUAGE +" text, "
+RESOLUTION + " text, "
+TAGS + " text, "
+SIZE+" text);";
}
}
package com.example.dataextraction;
import android.provider.BaseColumns;
public class WifiDataBase {
public static final class CreateDB implements BaseColumns {
public static final String ID = "id";
public static final String SSID = "ssid";
public static final String BSSID = "bssid";
public static final String WEPKEYS = "wepkeys";
public static final String _TABLENAME0 = "wifi";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+ID+" integer not null primary key, "
+SSID+" text,"
+BSSID + " text,"
+WEPKEYS + " text);";
}
}
package com.example.dataextraction;
public class audioItem {
String album, artist,composer,contentType, year, path, date_added,
MIME_TYPE,size,title;
public String getAlbum() {
return album;
}
public String getArtist(){
return artist;
}
public String getComposer(){
return composer;
}
public String getContentType(){
return contentType;
}
public String getYear(){
return year;
}
public String getPath(){
return path;
}
public String getDate_added(){
return date_added;
}
public String getMIME_TYPE(){
return MIME_TYPE;
}
public String getSize(){
return size;
}
public String getTitle() {
return title;
}
public void setPath(String path) {
this.path = path;
}
public void setArtist(String artist) {
this.artist = artist;
}
public void setDate_added(String date_added) {
this.date_added = date_added;
}
public void setAlbum(String album) {
this.album = album;
}
public void setComposer(String composer) {
this.composer = composer;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public void setMIME_TYPE(String MIME_TYPE) {
this.MIME_TYPE = MIME_TYPE;
}
public void setSize(String size) {
this.size = size;
}
public void setYear(String year) {
this.year = year;
}
public void setTitle(String title) {
this.title = title;
}
}
package com.example.dataextraction;
import android.os.Parcel;
import android.os.Parcelable;
public class calendarItem implements Parcelable {
String calID, displayName, accountName, ownerName, title, loc, desc, dtstart,
dtend, duration, allday, rrule, rdate;
public calendarItem(){}
public calendarItem(Parcel in){
this.calID=in.readString();
this.displayName=in.readString();
this.accountName=in.readString();
this.ownerName=in.readString();
this.title=in.readString();
this.loc=in.readString();
this.desc=in.readString();
this.dtstart=in.readString();
this.dtend=in.readString();
this.duration=in.readString();
this.allday=in.readString();
this.rrule=in.readString();
this.rdate=in.readString();
}
public String getCalID() {
return calID;
}
public String getDisplayName() {
return displayName;
}
public String getAccountName() {
return accountName;
}
public String getOwnerName() {
return ownerName;
}
public String getTitle() {
return title;
}
public String getLoc() {
return loc;
}
public String getDesc() {
return desc;
}
public String getDtstart() {
return dtstart;
}
public String getDtend() {
return dtend;
}
public String getDuration() {
return duration;
}
public String getAllday() {
return allday;
}
public String getRrule() {
return rrule;
}
public String getRdate() {
return rdate;
}
public void setCalID(String calID) {
this.calID = calID;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
public void setDesc(String desc) {
this.desc = desc;
}
public void setDtend(String dtend) {
this.dtend = dtend;
}
public void setDtstart(String dtstart) {
this.dtstart = dtstart;
}
public void setAllday(String allday) {
this.allday = allday;
}
public void setDuration(String duration) {
this.duration = duration;
}
public void setLoc(String loc) {
this.loc = loc;
}
public void setTitle(String title) {
this.title = title;
}
public void setRdate(String rdate) {
this.rdate = rdate;
}
public void setRrule(String rrule) {
this.rrule = rrule;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.calID);
dest.writeString(this.displayName);
dest.writeString(this.accountName);
dest.writeString(this.ownerName);
dest.writeString(this.title);
dest.writeString(this.loc);
dest.writeString(this.desc);
dest.writeString(this.dtstart);
dest.writeString(this.dtend);
dest.writeString(this.duration);
dest.writeString(this.allday);
dest.writeString(this.rrule);
dest.writeString(this.rdate);
}
@SuppressWarnings("rawtypes")
public static final Creator CREATOR = new Creator() {
@Override
public calendarItem createFromParcel(Parcel in) {
return new calendarItem(in);
}
@Override
public calendarItem[] newArray(int size) {
// TODO Auto-generated method stub
return new calendarItem[size];
}
};
}
package com.example.dataextraction;
import android.content.ContentValues;
import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class networkDBHelper {
private static final String DATABASE_NAME = "networkDatabase.db";
private static final int DATABASE_VERSION = 1;
public static SQLiteDatabase mDB;
private networkDBHelper.DatabaseHelper mDBHelper;
private Context mCtx;
private class DatabaseHelper extends SQLiteOpenHelper {
public DatabaseHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE0);
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE1);
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE2);
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE3);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME0);
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME1);
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME2);
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME3);
onCreate(db);
}
}
public networkDBHelper(Context context){
this.mCtx = context;
}
public networkDBHelper open() throws SQLException {
mDBHelper = new networkDBHelper.DatabaseHelper(mCtx, DATABASE_NAME, null, DATABASE_VERSION);
mDB = mDBHelper.getWritableDatabase();
return this;
}
public void close(){
mDB.close();
}
public long insertColumn0(String id, String domain, String interface_name){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.DOMAIN, domain);
values.put(MobileNetworkDataBase.CreateDB.INTERFACE_NAME, interface_name);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME0, null, values);
}
public long insertColumn1(String id, String address){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.HOST_ADDRESS, address);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME1, null, values);
}
public long insertColumn2(String id, String address, int prefix){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.HOST_ADDRESS, address);
values.put(MobileNetworkDataBase.CreateDB.PREFIX_LENGTH, prefix);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME2, null, values);
}
public long insertColumn3(String id, String dest, int prefix, String gateway, String interface_name){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.DESTINATION, dest);
values.put(MobileNetworkDataBase.CreateDB.D_PREFIX, prefix);
values.put(MobileNetworkDataBase.CreateDB.GATEWAY, gateway);
values.put(MobileNetworkDataBase.CreateDB.INTERFACE_NAME, interface_name);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME3, null, values);
}
public void deleteAllRows(){
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME0, null, null);
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME1, null, null);
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME2, null, null);
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME3, null, null);
}
}
package com.example.dataextraction;
import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;
public class photoItem implements Parcelable {
private int id;
private String latitude, longitude,title,displayName,type,date,path;
private byte bytes[];
private Bitmap bitmap;
public photoItem() {
latitude = null;
longitude = null;
}
public photoItem(Parcel in) {
this.id = in.readInt();
this.latitude = in.readString();
this.longitude = in.readString();
this.title = in.readString();
this.displayName = in.readString();
this.type = in.readString();
this.date = in.readString();
this.path = in.readString();
//this.bytes = in.createByteArray();
}
public String getLatitude(){
return latitude;
}
public String getLongitude(){
return longitude;
}
public String getTitle(){
return title;
}
public int getId(){
return id;
}
public String getDisplayName(){
return displayName;
}
public String getType(){
return type;
}
public String getDate(){
return date;
}
public String getPath() {
return path;
}
public byte[] getBytes(){
return bytes;
}
public Bitmap getBitmap(){
return bitmap;
}
public void setLatitude(String lat){
latitude = lat;
}
public void setLongitude(String longt){
longitude = longt;
}
public void setTitle(String _t){
title = _t;
}
public void setId(int _id){
id = _id;
}
public void setDisplayName(String name){
displayName = name;
}
public void setType(String _type){
type = _type;
}
public void setDate(String d){
date = d;
}
public void setPath(String p){
path = p;
}
public void setBytes(byte[] b){
bytes = b;
}
public void setBitmap(Bitmap b){
bitmap = b;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.id);
dest.writeString(this.latitude);
dest.writeString(this.longitude);
dest.writeString(this.title);
dest.writeString(this.displayName);
dest.writeString(this.type);
dest.writeString(this.date);
dest.writeString(this.path);
//dest.writeByteArray(this.bytes);
}
@SuppressWarnings("rawtypes")
public static final Creator CREATOR = new Creator() {
@Override
public photoItem createFromParcel(Parcel in) {
return new photoItem(in);
}
@Override
public photoItem[] newArray(int size) {
// TODO Auto-generated method stub
return new photoItem[size];
}
};
}
package com.example.dataextraction;
import android.os.Parcel;
import android.os.Parcelable;
public class videoItem implements Parcelable {
String album, artist, bookmark, category, description, language
, latitude, longitude, resolution, tags, path, date_added
,display_Name, MIME_type,title;
public videoItem(){}
public videoItem(Parcel in) {
this.album = in.readString();
this.artist = in.readString();
this.bookmark = in.readString();
this.category = in.readString();
this.description = in.readString();
this.latitude = in.readString();
this.longitude = in.readString();
this.resolution = in.readString();
this.tags = in.readString();
this.path = in.readString();
this.date_added = in.readString();
this.display_Name = in.readString();
this.MIME_type = in.readString();
}
public String getAlbum() {
return album;
}
public String getArtist() {
return artist;
}
public String getBookmark() {
return bookmark;
}
public String getCategory() {
return category;
}
public String getDescription() {
return description;
}
public String getLanguage(){
return language;
}
public String getLongitude(){
return longitude;
}
public String getResolution() {
return resolution;
}
public String getPath() {
return path;
}
public String getTags() {
return tags;
}
public String getLatitude() {
return latitude;
}
public String getDate_added() {
return date_added;
}
public String getDisplay_Name() {
return display_Name;
}
public String getMIME_type() {
return MIME_type;
}
public String getTitle() {
return title;
}
public void setAlbum(String album) {
this.album = album;
}
public void setArtist(String artist) {
this.artist = artist;
}
public void setBookmark(String bookmark) {
this.bookmark = bookmark;
}
public void setCategory(String category) {
this.category = category;
}
public void setDescription(String description) {
this.description = description;
}
public void setLanguage(String language) {
this.language = language;
}
public void setDate_added(String date_added) {
this.date_added = date_added;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public void setDisplay_Name(String display_Name) {
this.display_Name = display_Name;
}
public void setMIME_type(String MIME_type) {
this.MIME_type = MIME_type;
}
public void setPath(String path) {
this.path = path;
}
public void setResolution(String resolution) {
this.resolution = resolution;
}
public void setTags(String tags) {
this.tags = tags;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.album);
dest.writeString(this.artist);
dest.writeString(this.bookmark);
dest.writeString(this.category);
dest.writeString(this.description);
dest.writeString(this.language);
dest.writeString(this.latitude);
dest.writeString(this.longitude);
dest.writeString(this.resolution);
dest.writeString(this.tags);
dest.writeString(this.path);
dest.writeString(this.date_added);
dest.writeString(this.display_Name);
dest.writeString(this.MIME_type);
}
@SuppressWarnings("rawtypes")
public static final Creator CREATOR = new Creator() {
@Override
public videoItem createFromParcel(Parcel in) {
return new videoItem(in);
}
@Override
public videoItem[] newArray(int size) {
// TODO Auto-generated method stub
return new videoItem[size];
}
};
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public final class AudioDataBase {
public static final class CreateDB implements BaseColumns {
public static final String TITLE = "title";
public static final String DATE_ADDED = "date_added";
public static final String MIME_TYPE = "mime_type";
public static final String PATH = "path";
public static final String ALBUM = "album";
public static final String ARTIST = "artist";
public static final String COMPOSER = "composer";
public static final String YEAR = "year";
; public static final String SIZE = "size";
public static final String _TABLENAME0 = "audio";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+TITLE+" text not null primary key , "
+DATE_ADDED + " text not null ,"
+MIME_TYPE + " text not null ,"
+PATH + " text not null ,"
+ALBUM + " text, "
+ARTIST+ " text, "
+COMPOSER+" text, "
+YEAR+" text, "
+SIZE+" text);";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public final class CalendarDataBase {
public static final class CreateDB implements BaseColumns {
public static final String CALENDAR_ID = "calendar_id";
public static final String TITLE = "title";
public static final String EVENT_LOCATION = "event_location";
public static final String DESCRIPTION = "description";
public static final String DTSTART = "dtstart";
public static final String DTEND = "dtend";
public static final String DURATION = "duration";
public static final String ALL_DAY = "all_day";
public static final String DISPLAY_NAME = "display_name";
public static final String ACCOUNT_NAME = "account_name";
public static final String OWNER_NAME = "owner_name";
public static final String RRULE = "rrlue";
public static final String RDATE = "rdate";
public static final String _TABLENAME0 = "calendar";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+ " id integer primary key autoincrement, "
+TITLE+" text not null , "
+CALENDAR_ID + " text not null, "
+EVENT_LOCATION + " text , "
+DESCRIPTION + " text, "
+DTSTART + " text not null, "
+DTEND + " text not null, "
+DURATION+ " text , "
+ALL_DAY + " text, "
+DISPLAY_NAME + " text not null, "
+ACCOUNT_NAME + " text not null, "
+OWNER_NAME+ " text not null, "
+RRULE + " text, "
+RDATE + " text );";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public class CallLogDataBase {
public static final class CreateDB implements BaseColumns {
public static final String ID = "id";
public static final String TYPE = "type";
public static final String NAME = "name";
public static final String NUMBER = "number";
public static final String DURATION = "duration";
public static final String DATE = "date";
public static final String _TABLENAME0 = "calllog";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+ID+" INTEGER PRIMARY KEY autoincrement, "
+TYPE+" integer,"
+NAME + " text,"
+NUMBER + " text,"
+DURATION + " integer,"
+DATE + " text);";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public class ContactDataBase {
public static final class CreateDB implements BaseColumns {
public static final String NUMBER = "number";
public static final String NAME = "name";
public static final String PHOTO_ID = "photo_id";
public static final String PERSON_ID = "person_id";
public static final String _TABLENAME0 = "contact";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+NUMBER+" text not null primary key, "
+NAME+" text,"
+PHOTO_ID + " integer,"
+PERSON_ID + " integer);";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
//데이터베이스 클래스
public final class Databases {
private Databases() {}
public static final class CreateDB_App implements BaseColumns {
public static final String TABLE_NAME = "AppInfo";
public static final String PACKAGENAME = "packagename";
public static final String VERSION = "version";
public static final String NAME = "name";
public static final String FIRSTINSTALL = "firstinstall";
public static final String LASTUPDATE = "lastupdate";
public static final String WIFIUSAGE = "wifiusage";
public static final String CELLULARUSAGE = "cellularusage";
public static final String USAGETIME = "usagetime";
public static final String _CREATE_AppInfo = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null primary key, "
+VERSION+" text not null , "
+NAME+" text not null , "
+FIRSTINSTALL+" timestamp not null , "
+LASTUPDATE+" timestamp not null , "
+WIFIUSAGE+" bigint not null , "
+CELLULARUSAGE+" bigint not null);";
}
public static final class CreateDB_AppUsage_YEAR implements BaseColumns {
public static final String TABLE_NAME = "AppUsageYear";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_YEAR = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AppUsage_MONTH implements BaseColumns {
public static final String TABLE_NAME = "AppUsageMonth";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_MONTH = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AppUsage_WEEK implements BaseColumns {
public static final String TABLE_NAME = "AppUsageWeek";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_WEEK = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AppUsage_DAY implements BaseColumns {
public static final String TABLE_NAME = "AppUsageDay";
public static final String PACKAGENAME = "packagename";
public static final String FIRSTTIMESTAMP = "firsttimestamp";
public static final String LASTIMESTAMP = "lasttimestamp";
public static final String LASTTIMEUSED = "lasttimeused";
public static final String TOTALTIMEFOREGROUND = "totaltimeforeground";
public static final String _CREATE_AppUsage_DAY = "create table if not exists "+TABLE_NAME+"("
+PACKAGENAME+" text not null , "
+FIRSTTIMESTAMP+" timestamp not null , "
+LASTIMESTAMP+" timestamp not null , "
+LASTTIMEUSED+" timestamp not null , "
+TOTALTIMEFOREGROUND+" bigint not null default 0, primary key(" +PACKAGENAME +"," + FIRSTTIMESTAMP+ "));";
}
public static final class CreateDB_AccountInfo implements BaseColumns {
public static final String TABLE_NAME = "AccountInfo";
public static final String ACCOUNTNAME = "accountname";
public static final String ACCOUNTTYPE = "accounttype";
public static final String _CREATE_AccountInfo = "create table if not exists "+TABLE_NAME+"("
+ACCOUNTNAME+" text not null , "
+ACCOUNTTYPE+" text not null , primary key(" + ACCOUNTNAME + "," + ACCOUNTTYPE + ")) ";
}
public static final class CreateDB_PhoneInfo implements BaseColumns {
public static final String TABLE_NAME = "PhoneInfo";
public static final String PHONETYPE = "phonetype";
public static final String SOFTWARENUMBER = "softwarenumber";
public static final String PHONENUMBER = "phonenumber";
public static final String SUBSCRIBERID = "subscriberid";
public static final String ADID = "adid";
public static final String CALLSTATE = "callstate";
public static final String DATASTATE = "datastate";
public static final String NETWORKTYPE = "networktype";
public static final String NETWORKCOUNTRYISO = "networkcountryiso";
public static final String SIMCOUNTRYISO = "simcountryiso";
public static final String NETWORKOPERATER = "networkoperater";
public static final String SIMOPERATOR = "simoperator";
public static final String NETWORKOPERATORNAME = "networkoperatorname";
public static final String SIMOPERATORNAME = "simoperatorname";
public static final String SIMSERIALNUMBER = "simserialnumber";
public static final String SIMSTATE = "simstate";
public static final String ISNETWORKROMING = "isnetworkroming";
public static final String _CREATE_PhoneInfo = "create table if not exists "+TABLE_NAME+"("
+PHONETYPE+" int not null primary key, "
+SOFTWARENUMBER+" text , "
+PHONENUMBER+" text , "
+SUBSCRIBERID+" text , "
+ADID+" text , "
+CALLSTATE+" int , "
+DATASTATE+" int , "
+NETWORKTYPE+" int , "
+NETWORKCOUNTRYISO+" text , "
+SIMCOUNTRYISO+" text , "
+NETWORKOPERATER+" text , "
+SIMOPERATOR+" text , "
+NETWORKOPERATORNAME+" text , "
+SIMOPERATORNAME+" text , "
+SIMSERIALNUMBER+" text , "
+SIMSTATE+" int , "
+ISNETWORKROMING +" bool ) ";
}
}
package com.forensic_tool.android;
import androidx.appcompat.app.AppCompatActivity;
import android.Manifest;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import com.example.dataextraction.R;
public class MainActivity extends AppCompatActivity {
String[] permission_list = {
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_CALENDAR,
Manifest.permission.ACCESS_NETWORK_STATE,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.READ_PHONE_STATE,
Manifest.permission.GET_ACCOUNTS,
Manifest.permission.READ_CONTACTS,
Manifest.permission.READ_CALL_LOG,
Manifest.permission.READ_PHONE_NUMBERS,
Manifest.permission.READ_CONTACTS,
Manifest.permission.READ_CALL_LOG,
Manifest.permission.READ_SMS,
Manifest.permission.ACCESS_WIFI_STATE
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
AppOpsManager appOps = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);
int mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS, android.os.Process.myUid(), getPackageName());
boolean granted = (mode == AppOpsManager.MODE_ALLOWED);
if (granted == false)
{
Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);
startActivity(intent);
}
checkPermission();
Intent intent = new Intent(this, LoadingActivity.class);
startActivity(intent);
}
public void checkPermission(){
//현재 안드로이드 버전이 6.0미만이면 메서드를 종료한다.
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
return;
for(String permission : permission_list){
//권한 허용 여부를 확인한다.
int chk = checkCallingOrSelfPermission(permission);
if(chk == PackageManager.PERMISSION_DENIED){
//권한 허용을여부를 확인하는 창을 띄운다
requestPermissions(permission_list,0);
}
}
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public final class MobileNetworkDataBase {
public static final class CreateDB implements BaseColumns{
public static final String NET_ID = "net_id";
public static final String DOMAIN = "domain";
public static final String INTERFACE_NAME = "interface_name";
public static final String HOST_ADDRESS = "host_address";
public static final String PREFIX_LENGTH = "prefix_length";
public static final String DESTINATION = "destination";
public static final String D_PREFIX = "d_prefix";
public static final String GATEWAY = "gateway";
public static final String _TABLENAME0 = "network_info";
public static final String _TABLENAME1 = "inetAddress";
public static final String _TABLENAME2 = "linkAddress";
public static final String _TABLENAME3 = "routeinfo";
public static final String _CREATE0 = "create table if not exists "
+_TABLENAME0 + " ( "
+NET_ID + " text not null, "
+DOMAIN + " text, "
+INTERFACE_NAME+ " text); ";
public static final String _CREATE1 = "create table if not exists "
+_TABLENAME1 + " ( "
+NET_ID + " text not null, "
+HOST_ADDRESS + " text not null, "
+" constraint net_id_fk foreign key(net_id) references network_info);";
public static final String _CREATE2 = "create table if not exists "
+_TABLENAME2 + " ( "
+NET_ID + " text not null, "
+HOST_ADDRESS + " text not null, "
+PREFIX_LENGTH+ " integer not null, "
+" constraint net_id_fk foreign key(net_id) references network_info);";
public static final String _CREATE3 = "create table if not exists "
+_TABLENAME3+ " ( "
+NET_ID+ " text not null, "
+DESTINATION + " text not null, "
+D_PREFIX + " integer not null, "
+GATEWAY+ " text not null, "
+INTERFACE_NAME + " text , "
+" constraint net_id_fk foreign key(net_id) references network_info);";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public final class PhotoDataBase {
public static final class CreateDB implements BaseColumns {
public static final String TITLE = "title";
public static final String ID = "id";
public static final String DATE_ADDED = "date_added";
public static final String DISPLAY_NAME = "display_name";
public static final String MIME_TYPE = "mime_type";
public static final String PATH = "path";
public static final String LATITUDE = "latitude";
public static final String LONGITUDE = "longitude";
public static final String _TABLENAME0 = "photo";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+TITLE+" text not null primary key, "
+ID+" integer not null , "
+DATE_ADDED + " text not null,"
+DISPLAY_NAME + " text not null,"
+MIME_TYPE + " text not null,"
+PATH + " text not null,"
+LATITUDE + " text,"
+LONGITUDE + " text);";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public class SMSDataBase {
public static final class CreateDB implements BaseColumns {
public static final String MID = "mid";
public static final String TID = "tid";
public static final String TYPE = "type";
public static final String ADDRESS = "address";
public static final String PERSON = "person";
public static final String CREATOR = "creator";
public static final String DATE = "date";
public static final String BODY = "body";
public static final String READ_C = "read_c";
public static final String _TABLENAME0 = "sms";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+MID+" integer not null primary key, "
+TID+" integer,"
+TYPE + " integer,"
+ADDRESS+" text,"
+PERSON + " text,"
+CREATOR+" text,"
+DATE + " text,"
+BODY + " text,"
+READ_C + " integer);";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public final class VideoDataBase {
public static final class CreateDB implements BaseColumns {
public static final String ALBUM = "album";
public static final String ARTIST = "artist";
public static final String BOOKMARK = "bookmark";
public static final String CATEGORY = "category";
public static final String DESCRIPTION = "description";
public static final String LANGUAGE = "language";
public static final String LATITUDE = "latitude";
public static final String LONGITUDE = "longitude";
public static final String RESOLUTION = "resolution";
public static final String PATH = "path";
public static final String TAGS = "tags";
public static final String DATE_ADDED = "date_added";
public static final String DISPLAY_NAME = "display_name";
public static final String MIME_TYPE = "mime_type";
public static final String TITLE = "title";
public static final String _TABLENAME0 = "video";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+TITLE+" text not null primary key, "
+DATE_ADDED + " text not null ,"
+DISPLAY_NAME + " text not null ,"
+MIME_TYPE + " text not null ,"
+PATH + " text not null ,"
+LATITUDE + " text ,"
+LONGITUDE + " text,"
+ALBUM+ " text, "
+ARTIST+ " text, "
+BOOKMARK+ " text, "
+CATEGORY + " text, "
+DESCRIPTION + " text, "
+LANGUAGE +" text, "
+RESOLUTION + " text, "
+TAGS + " text);";
}
}
package com.forensic_tool.android;
import android.provider.BaseColumns;
public class WifiDataBase {
public static final class CreateDB implements BaseColumns {
public static final String ID = "id";
public static final String SSID = "ssid";
public static final String BSSID = "bssid";
public static final String WEPKEYS = "wepkeys";
public static final String _TABLENAME0 = "wifi";
public static final String _CREATE0 = "create table if not exists "+_TABLENAME0+"("
+ID+" integer not null primary key, "
+SSID+" text,"
+BSSID + " text,"
+WEPKEYS + " text);";
}
}
package com.forensic_tool.android;
public class audioItem {
String album, artist,composer,contentType, year, path, date_added,
MIME_TYPE,size,title;
public String getAlbum() {
return album;
}
public String getArtist(){
return artist;
}
public String getComposer(){
return composer;
}
public String getContentType(){
return contentType;
}
public String getYear(){
return year;
}
public String getPath(){
return path;
}
public String getDate_added(){
return date_added;
}
public String getMIME_TYPE(){
return MIME_TYPE;
}
public String getSize(){
return size;
}
public String getTitle() {
return title;
}
public void setPath(String path) {
this.path = path;
}
public void setArtist(String artist) {
this.artist = artist;
}
public void setDate_added(String date_added) {
this.date_added = date_added;
}
public void setAlbum(String album) {
this.album = album;
}
public void setComposer(String composer) {
this.composer = composer;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public void setMIME_TYPE(String MIME_TYPE) {
this.MIME_TYPE = MIME_TYPE;
}
public void setSize(String size) {
this.size = size;
}
public void setYear(String year) {
this.year = year;
}
public void setTitle(String title) {
this.title = title;
}
}
package com.forensic_tool.android;
import android.os.Parcel;
import android.os.Parcelable;
public class calendarItem implements Parcelable {
String calID, displayName, accountName, ownerName, title, loc, desc, dtstart,
dtend, duration, allday, rrule, rdate;
public calendarItem(){}
public calendarItem(Parcel in){
this.calID=in.readString();
this.displayName=in.readString();
this.accountName=in.readString();
this.ownerName=in.readString();
this.title=in.readString();
this.loc=in.readString();
this.desc=in.readString();
this.dtstart=in.readString();
this.dtend=in.readString();
this.duration=in.readString();
this.allday=in.readString();
this.rrule=in.readString();
this.rdate=in.readString();
}
public String getCalID() {
return calID;
}
public String getDisplayName() {
return displayName;
}
public String getAccountName() {
return accountName;
}
public String getOwnerName() {
return ownerName;
}
public String getTitle() {
return title;
}
public String getLoc() {
return loc;
}
public String getDesc() {
return desc;
}
public String getDtstart() {
return dtstart;
}
public String getDtend() {
return dtend;
}
public String getDuration() {
return duration;
}
public String getAllday() {
return allday;
}
public String getRrule() {
return rrule;
}
public String getRdate() {
return rdate;
}
public void setCalID(String calID) {
this.calID = calID;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
public void setDesc(String desc) {
this.desc = desc;
}
public void setDtend(String dtend) {
this.dtend = dtend;
}
public void setDtstart(String dtstart) {
this.dtstart = dtstart;
}
public void setAllday(String allday) {
this.allday = allday;
}
public void setDuration(String duration) {
this.duration = duration;
}
public void setLoc(String loc) {
this.loc = loc;
}
public void setTitle(String title) {
this.title = title;
}
public void setRdate(String rdate) {
this.rdate = rdate;
}
public void setRrule(String rrule) {
this.rrule = rrule;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.calID);
dest.writeString(this.displayName);
dest.writeString(this.accountName);
dest.writeString(this.ownerName);
dest.writeString(this.title);
dest.writeString(this.loc);
dest.writeString(this.desc);
dest.writeString(this.dtstart);
dest.writeString(this.dtend);
dest.writeString(this.duration);
dest.writeString(this.allday);
dest.writeString(this.rrule);
dest.writeString(this.rdate);
}
@SuppressWarnings("rawtypes")
public static final Creator CREATOR = new Creator() {
@Override
public calendarItem createFromParcel(Parcel in) {
return new calendarItem(in);
}
@Override
public calendarItem[] newArray(int size) {
// TODO Auto-generated method stub
return new calendarItem[size];
}
};
}
package com.forensic_tool.android;
import android.content.ContentValues;
import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class networkDBHelper {
private static final String DATABASE_NAME = "networkDatabase.db";
private static final int DATABASE_VERSION = 1;
public static SQLiteDatabase mDB;
private networkDBHelper.DatabaseHelper mDBHelper;
private Context mCtx;
private class DatabaseHelper extends SQLiteOpenHelper {
public DatabaseHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE0);
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE1);
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE2);
db.execSQL(MobileNetworkDataBase.CreateDB._CREATE3);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME0);
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME1);
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME2);
db.execSQL("DROP TABLE IF EXISTS " + MobileNetworkDataBase.CreateDB._TABLENAME3);
onCreate(db);
}
}
public networkDBHelper(Context context){
this.mCtx = context;
}
public networkDBHelper open() throws SQLException {
mDBHelper = new networkDBHelper.DatabaseHelper(mCtx, DATABASE_NAME, null, DATABASE_VERSION);
mDB = mDBHelper.getWritableDatabase();
return this;
}
public void close(){
mDB.close();
}
public long insertColumn0(String id, String domain, String interface_name){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.DOMAIN, domain);
values.put(MobileNetworkDataBase.CreateDB.INTERFACE_NAME, interface_name);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME0, null, values);
}
public long insertColumn1(String id, String address){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.HOST_ADDRESS, address);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME1, null, values);
}
public long insertColumn2(String id, String address, int prefix){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.HOST_ADDRESS, address);
values.put(MobileNetworkDataBase.CreateDB.PREFIX_LENGTH, prefix);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME2, null, values);
}
public long insertColumn3(String id, String dest, int prefix, String gateway, String interface_name){
ContentValues values = new ContentValues();
values.put(MobileNetworkDataBase.CreateDB.NET_ID, id);
values.put(MobileNetworkDataBase.CreateDB.DESTINATION, dest);
values.put(MobileNetworkDataBase.CreateDB.D_PREFIX, prefix);
values.put(MobileNetworkDataBase.CreateDB.GATEWAY, gateway);
values.put(MobileNetworkDataBase.CreateDB.INTERFACE_NAME, interface_name);
return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME3, null, values);
}
public void deleteAllRows(){
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME0, null, null);
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME1, null, null);
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME2, null, null);
mDB.delete(MobileNetworkDataBase.CreateDB._TABLENAME3, null, null);
}
}
package com.forensic_tool.android;
import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;
public class photoItem implements Parcelable {
private int id;
private String latitude, longitude,title,displayName,type,date,path;
private byte bytes[];
private Bitmap bitmap;
public photoItem() {
latitude = null;
longitude = null;
}
public photoItem(Parcel in) {
this.id = in.readInt();
this.latitude = in.readString();
this.longitude = in.readString();
this.title = in.readString();
this.displayName = in.readString();
this.type = in.readString();
this.date = in.readString();
this.path = in.readString();
//this.bytes = in.createByteArray();
}
public String getLatitude(){
return latitude;
}
public String getLongitude(){
return longitude;
}
public String getTitle(){
return title;
}
public int getId(){
return id;
}
public String getDisplayName(){
return displayName;
}
public String getType(){
return type;
}
public String getDate(){
return date;
}
public String getPath() {
return path;
}
public byte[] getBytes(){
return bytes;
}
public Bitmap getBitmap(){
return bitmap;
}
public void setLatitude(String lat){
latitude = lat;
}
public void setLongitude(String longt){
longitude = longt;
}
public void setTitle(String _t){
title = _t;
}
public void setId(int _id){
id = _id;
}
public void setDisplayName(String name){
displayName = name;
}
public void setType(String _type){
type = _type;
}
public void setDate(String d){
date = d;
}
public void setPath(String p){
path = p;
}
public void setBytes(byte[] b){
bytes = b;
}
public void setBitmap(Bitmap b){
bitmap = b;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.id);
dest.writeString(this.latitude);
dest.writeString(this.longitude);
dest.writeString(this.title);
dest.writeString(this.displayName);
dest.writeString(this.type);
dest.writeString(this.date);
dest.writeString(this.path);
//dest.writeByteArray(this.bytes);
}
@SuppressWarnings("rawtypes")
public static final Creator CREATOR = new Creator() {
@Override
public photoItem createFromParcel(Parcel in) {
return new photoItem(in);
}
@Override
public photoItem[] newArray(int size) {
// TODO Auto-generated method stub
return new photoItem[size];
}
};
}
package com.forensic_tool.android;
import android.os.Parcel;
import android.os.Parcelable;
public class videoItem implements Parcelable {
String album, artist, bookmark, category, description, language
, latitude, longitude, resolution, tags, path, date_added
,display_Name, MIME_type,title;
public videoItem(){}
public videoItem(Parcel in) {
this.album = in.readString();
this.artist = in.readString();
this.bookmark = in.readString();
this.category = in.readString();
this.description = in.readString();
this.latitude = in.readString();
this.longitude = in.readString();
this.resolution = in.readString();
this.tags = in.readString();
this.path = in.readString();
this.date_added = in.readString();
this.display_Name = in.readString();
this.MIME_type = in.readString();
}
public String getAlbum() {
return album;
}
public String getArtist() {
return artist;
}
public String getBookmark() {
return bookmark;
}
public String getCategory() {
return category;
}
public String getDescription() {
return description;
}
public String getLanguage(){
return language;
}
public String getLongitude(){
return longitude;
}
public String getResolution() {
return resolution;
}
public String getPath() {
return path;
}
public String getTags() {
return tags;
}
public String getLatitude() {
return latitude;
}
public String getDate_added() {
return date_added;
}
public String getDisplay_Name() {
return display_Name;
}
public String getMIME_type() {
return MIME_type;
}
public String getTitle() {
return title;
}
public void setAlbum(String album) {
this.album = album;
}
public void setArtist(String artist) {
this.artist = artist;
}
public void setBookmark(String bookmark) {
this.bookmark = bookmark;
}
public void setCategory(String category) {
this.category = category;
}
public void setDescription(String description) {
this.description = description;
}
public void setLanguage(String language) {
this.language = language;
}
public void setDate_added(String date_added) {
this.date_added = date_added;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public void setDisplay_Name(String display_Name) {
this.display_Name = display_Name;
}
public void setMIME_type(String MIME_type) {
this.MIME_type = MIME_type;
}
public void setPath(String path) {
this.path = path;
}
public void setResolution(String resolution) {
this.resolution = resolution;
}
public void setTags(String tags) {
this.tags = tags;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.album);
dest.writeString(this.artist);
dest.writeString(this.bookmark);
dest.writeString(this.category);
dest.writeString(this.description);
dest.writeString(this.language);
dest.writeString(this.latitude);
dest.writeString(this.longitude);
dest.writeString(this.resolution);
dest.writeString(this.tags);
dest.writeString(this.path);
dest.writeString(this.date_added);
dest.writeString(this.display_Name);
dest.writeString(this.MIME_type);
}
@SuppressWarnings("rawtypes")
public static final Creator CREATOR = new Creator() {
@Override
public videoItem createFromParcel(Parcel in) {
return new videoItem(in);
}
@Override
public videoItem[] newArray(int size) {
// TODO Auto-generated method stub
return new videoItem[size];
}
};
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="CapstoneDesign2" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="@+id/extraction_button"
android:layout_width="200dp"
android:layout_height="60dp"
android:layout_gravity="center"
android:text="데이터추출 완료"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.661"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>
<resources>
<string name="app_name">DataExtraction</string>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
package com.example.dataextraction;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
package com.forensic_tool.android;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
#Mon Apr 13 15:36:16 KST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
include ':app'
rootProject.name='DataExtraction'
Copyright 2012 Nikolay Elenkov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#!/usr/bin/env python
import re
import fileinput
def this_line_is_useless(line):
useless_es = [
'BEGIN TRANSACTION',
'COMMIT',
'sqlite_sequence',
'CREATE UNIQUE INDEX',
'PRAGMA foreign_keys=OFF',
]
for useless in useless_es:
if re.search(useless, line):
return True
def has_primary_key(line):
return bool(re.search(r'PRIMARY KEY', line))
searching_for_end = False
for line in fileinput.input():
if this_line_is_useless(line):
continue
# this line was necessary because '');
# would be converted to \'); which isn't appropriate
if re.match(r".*, ''\);", line):
line = re.sub(r"''\);", r'``);', line)
if re.match(r'^CREATE TABLE.*', line):
searching_for_end = True
m = re.search('CREATE TABLE "?(\w*)"?(.*)', line)
if m:
name, sub = m.groups()
line = "DROP TABLE IF EXISTS %(name)s;\nCREATE TABLE IF NOT EXISTS %(name)s%(sub)s\nALTER TABLE %(name)s convert to charset utf8 collate utf8_unicode_ci;\n"
line = line % dict(name=name, sub=sub)
line = line.replace('autoincrement','AUTO_INCREMENT')
line = line.replace('text not null primary key','varchar(200) not null primary key')
line = line.replace('timestamp not null','varchar(20) not null')
line = line.replace(',date text',',date datetime')
line = line.replace('dtstart text not null, dtend text not null','dtstart datetime not null, dtend datetime not null')
line = line.replace('accountname text not null','accountname varchar(200) not null')
line = line.replace('accounttype text not null','accounttype varchar(200) not null')
line = line.replace('packagename text not null','packagename varchar(200) not null')
line = line.replace('name text,','name varchar(255) COLLATE utf8mb4_bin,')
else:
m = re.search('INSERT INTO "(\w*)"(.*)', line)
if m:
line = 'INSERT INTO %s%s\n' % m.groups()
line = line.replace('"', r'\"')
line = line.replace('"', "'")
line = re.sub(r"([^'])'t'(.)", "\1THIS_IS_TRUE\2", line)
line = line.replace('THIS_IS_TRUE', '1')
line = re.sub(r"([^'])'f'(.)", "\1THIS_IS_FALSE\2", line)
line = line.replace('THIS_IS_FALSE', '0')
print (line)
'''
# Add auto_increment if it is not there since sqlite auto_increments ALL
# primary keys
if searching_for_end:
if re.search(r"integer(?:\s+\w+)*\s*PRIMARY KEY(?:\s+\w+)*\s*,", line):
line = line.replace("PRIMARY KEY", "PRIMARY KEY AUTO_INCREMENT")
# replace " and ' with ` because mysql doesn't like quotes in CREATE commands
if line.find('DEFAULT') == -1:
line = line.replace(r'"', r"'").replace(r"'", r"'")
else:
parts = line.split('DEFAULT')
parts[0] = parts[0].replace(r'"', r"'").replace(r"'", r"'")
line = 'DEFAULT'.join(parts)
# And now we convert it back (see above)
if re.match(r".*, ``\);", line):
line = re.sub(r'``\);', r"'');", line)
if searching_for_end and re.match(r'.*\);', line):
searching_for_end = False
if re.match(r"CREATE INDEX", line):
line = re.sub('"', "'", line)
if re.match(r"AUTOINCREMENT", line):
line = re.sub("AUTOINCREMENT", "AUTO_INCREMENT", line)
print (line)
'''
\ No newline at end of file
#!/usr/bin/env python
import re
import fileinput
def this_line_is_useless(line):
useless_es = [
'BEGIN TRANSACTION',
'COMMIT',
'sqlite_sequence',
'CREATE UNIQUE INDEX',
'PRAGMA foreign_keys=OFF',
]
for useless in useless_es:
if re.search(useless, line):
return True
def has_primary_key(line):
return bool(re.search(r'PRIMARY KEY', line))
searching_for_end = False
for line in fileinput.input():
if this_line_is_useless(line):
continue
# this line was necessary because '');
# would be converted to \'); which isn't appropriate
if re.match(r".*, ''\);", line):
line = re.sub(r"''\);", r'``);', line)
if re.match(r'^CREATE TABLE.*', line):
searching_for_end = True
m = re.search('CREATE TABLE "?(\w*)"?(.*)', line)
if m:
name, sub = m.groups()
line = "DROP TABLE IF EXISTS %(name)s;\nCREATE TABLE IF NOT EXISTS %(name)s%(sub)s\n"
line = line % dict(name=name, sub=sub)
line = line.replace('net_id text not null','net_id varchar(200) not null')
line = line.replace('network_info ( net_id varchar(200) not null','network_info ( net_id varchar(200) primary key not null')
line = line.replace('references network_info','references network_info(net_id)')
line = line.replace('prefix_length integer not null, constraint net_id_fk','prefix_length integer not null, constraint net_id_fk_link')
line = line.replace('host_address text not null, constraint net_id_fk','host_address text not null, constraint net_id_fk_inet')
else:
m = re.search('INSERT INTO "(\w*)"(.*)', line)
if m:
line = 'INSERT INTO %s%s\n' % m.groups()
line = line.replace('"', r'\"')
line = line.replace('"', "'")
line = re.sub(r"([^'])'t'(.)", "\1THIS_IS_TRUE\2", line)
line = line.replace('THIS_IS_TRUE', '1')
line = re.sub(r"([^'])'f'(.)", "\1THIS_IS_FALSE\2", line)
line = line.replace('THIS_IS_FALSE', '0')
# Add auto_increment if it is not there since sqlite auto_increments ALL
# primary keys
if searching_for_end:
if re.search(r"integer(?:\s+\w+)*\s*PRIMARY KEY(?:\s+\w+)*\s*,", line):
line = line.replace("PRIMARY KEY", "PRIMARY KEY AUTO_INCREMENT")
# replace " and ' with ` because mysql doesn't like quotes in CREATE commands
if line.find('DEFAULT') == -1:
line = line.replace(r'"', r"'").replace(r"'", r"'")
else:
parts = line.split('DEFAULT')
parts[0] = parts[0].replace(r'"', r"'").replace(r"'", r"'")
line = 'DEFAULT'.join(parts)
# And now we convert it back (see above)
if re.match(r".*, ``\);", line):
line = re.sub(r'``\);', r"'');", line)
if searching_for_end and re.match(r'.*\);', line):
searching_for_end = False
if re.match(r"CREATE INDEX", line):
line = re.sub('"', "'", line)
if re.match(r"AUTOINCREMENT", line):
line = re.sub("AUTOINCREMENT", "AUTO_INCREMENT", line)
print (line)
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
//
// Base styles
//
.alert {
position: relative;
padding: $alert-padding-y $alert-padding-x;
margin-bottom: $alert-margin-bottom;
border: $alert-border-width solid transparent;
@include border-radius($alert-border-radius);
}
// Headings for larger alerts
.alert-heading {
// Specified to prevent conflicts of changing $headings-color
color: inherit;
}
// Provide class for links that match alerts
.alert-link {
font-weight: $alert-link-font-weight;
}
// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.
.alert-dismissible {
padding-right: $close-font-size + $alert-padding-x * 2;
// Adjust close link position
.close {
position: absolute;
top: 0;
right: 0;
padding: $alert-padding-y $alert-padding-x;
color: inherit;
}
}
// Alternate styles
//
// Generate contextual modifier classes for colorizing the alert.
@each $color, $value in $theme-colors {
.alert-#{$color} {
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
}
}
// Base class
//
// Requires one of the contextual, color modifier classes for `color` and
// `background-color`.
.badge {
display: inline-block;
padding: $badge-padding-y $badge-padding-x;
@include font-size($badge-font-size);
font-weight: $badge-font-weight;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
@include border-radius($badge-border-radius);
@include transition($badge-transition);
@at-root a#{&} {
@include hover-focus {
text-decoration: none;
}
}
// Empty badges collapse automatically
&:empty {
display: none;
}
}
// Quick fix for badges in buttons
.btn .badge {
position: relative;
top: -1px;
}
// Pill badges
//
// Make them extra rounded with a modifier to replace v3's badges.
.badge-pill {
padding-right: $badge-pill-padding-x;
padding-left: $badge-pill-padding-x;
@include border-radius($badge-pill-border-radius);
}
// Colors
//
// Contextual variations (linked badges get darker on :hover).
@each $color, $value in $theme-colors {
.badge-#{$color} {
@include badge-variant($value);
}
}
.breadcrumb {
display: flex;
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $breadcrumb-margin-bottom;
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($breadcrumb-border-radius);
}
.breadcrumb-item {
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item {
padding-left: $breadcrumb-item-padding;
&::before {
display: inline-block; // Suppress underlining of the separator in modern browsers
padding-right: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: $breadcrumb-divider;
}
}
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
// without `<ul>`s. The `::before` pseudo-element generates an element
// *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
//
// To trick IE into suppressing the underline, we give the pseudo-element an
// underline and then immediately remove it.
+ .breadcrumb-item:hover::before {
text-decoration: underline;
}
// stylelint-disable-next-line no-duplicate-selectors
+ .breadcrumb-item:hover::before {
text-decoration: none;
}
&.active {
color: $breadcrumb-active-color;
}
}
// stylelint-disable selector-no-qualifying-type
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-flex;
vertical-align: middle; // match .btn alignment given font-size hack above
> .btn {
position: relative;
flex: 1 1 auto;
// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
@include hover {
z-index: 1;
}
&:focus,
&:active,
&.active {
z-index: 1;
}
}
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.input-group {
width: auto;
}
}
.btn-group {
// Prevent double borders when buttons are next to each other
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-left: -$btn-border-width;
}
// Reset rounded corners
> .btn:not(:last-child):not(.dropdown-toggle),
> .btn-group:not(:last-child) > .btn {
@include border-right-radius(0);
}
> .btn:not(:first-child),
> .btn-group:not(:first-child) > .btn {
@include border-left-radius(0);
}
}
// Sizing
//
// Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-sm > .btn { @extend .btn-sm; }
.btn-group-lg > .btn { @extend .btn-lg; }
//
// Split button dropdowns
//
.dropdown-toggle-split {
padding-right: $btn-padding-x * .75;
padding-left: $btn-padding-x * .75;
&::after,
.dropup &::after,
.dropright &::after {
margin-left: 0;
}
.dropleft &::before {
margin-right: 0;
}
}
.btn-sm + .dropdown-toggle-split {
padding-right: $btn-padding-x-sm * .75;
padding-left: $btn-padding-x-sm * .75;
}
.btn-lg + .dropdown-toggle-split {
padding-right: $btn-padding-x-lg * .75;
padding-left: $btn-padding-x-lg * .75;
}
// The clickable button for toggling the menu
// Set the same inset shadow as the :active state
.btn-group.show .dropdown-toggle {
@include box-shadow($btn-active-box-shadow);
// Show no shadow for `.btn-link` since it has no other button styles.
&.btn-link {
@include box-shadow(none);
}
}
//
// Vertical button groups
//
.btn-group-vertical {
flex-direction: column;
align-items: flex-start;
justify-content: center;
> .btn,
> .btn-group {
width: 100%;
}
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-top: -$btn-border-width;
}
// Reset rounded corners
> .btn:not(:last-child):not(.dropdown-toggle),
> .btn-group:not(:last-child) > .btn {
@include border-bottom-radius(0);
}
> .btn:not(:first-child),
> .btn-group:not(:first-child) > .btn {
@include border-top-radius(0);
}
}
// Checkbox and radio options
//
// In order to support the browser's form validation feedback, powered by the
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
// `display: none;` or `visibility: hidden;` as that also hides the popover.
// Simply visually hiding the inputs via `opacity` would leave them clickable in
// certain cases which is prevented by using `clip` and `pointer-events`.
// This way, we ensure a DOM element is visible to position the popover from.
//
// See https://github.com/twbs/bootstrap/pull/12794 and
// https://github.com/twbs/bootstrap/pull/14559 for more information.
.btn-group-toggle {
> .btn,
> .btn-group > .btn {
margin-bottom: 0; // Override default `<label>` value
input[type="radio"],
input[type="checkbox"] {
position: absolute;
clip: rect(0, 0, 0, 0);
pointer-events: none;
}
}
}
// stylelint-disable selector-no-qualifying-type
//
// Base styles
//
.btn {
display: inline-block;
font-family: $btn-font-family;
font-weight: $btn-font-weight;
color: $body-color;
text-align: center;
vertical-align: middle;
user-select: none;
background-color: transparent;
border: $btn-border-width solid transparent;
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
@include transition($btn-transition);
@include hover {
color: $body-color;
text-decoration: none;
}
&:focus,
&.focus {
outline: 0;
box-shadow: $btn-focus-box-shadow;
}
// Disabled comes first so active can properly restyle
&.disabled,
&:disabled {
opacity: $btn-disabled-opacity;
@include box-shadow(none);
}
&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active {
@include box-shadow($btn-active-box-shadow);
&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
}
}
// Future-proof disabling of clicks on `<a>` elements
a.btn.disabled,
fieldset:disabled a.btn {
pointer-events: none;
}
//
// Alternate buttons
//
@each $color, $value in $theme-colors {
.btn-#{$color} {
@include button-variant($value, $value);
}
}
@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include button-outline-variant($value);
}
}
//
// Link buttons
//
// Make a button look and behave like a link
.btn-link {
font-weight: $font-weight-normal;
color: $link-color;
text-decoration: $link-decoration;
@include hover {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
&:focus,
&.focus {
text-decoration: $link-hover-decoration;
box-shadow: none;
}
&:disabled,
&.disabled {
color: $btn-link-disabled-color;
pointer-events: none;
}
// No need for an active state here
}
//
// Button Sizes
//
.btn-lg {
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
}
.btn-sm {
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
}
//
// Block button
//
.btn-block {
display: block;
width: 100%;
// Vertically space out multiple block buttons
+ .btn-block {
margin-top: $btn-block-spacing-y;
}
}
// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
}
//
// Base styles
//
.card {
position: relative;
display: flex;
flex-direction: column;
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
word-wrap: break-word;
background-color: $card-bg;
background-clip: border-box;
border: $card-border-width solid $card-border-color;
@include border-radius($card-border-radius);
> hr {
margin-right: 0;
margin-left: 0;
}
> .list-group:first-child {
.list-group-item:first-child {
@include border-top-radius($card-border-radius);
}
}
> .list-group:last-child {
.list-group-item:last-child {
@include border-bottom-radius($card-border-radius);
}
}
}
.card-body {
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
// as much space as possible, ensuring footers are aligned to the bottom.
flex: 1 1 auto;
padding: $card-spacer-x;
color: $card-color;
}
.card-title {
margin-bottom: $card-spacer-y;
}
.card-subtitle {
margin-top: -$card-spacer-y / 2;
margin-bottom: 0;
}
.card-text:last-child {
margin-bottom: 0;
}
.card-link {
@include hover {
text-decoration: none;
}
+ .card-link {
margin-left: $card-spacer-x;
}
}
//
// Optional textual caps
//
.card-header {
padding: $card-spacer-y $card-spacer-x;
margin-bottom: 0; // Removes the default margin-bottom of <hN>
color: $card-cap-color;
background-color: $card-cap-bg;
border-bottom: $card-border-width solid $card-border-color;
&:first-child {
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
}
+ .list-group {
.list-group-item:first-child {
border-top: 0;
}
}
}
.card-footer {
padding: $card-spacer-y $card-spacer-x;
background-color: $card-cap-bg;
border-top: $card-border-width solid $card-border-color;
&:last-child {
@include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
}
}
//
// Header navs
//
.card-header-tabs {
margin-right: -$card-spacer-x / 2;
margin-bottom: -$card-spacer-y;
margin-left: -$card-spacer-x / 2;
border-bottom: 0;
}
.card-header-pills {
margin-right: -$card-spacer-x / 2;
margin-left: -$card-spacer-x / 2;
}
// Card image
.card-img-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: $card-img-overlay-padding;
}
.card-img {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-radius($card-inner-border-radius);
}
// Card image caps
.card-img-top {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-top-radius($card-inner-border-radius);
}
.card-img-bottom {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-bottom-radius($card-inner-border-radius);
}
// Card deck
.card-deck {
display: flex;
flex-direction: column;
.card {
margin-bottom: $card-deck-margin;
}
@include media-breakpoint-up(sm) {
flex-flow: row wrap;
margin-right: -$card-deck-margin;
margin-left: -$card-deck-margin;
.card {
display: flex;
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 0 0%;
flex-direction: column;
margin-right: $card-deck-margin;
margin-bottom: 0; // Override the default
margin-left: $card-deck-margin;
}
}
}
//
// Card groups
//
.card-group {
display: flex;
flex-direction: column;
// The child selector allows nested `.card` within `.card-group`
// to display properly.
> .card {
margin-bottom: $card-group-margin;
}
@include media-breakpoint-up(sm) {
flex-flow: row wrap;
// The child selector allows nested `.card` within `.card-group`
// to display properly.
> .card {
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 0 0%;
margin-bottom: 0;
+ .card {
margin-left: 0;
border-left: 0;
}
// Handle rounded corners
@if $enable-rounded {
&:not(:last-child) {
@include border-right-radius(0);
.card-img-top,
.card-header {
// stylelint-disable-next-line property-blacklist
border-top-right-radius: 0;
}
.card-img-bottom,
.card-footer {
// stylelint-disable-next-line property-blacklist
border-bottom-right-radius: 0;
}
}
&:not(:first-child) {
@include border-left-radius(0);
.card-img-top,
.card-header {
// stylelint-disable-next-line property-blacklist
border-top-left-radius: 0;
}
.card-img-bottom,
.card-footer {
// stylelint-disable-next-line property-blacklist
border-bottom-left-radius: 0;
}
}
}
}
}
}
//
// Columns
//
.card-columns {
.card {
margin-bottom: $card-columns-margin;
}
@include media-breakpoint-up(sm) {
column-count: $card-columns-count;
column-gap: $card-columns-gap;
orphans: 1;
widows: 1;
.card {
display: inline-block; // Don't let them vertically span multiple columns
width: 100%; // Don't let their width change
}
}
}
//
// Accordion
//
.accordion {
> .card {
overflow: hidden;
&:not(:first-of-type) {
.card-header:first-child {
@include border-radius(0);
}
&:not(:last-of-type) {
border-bottom: 0;
@include border-radius(0);
}
}
&:first-of-type {
border-bottom: 0;
@include border-bottom-radius(0);
}
&:last-of-type {
@include border-top-radius(0);
}
.card-header {
margin-bottom: -$card-border-width;
}
}
}
// Notes on the classes:
//
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
// even when their scroll action started on a carousel, but for compatibility (with Firefox)
// we're preventing all actions instead
// 2. The .carousel-item-left and .carousel-item-right is used to indicate where
// the active slide is heading.
// 3. .active.carousel-item is the current slide.
// 4. .active.carousel-item-left and .active.carousel-item-right is the current
// slide in its in-transition state. Only one of these occurs at a time.
// 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
// is the upcoming slide in transition.
.carousel {
position: relative;
}
.carousel.pointer-event {
touch-action: pan-y;
}
.carousel-inner {
position: relative;
width: 100%;
overflow: hidden;
@include clearfix();
}
.carousel-item {
position: relative;
display: none;
float: left;
width: 100%;
margin-right: -100%;
backface-visibility: hidden;
@include transition($carousel-transition);
}
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
}
.carousel-item-next:not(.carousel-item-left),
.active.carousel-item-right {
transform: translateX(100%);
}
.carousel-item-prev:not(.carousel-item-right),
.active.carousel-item-left {
transform: translateX(-100%);
}
//
// Alternate transitions
//
.carousel-fade {
.carousel-item {
opacity: 0;
transition-property: opacity;
transform: none;
}
.carousel-item.active,
.carousel-item-next.carousel-item-left,
.carousel-item-prev.carousel-item-right {
z-index: 1;
opacity: 1;
}
.active.carousel-item-left,
.active.carousel-item-right {
z-index: 0;
opacity: 0;
@include transition(0s $carousel-transition-duration opacity);
}
}
//
// Left/right controls for nav
//
.carousel-control-prev,
.carousel-control-next {
position: absolute;
top: 0;
bottom: 0;
z-index: 1;
// Use flex for alignment (1-3)
display: flex; // 1. allow flex styles
align-items: center; // 2. vertically center contents
justify-content: center; // 3. horizontally center contents
width: $carousel-control-width;
color: $carousel-control-color;
text-align: center;
opacity: $carousel-control-opacity;
@include transition($carousel-control-transition);
// Hover/focus state
@include hover-focus {
color: $carousel-control-color;
text-decoration: none;
outline: 0;
opacity: $carousel-control-hover-opacity;
}
}
.carousel-control-prev {
left: 0;
@if $enable-gradients {
background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
}
}
.carousel-control-next {
right: 0;
@if $enable-gradients {
background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
}
}
// Icons for within
.carousel-control-prev-icon,
.carousel-control-next-icon {
display: inline-block;
width: $carousel-control-icon-width;
height: $carousel-control-icon-width;
background: no-repeat 50% / 100% 100%;
}
.carousel-control-prev-icon {
background-image: $carousel-control-prev-icon-bg;
}
.carousel-control-next-icon {
background-image: $carousel-control-next-icon-bg;
}
// Optional indicator pips
//
// Add an ordered list with the following class and add a list item for each
// slide your carousel holds.
.carousel-indicators {
position: absolute;
right: 0;
bottom: 0;
left: 0;
z-index: 15;
display: flex;
justify-content: center;
padding-left: 0; // override <ol> default
// Use the .carousel-control's width as margin so we don't overlay those
margin-right: $carousel-control-width;
margin-left: $carousel-control-width;
list-style: none;
li {
box-sizing: content-box;
flex: 0 1 auto;
width: $carousel-indicator-width;
height: $carousel-indicator-height;
margin-right: $carousel-indicator-spacer;
margin-left: $carousel-indicator-spacer;
text-indent: -999px;
cursor: pointer;
background-color: $carousel-indicator-active-bg;
background-clip: padding-box;
// Use transparent borders to increase the hit area by 10px on top and bottom.
border-top: $carousel-indicator-hit-area-height solid transparent;
border-bottom: $carousel-indicator-hit-area-height solid transparent;
opacity: .5;
@include transition($carousel-indicator-transition);
}
.active {
opacity: 1;
}
}
// Optional captions
//
//
.carousel-caption {
position: absolute;
right: (100% - $carousel-caption-width) / 2;
bottom: 20px;
left: (100% - $carousel-caption-width) / 2;
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: $carousel-caption-color;
text-align: center;
}
.close {
float: right;
@include font-size($close-font-size);
font-weight: $close-font-weight;
line-height: 1;
color: $close-color;
text-shadow: $close-text-shadow;
opacity: .5;
// Override <a>'s hover style
@include hover {
color: $close-color;
text-decoration: none;
}
&:not(:disabled):not(.disabled) {
@include hover-focus {
opacity: .75;
}
}
}
// Additional properties for button version
// iOS requires the button element instead of an anchor tag.
// If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
// stylelint-disable-next-line selector-no-qualifying-type
button.close {
padding: 0;
background-color: transparent;
border: 0;
appearance: none;
}
// Future-proof disabling of clicks on `<a>` elements
// stylelint-disable-next-line selector-no-qualifying-type
a.close.disabled {
pointer-events: none;
}
// Inline code
code {
@include font-size($code-font-size);
color: $code-color;
word-break: break-word;
// Streamline the style when inside anchors to avoid broken underline and more
a > & {
color: inherit;
}
}
// User input typically entered via keyboard
kbd {
padding: $kbd-padding-y $kbd-padding-x;
@include font-size($kbd-font-size);
color: $kbd-color;
background-color: $kbd-bg;
@include border-radius($border-radius-sm);
@include box-shadow($kbd-box-shadow);
kbd {
padding: 0;
@include font-size(100%);
font-weight: $nested-kbd-font-weight;
@include box-shadow(none);
}
}
// Blocks of code
pre {
display: block;
@include font-size($code-font-size);
color: $pre-color;
// Account for some code outputs that place code tags in pre tags
code {
@include font-size(inherit);
color: inherit;
word-break: normal;
}
}
// Enable scrollable blocks of code
.pre-scrollable {
max-height: $pre-scrollable-max-height;
overflow-y: scroll;
}
This diff is collapsed. Click to expand it.
// The dropdown wrapper (`<div>`)
.dropup,
.dropright,
.dropdown,
.dropleft {
position: relative;
}
.dropdown-toggle {
white-space: nowrap;
// Generate the caret automatically
@include caret;
}
// The dropdown menu
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: $zindex-dropdown;
display: none; // none by default, but block on "open" of the menu
float: left;
min-width: $dropdown-min-width;
padding: $dropdown-padding-y 0;
margin: $dropdown-spacer 0 0; // override default ul
@include font-size($dropdown-font-size);
color: $dropdown-color;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
list-style: none;
background-color: $dropdown-bg;
background-clip: padding-box;
border: $dropdown-border-width solid $dropdown-border-color;
@include border-radius($dropdown-border-radius);
@include box-shadow($dropdown-box-shadow);
}
@each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
.dropdown-menu#{$infix}-left {
right: auto;
left: 0;
}
.dropdown-menu#{$infix}-right {
right: 0;
left: auto;
}
}
}
// Allow for dropdowns to go bottom up (aka, dropup-menu)
// Just add .dropup after the standard .dropdown class and you're set.
.dropup {
.dropdown-menu {
top: auto;
bottom: 100%;
margin-top: 0;
margin-bottom: $dropdown-spacer;
}
.dropdown-toggle {
@include caret(up);
}
}
.dropright {
.dropdown-menu {
top: 0;
right: auto;
left: 100%;
margin-top: 0;
margin-left: $dropdown-spacer;
}
.dropdown-toggle {
@include caret(right);
&::after {
vertical-align: 0;
}
}
}
.dropleft {
.dropdown-menu {
top: 0;
right: 100%;
left: auto;
margin-top: 0;
margin-right: $dropdown-spacer;
}
.dropdown-toggle {
@include caret(left);
&::before {
vertical-align: 0;
}
}
}
// When enabled Popper.js, reset basic dropdown position
// stylelint-disable-next-line no-duplicate-selectors
.dropdown-menu {
&[x-placement^="top"],
&[x-placement^="right"],
&[x-placement^="bottom"],
&[x-placement^="left"] {
right: auto;
bottom: auto;
}
}
// Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider {
@include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y);
}
// Links, buttons, and more within the dropdown menu
//
// `<button>`-specific styles are denoted with `// For <button>s`
.dropdown-item {
display: block;
width: 100%; // For `<button>`s
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
clear: both;
font-weight: $font-weight-normal;
color: $dropdown-link-color;
text-align: inherit; // For `<button>`s
white-space: nowrap; // prevent links from randomly breaking onto new lines
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s
// Prevent dropdown overflow if there's no padding
// See https://github.com/twbs/bootstrap/pull/27703
@if $dropdown-padding-y == 0 {
&:first-child {
@include border-top-radius($dropdown-inner-border-radius);
}
&:last-child {
@include border-bottom-radius($dropdown-inner-border-radius);
}
}
@include hover-focus {
color: $dropdown-link-hover-color;
text-decoration: none;
@include gradient-bg($dropdown-link-hover-bg);
}
&.active,
&:active {
color: $dropdown-link-active-color;
text-decoration: none;
@include gradient-bg($dropdown-link-active-bg);
}
&.disabled,
&:disabled {
color: $dropdown-link-disabled-color;
pointer-events: none;
background-color: transparent;
// Remove CSS gradients if they're enabled
@if $enable-gradients {
background-image: none;
}
}
}
.dropdown-menu.show {
display: block;
}
// Dropdown section headers
.dropdown-header {
display: block;
padding: $dropdown-padding-y $dropdown-item-padding-x;
margin-bottom: 0; // for use with heading elements
@include font-size($font-size-sm);
color: $dropdown-header-color;
white-space: nowrap; // as with > li > a
}
// Dropdown text
.dropdown-item-text {
display: block;
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
color: $dropdown-link-color;
}
// stylelint-disable selector-no-qualifying-type
//
// Textual form controls
//
.form-control {
display: block;
width: 100%;
height: $input-height;
padding: $input-padding-y $input-padding-x;
font-family: $input-font-family;
@include font-size($input-font-size);
font-weight: $input-font-weight;
line-height: $input-line-height;
color: $input-color;
background-color: $input-bg;
background-clip: padding-box;
border: $input-border-width solid $input-border-color;
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
@include border-radius($input-border-radius, 0);
@include box-shadow($input-box-shadow);
@include transition($input-transition);
// Unstyle the caret on `<select>`s in IE10+.
&::-ms-expand {
background-color: transparent;
border: 0;
}
// Customize the `:focus` state to imitate native WebKit styles.
@include form-control-focus();
// Placeholder
&::placeholder {
color: $input-placeholder-color;
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
opacity: 1;
}
// Disabled and read-only inputs
//
// HTML5 says that controls under a fieldset > legend:first-child won't be
// disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway.
&:disabled,
&[readonly] {
background-color: $input-disabled-bg;
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
opacity: 1;
}
}
select.form-control {
&:focus::-ms-value {
// Suppress the nested default white text on blue background highlight given to
// the selected option text when the (still closed) <select> receives focus
// in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
// match the appearance of the native widget.
// See https://github.com/twbs/bootstrap/issues/19398.
color: $input-color;
background-color: $input-bg;
}
}
// Make file inputs better match text inputs by forcing them to new lines.
.form-control-file,
.form-control-range {
display: block;
width: 100%;
}
//
// Labels
//
// For use with horizontal and inline forms, when you need the label (or legend)
// text to align with the form controls.
.col-form-label {
padding-top: calc(#{$input-padding-y} + #{$input-border-width});
padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
margin-bottom: 0; // Override the `<label>/<legend>` default
@include font-size(inherit); // Override the `<legend>` default
line-height: $input-line-height;
}
.col-form-label-lg {
padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
@include font-size($input-font-size-lg);
line-height: $input-line-height-lg;
}
.col-form-label-sm {
padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
@include font-size($input-font-size-sm);
line-height: $input-line-height-sm;
}
// Readonly controls as plain text
//
// Apply class to a readonly input to make it appear like regular plain
// text (without any border, background color, focus indicator)
.form-control-plaintext {
display: block;
width: 100%;
padding-top: $input-padding-y;
padding-bottom: $input-padding-y;
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
line-height: $input-line-height;
color: $input-plaintext-color;
background-color: transparent;
border: solid transparent;
border-width: $input-border-width 0;
&.form-control-sm,
&.form-control-lg {
padding-right: 0;
padding-left: 0;
}
}
// Form control sizing
//
// Build on `.form-control` with modifier classes to decrease or increase the
// height and font-size of form controls.
//
// Repeated in `_input_group.scss` to avoid Sass extend issues.
.form-control-sm {
height: $input-height-sm;
padding: $input-padding-y-sm $input-padding-x-sm;
@include font-size($input-font-size-sm);
line-height: $input-line-height-sm;
@include border-radius($input-border-radius-sm);
}
.form-control-lg {
height: $input-height-lg;
padding: $input-padding-y-lg $input-padding-x-lg;
@include font-size($input-font-size-lg);
line-height: $input-line-height-lg;
@include border-radius($input-border-radius-lg);
}
// stylelint-disable-next-line no-duplicate-selectors
select.form-control {
&[size],
&[multiple] {
height: auto;
}
}
textarea.form-control {
height: auto;
}
// Form groups
//
// Designed to help with the organization and spacing of vertical forms. For
// horizontal forms, use the predefined grid classes.
.form-group {
margin-bottom: $form-group-margin-bottom;
}
.form-text {
display: block;
margin-top: $form-text-margin-top;
}
// Form grid
//
// Special replacement for our grid system's `.row` for tighter form layouts.
.form-row {
display: flex;
flex-wrap: wrap;
margin-right: -$form-grid-gutter-width / 2;
margin-left: -$form-grid-gutter-width / 2;
> .col,
> [class*="col-"] {
padding-right: $form-grid-gutter-width / 2;
padding-left: $form-grid-gutter-width / 2;
}
}
// Checkboxes and radios
//
// Indent the labels to position radios/checkboxes as hanging controls.
.form-check {
position: relative;
display: block;
padding-left: $form-check-input-gutter;
}
.form-check-input {
position: absolute;
margin-top: $form-check-input-margin-y;
margin-left: -$form-check-input-gutter;
&:disabled ~ .form-check-label {
color: $text-muted;
}
}
.form-check-label {
margin-bottom: 0; // Override default `<label>` bottom margin
}
.form-check-inline {
display: inline-flex;
align-items: center;
padding-left: 0; // Override base .form-check
margin-right: $form-check-inline-margin-x;
// Undo .form-check-input defaults and add some `margin-right`.
.form-check-input {
position: static;
margin-top: 0;
margin-right: $form-check-inline-input-margin-x;
margin-left: 0;
}
}
// Form validation
//
// Provide feedback to users when form field values are valid or invalid. Works
// primarily for client-side validation via scoped `:invalid` and `:valid`
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
// server side validation.
@each $state, $data in $form-validation-states {
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
}
// Inline forms
//
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
// forms begin stacked on extra small (mobile) devices and then go inline when
// viewports reach <768px.
//
// Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups).
.form-inline {
display: flex;
flex-flow: row wrap;
align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
// Because we use flex, the initial sizing of checkboxes is collapsed and
// doesn't occupy the full-width (which is what we want for xs grid tier),
// so we force that here.
.form-check {
width: 100%;
}
// Kick in the inline
@include media-breakpoint-up(sm) {
label {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0;
}
// Inline-block all the things for "inline"
.form-group {
display: flex;
flex: 0 0 auto;
flex-flow: row wrap;
align-items: center;
margin-bottom: 0;
}
// Allow folks to *not* use `.form-group`
.form-control {
display: inline-block;
width: auto; // Prevent labels from stacking above inputs in `.form-group`
vertical-align: middle;
}
// Make static controls behave like regular ones
.form-control-plaintext {
display: inline-block;
}
.input-group,
.custom-select {
width: auto;
}
// Remove default margin on radios/checkboxes that were used for stacking, and
// then undo the floating of radios and checkboxes to match.
.form-check {
display: flex;
align-items: center;
justify-content: center;
width: auto;
padding-left: 0;
}
.form-check-input {
position: relative;
flex-shrink: 0;
margin-top: 0;
margin-right: $form-check-input-margin-x;
margin-left: 0;
}
.custom-control {
align-items: center;
justify-content: center;
}
.custom-control-label {
margin-bottom: 0;
}
}
}
// Bootstrap functions
//
// Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
// Ascending
// Used to evaluate Sass maps like our grid breakpoints.
@mixin _assert-ascending($map, $map-name) {
$prev-key: null;
$prev-num: null;
@each $key, $num in $map {
@if $prev-num == null or unit($num) == "%" {
// Do nothing
} @else if not comparable($prev-num, $num) {
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
} @else if $prev-num >= $num {
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
}
$prev-key: $key;
$prev-num: $num;
}
}
// Starts at zero
// Used to ensure the min-width of the lowest breakpoint starts at 0.
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
$values: map-values($map);
$first-value: nth($values, 1);
@if $first-value != 0 {
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
}
}
// Replace `$search` with `$replace` in `$string`
// Used on our SVG icon backgrounds for custom forms.
//
// @author Hugo Giraudel
// @param {String} $string - Initial string
// @param {String} $search - Substring to replace
// @param {String} $replace ('') - New value
// @return {String} - Updated string
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
// Color contrast
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
$r: red($color);
$g: green($color);
$b: blue($color);
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= $yiq-contrasted-threshold) {
@return $dark;
} @else {
@return $light;
}
}
// Retrieve color Sass maps
@function color($key: "blue") {
@return map-get($colors, $key);
}
@function theme-color($key: "primary") {
@return map-get($theme-colors, $key);
}
@function gray($key: "100") {
@return map-get($grays, $key);
}
// Request a theme color level
@function theme-color-level($color-name: "primary", $level: 0) {
$color: theme-color($color-name);
$color-base: if($level > 0, $black, $white);
$level: abs($level);
@return mix($color-base, $color, $level * $theme-color-interval);
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.