Repository: Greg0109/ForwardNotifier
Branch: master
Commit: 39dfa98e78c7
Files: 96
Total size: 228.7 KB
Directory structure:
gitextract__qh4tyrx/
├── .theos/
│ ├── _/
│ │ ├── DEBIAN/
│ │ │ └── control
│ │ ├── Library/
│ │ │ ├── ControlCenter/
│ │ │ │ └── Bundles/
│ │ │ │ └── ForwardNotifierCC.bundle/
│ │ │ │ ├── ForwardNotifierCC
│ │ │ │ └── Info.plist
│ │ │ ├── MobileSubstrate/
│ │ │ │ └── DynamicLibraries/
│ │ │ │ └── ForwardNotifier.plist
│ │ │ ├── PreferenceBundles/
│ │ │ │ └── ForwardNotifier.bundle/
│ │ │ │ ├── ForwardNotifier
│ │ │ │ ├── Info.plist
│ │ │ │ └── Root.plist
│ │ │ └── PreferenceLoader/
│ │ │ └── Preferences/
│ │ │ └── ForwardNotifier.plist
│ │ └── usr/
│ │ └── bin/
│ │ └── ForwardNotifierReceiver
│ ├── build_session
│ ├── fakeroot
│ ├── last_package
│ └── obj/
│ ├── .stamp
│ ├── ForwardNotifier.bundle/
│ │ ├── ForwardNotifier
│ │ ├── Info.plist
│ │ └── Root.plist
│ ├── ForwardNotifierCC.bundle/
│ │ ├── ForwardNotifierCC
│ │ └── Info.plist
│ ├── ForwardNotifierReceiver
│ ├── arm64/
│ │ ├── FNPRootListController.m.09745f32.Td
│ │ ├── FNPRootListController.m.09745f32.o
│ │ ├── FNPRootListController.m.a9e3cd08.Td
│ │ ├── FNPRootListController.m.a9e3cd08.o
│ │ ├── ForwardNotifier.bundle/
│ │ │ ├── ForwardNotifier
│ │ │ └── ForwardNotifier.dSYM/
│ │ │ └── Contents/
│ │ │ ├── Info.plist
│ │ │ └── Resources/
│ │ │ └── DWARF/
│ │ │ └── ForwardNotifier
│ │ ├── ForwardNotifier.dylib.dSYM/
│ │ │ └── Contents/
│ │ │ └── Info.plist
│ │ ├── ForwardNotifierCC.bundle/
│ │ │ ├── ForwardNotifierCC
│ │ │ └── ForwardNotifierCC.dSYM/
│ │ │ └── Contents/
│ │ │ ├── Info.plist
│ │ │ └── Resources/
│ │ │ └── DWARF/
│ │ │ └── ForwardNotifierCC
│ │ ├── ForwardNotifierCC.m.b26de4cf.Td
│ │ ├── ForwardNotifierCC.m.b26de4cf.o
│ │ ├── ForwardNotifierReceiver
│ │ ├── ForwardNotifierReceiver.dSYM/
│ │ │ └── Contents/
│ │ │ ├── Info.plist
│ │ │ └── Resources/
│ │ │ └── DWARF/
│ │ │ └── ForwardNotifierReceiver
│ │ ├── Tweak.x.10f0f3ca.Td
│ │ ├── Tweak.x.10f0f3ca.o
│ │ ├── Tweak.x.5dac7822.Td
│ │ ├── Tweak.x.5dac7822.o
│ │ ├── Tweak.x.653cbd7a.Td
│ │ ├── Tweak.x.653cbd7a.o
│ │ ├── Tweak.x.m
│ │ ├── main.m.f318108f.Td
│ │ └── main.m.f318108f.o
│ └── arm64e/
│ ├── FNPRootListController.m.2caf96a5.Td
│ ├── FNPRootListController.m.2caf96a5.o
│ ├── FNPRootListController.m.f07d197f.Td
│ ├── FNPRootListController.m.f07d197f.o
│ ├── ForwardNotifier.bundle/
│ │ ├── ForwardNotifier
│ │ └── ForwardNotifier.dSYM/
│ │ └── Contents/
│ │ ├── Info.plist
│ │ └── Resources/
│ │ └── DWARF/
│ │ └── ForwardNotifier
│ ├── ForwardNotifier.dylib.dSYM/
│ │ └── Contents/
│ │ └── Info.plist
│ ├── ForwardNotifierCC.bundle/
│ │ ├── ForwardNotifierCC
│ │ └── ForwardNotifierCC.dSYM/
│ │ └── Contents/
│ │ ├── Info.plist
│ │ └── Resources/
│ │ └── DWARF/
│ │ └── ForwardNotifierCC
│ ├── ForwardNotifierCC.m.98cdb3a4.Td
│ ├── ForwardNotifierCC.m.98cdb3a4.o
│ ├── ForwardNotifierReceiver
│ ├── ForwardNotifierReceiver.dSYM/
│ │ └── Contents/
│ │ ├── Info.plist
│ │ └── Resources/
│ │ └── DWARF/
│ │ └── ForwardNotifierReceiver
│ ├── Tweak.x.586144b7.Td
│ ├── Tweak.x.586144b7.o
│ ├── Tweak.x.6472c773.Td
│ ├── Tweak.x.6472c773.o
│ ├── Tweak.x.9020a7f1.Td
│ ├── Tweak.x.9020a7f1.o
│ ├── Tweak.x.m
│ ├── main.m.0135e4e0.Td
│ └── main.m.0135e4e0.o
├── ForwardNotifier Client Tools/
│ └── Crossplatform Server/
│ ├── ForwardNotifierServer.py
│ ├── Linux Autoinstall/
│ │ └── ForwardNotifierInstaller.bash
│ ├── Mac Autoinstall/
│ │ └── ForwardNotifierInstaller.bash
│ └── Windows Autoinstall/
│ └── Program.cs
├── ForwardNotifier.plist
├── LICENSE
├── Makefile
├── README.md
├── Tweak.h
├── Tweak.x
├── control
├── forwardnotifier/
│ ├── .theos/
│ │ ├── build_session
│ │ └── obj/
│ │ └── .stamp
│ ├── FNPRootListController.h
│ ├── FNPRootListController.m
│ ├── Makefile
│ ├── Resources/
│ │ ├── Info.plist
│ │ └── Root.plist
│ └── entry.plist
├── forwardnotifiercc/
│ ├── ForwardNotifierCC.h
│ ├── ForwardNotifierCC.m
│ ├── Makefile
│ ├── Resources/
│ │ └── Info.plist
│ └── control
├── forwardnotifierreceiver/
│ ├── Makefile
│ └── main.m
└── packages/
└── com.greg0109.forwardnotifier_1.4.3_iphoneos-arm.deb
================================================
FILE CONTENTS
================================================
================================================
FILE: .theos/_/DEBIAN/control
================================================
Package: com.greg0109.forwardnotifier
Name: ForwardNotifier
Depends: mobilesubstrate, sshpass, openssh, applist, preferenceloader, curl
Conflict: com.yourepo.greg0109.forwardnotifier8
Replaces: com.yourepo.greg0109.forwardnotifier8
Architecture: iphoneos-arm
Description: Forward Notifications to your PC!
Maintainer: Greg0109
Author: Greg0109
Section: Tweaks
Version: 1.4.3
Installed-Size: 784
================================================
FILE: .theos/_/Library/ControlCenter/Bundles/ForwardNotifierCC.bundle/Info.plist
================================================
CFBundleName
ForwardNotifierCC
CFBundleExecutable
ForwardNotifierCC
CFBundleIdentifier
com.greg0109.forwardnotifiercc
CFBundleDevelopmentRegion
English
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
BNDL
CFBundleShortVersionString
1.0
CFBundleVersion
1
MinimumOSVersion
7.0
UIDeviceFamily
1
2
NSPrincipalClass
ForwardNotifierCC
CFBundleSupportedPlatforms
iPhoneOS
CCSGetModuleSizeAtRuntime
CCSModuleSize
Portrait
Height
1
Width
1
Landscape
Height
1
Width
1
================================================
FILE: .theos/_/Library/MobileSubstrate/DynamicLibraries/ForwardNotifier.plist
================================================
{ Filter = { Bundles = ( "com.apple.springboard" ); }; }
================================================
FILE: .theos/_/Library/PreferenceBundles/ForwardNotifier.bundle/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleExecutable
ForwardNotifier
CFBundleIdentifier
com.greg0109.forwardnotifierprefs
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
BNDL
CFBundleShortVersionString
1.0.0
CFBundleSignature
????
CFBundleVersion
1.0
NSPrincipalClass
FNPRootListController
================================================
FILE: .theos/_/Library/PreferenceBundles/ForwardNotifier.bundle/Root.plist
================================================
items
cell
PSGroupCell
label
General Settings
footerText
This feature makes this device the one that displays the notifications from other device.
Enable this feature if you would like to receive notifications on this device.
If this setting is enabled, the other ones should be disabled.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
receiver
label
Set Device as Receiver
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
Apps selected in the blacklisted section won't get their notifications forwarded.
cell
PSLinkCell
bundle
AppList
isController
1
label
Blacklisted Apps
ALAllowsSelection
1
ALSettingsKeyPrefix
ALSettingsDefaultValue
0
ALSettingsPath
/var/mobile/Library/Preferences/com.greg0109.forwardnotifierblacklist
ALSingleEnabledMode
cell
PSGroupCell
footerText
Enable this option to get an error output of the notifications.
It should only be enabled if the tweak is not working properly.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
errorlog
label
Post a notification if something went wrong
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
If this setting is enabled, the device won't send the notifications when is unlocked.
Disable this if you would like to receive notifications on your PC/iOS device all the time.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
lockstateenabled
label
Disable when unlocked
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
Select which OS you would like the notifications to be forwarded:
- Linux requires a package called "notify-send" to be installed.
- MacOS requires a package "terminal-notifier" to be installed.
- iOS requires this tweak to be installed on the receiver device with the receiver option enabled.
- Windows requires the Windows Client Tool "ForwardNotifierReceiver" to be installed. This feature is not yet supported.
If you are using the crossplatform server option, the server tool for each OS should be installed on the receiver. That tool can be found in my github.
cell
PSSegmentCell
default
0
defaults
com.greg0109.forwardnotifierprefs
key
pcspecifier
validValues
0
1
2
3
validTitles
Linux
MacOS
iOS
Windows
alignment
0
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
cell
PSGroupCell
label
Notifier Settings
footerText
If you are using key authentication, make sure the key works before activating. This tweak has been tested with keys in the .pem format
cell
PSSegmentCell
default
0
defaults
com.greg0109.forwardnotifierprefs
key
methodspecifier
validValues
0
1
validTitles
SSH
Crossplatform Server
alignment
0
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
IP or Hostaname.local
defaults
com.greg0109.forwardnotifierprefs
key
ip
id
hostnameip
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
Port. Leave empty if its default (22)
defaults
com.greg0109.forwardnotifierprefs
key
port
id
hide1
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
User
defaults
com.greg0109.forwardnotifierprefs
key
user
id
hide2
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSSecureEditTextCell
placeholder
Password or path to Key Authentication File
defaults
com.greg0109.forwardnotifierprefs
key
password
id
hide3
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
keyauthentication
id
hide4
label
Use key authentication
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
This will send a test notification to the PC/iOS Device.
Please, make sure all the settings are correct and that the CC module is enabled before testing.
action
testnotif
cell
PSButtonCell
label
Test Notification
cell
PSGroupCell
action
paypal
cell
PSButtonCell
icon
Paypal
label
Buy me a coffee
action
openTwitter
cell
PSButtonCell
icon
Twitter
label
Twitter (@Greg_0109)
action
reddit
cell
PSButtonCell
icon
Reddit
label
Reddit (u/greg0109)
action
sendEmail
cell
PSButtonCell
icon
Email
label
Email
title
ForwardNotifier
================================================
FILE: .theos/_/Library/PreferenceLoader/Preferences/ForwardNotifier.plist
================================================
entry
bundle
ForwardNotifier
cell
PSLinkCell
detail
FNPRootListController
icon
icon.png
isController
label
ForwardNotifier
================================================
FILE: .theos/build_session
================================================
================================================
FILE: .theos/fakeroot
================================================
================================================
FILE: .theos/last_package
================================================
./packages/com.greg0109.forwardnotifier_1.4.3_iphoneos-arm.deb
================================================
FILE: .theos/obj/.stamp
================================================
================================================
FILE: .theos/obj/ForwardNotifier.bundle/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleExecutable
ForwardNotifier
CFBundleIdentifier
com.greg0109.forwardnotifierprefs
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
BNDL
CFBundleShortVersionString
1.0.0
CFBundleSignature
????
CFBundleVersion
1.0
NSPrincipalClass
FNPRootListController
================================================
FILE: .theos/obj/ForwardNotifier.bundle/Root.plist
================================================
items
cell
PSGroupCell
label
General Settings
footerText
This feature makes this device the one that displays the notifications from other device.
Enable this feature if you would like to receive notifications on this device.
If this setting is enabled, the other ones should be disabled.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
receiver
label
Set Device as Receiver
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
Apps selected in the blacklisted section won't get their notifications forwarded.
cell
PSLinkCell
bundle
AppList
isController
1
label
Blacklisted Apps
ALAllowsSelection
1
ALSettingsKeyPrefix
ALSettingsDefaultValue
0
ALSettingsPath
/var/mobile/Library/Preferences/com.greg0109.forwardnotifierblacklist
ALSingleEnabledMode
cell
PSGroupCell
footerText
Enable this option to get an error output of the notifications.
It should only be enabled if the tweak is not working properly.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
errorlog
label
Post a notification if something went wrong
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
If this setting is enabled, the device won't send the notifications when is unlocked.
Disable this if you would like to receive notifications on your PC/iOS device all the time.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
lockstateenabled
label
Disable when unlocked
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
Select which OS you would like the notifications to be forwarded:
- Linux requires a package called "notify-send" to be installed.
- MacOS requires a package "terminal-notifier" to be installed.
- iOS requires this tweak to be installed on the receiver device with the receiver option enabled.
- Windows requires the Windows Client Tool "ForwardNotifierReceiver" to be installed. This feature is not yet supported.
If you are using the crossplatform server option, the server tool for each OS should be installed on the receiver. That tool can be found in my github.
cell
PSSegmentCell
default
0
defaults
com.greg0109.forwardnotifierprefs
key
pcspecifier
validValues
0
1
2
3
validTitles
Linux
MacOS
iOS
Windows
alignment
0
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
cell
PSGroupCell
label
Notifier Settings
footerText
If you are using key authentication, make sure the key works before activating. This tweak has been tested with keys in the .pem format
cell
PSSegmentCell
default
0
defaults
com.greg0109.forwardnotifierprefs
key
methodspecifier
validValues
0
1
validTitles
SSH
Crossplatform Server
alignment
0
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
IP or Hostaname.local
defaults
com.greg0109.forwardnotifierprefs
key
ip
id
hostnameip
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
Port. Leave empty if its default (22)
defaults
com.greg0109.forwardnotifierprefs
key
port
id
hide1
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
User
defaults
com.greg0109.forwardnotifierprefs
key
user
id
hide2
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSSecureEditTextCell
placeholder
Password or path to Key Authentication File
defaults
com.greg0109.forwardnotifierprefs
key
password
id
hide3
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
keyauthentication
id
hide4
label
Use key authentication
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
This will send a test notification to the PC/iOS Device.
Please, make sure all the settings are correct and that the CC module is enabled before testing.
action
testnotif
cell
PSButtonCell
label
Test Notification
cell
PSGroupCell
action
paypal
cell
PSButtonCell
icon
Paypal
label
Buy me a coffee
action
openTwitter
cell
PSButtonCell
icon
Twitter
label
Twitter (@Greg_0109)
action
reddit
cell
PSButtonCell
icon
Reddit
label
Reddit (u/greg0109)
action
sendEmail
cell
PSButtonCell
icon
Email
label
Email
title
ForwardNotifier
================================================
FILE: .theos/obj/ForwardNotifierCC.bundle/Info.plist
================================================
CFBundleName
ForwardNotifierCC
CFBundleExecutable
ForwardNotifierCC
CFBundleIdentifier
com.greg0109.forwardnotifiercc
CFBundleDevelopmentRegion
English
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
BNDL
CFBundleShortVersionString
1.0
CFBundleVersion
1
MinimumOSVersion
7.0
UIDeviceFamily
1
2
NSPrincipalClass
ForwardNotifierCC
CFBundleSupportedPlatforms
iPhoneOS
CCSGetModuleSizeAtRuntime
CCSModuleSize
Portrait
Height
1
Width
1
Landscape
Height
1
Width
1
================================================
FILE: .theos/obj/arm64/FNPRootListController.m.09745f32.Td
================================================
/home/glith/Escritorio/forwardnotifier/.theos/obj/arm64/FNPRootListController.m.09745f32.o: \
FNPRootListController.m /home/glith/theos/Prefix.pch \
/home/glith/theos/vendor/include/theos/BackwardsCompat.h \
/home/glith/theos/vendor/include/theos/IOSMacros.h \
/home/glith/theos/vendor/include/HBLog.h FNPRootListController.h \
/home/glith/theos/vendor/include/Preferences/PSListController.h \
/home/glith/theos/vendor/include/Preferences/PSViewController.h \
/home/glith/theos/vendor/include/Preferences/PSSpecifier.h \
/home/glith/theos/vendor/include/Preferences/PSTableCell.h \
/home/glith/theos/include/AppList/AppList.h \
/home/glith/theos/include/AppList/ALApplicationList.h \
/home/glith/theos/include/AppList/ALApplicationTableDataSource.h \
/home/glith/theos/include/AppList/ALValueCell.h \
/home/glith/theos/vendor/include/FrontBoardServices/FBSSystemService.h \
/home/glith/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h \
/home/glith/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h \
/home/glith/theos/vendor/include/BaseBoard/BSAction.h \
/home/glith/theos/vendor/include/BaseBoard/BSDescriptionProviding.h \
/home/glith/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h \
/home/glith/theos/vendor/include/BaseBoard/BSXPCCoding.h
/home/glith/theos/Prefix.pch:
/home/glith/theos/vendor/include/theos/BackwardsCompat.h:
/home/glith/theos/vendor/include/theos/IOSMacros.h:
/home/glith/theos/vendor/include/HBLog.h:
FNPRootListController.h:
/home/glith/theos/vendor/include/Preferences/PSListController.h:
/home/glith/theos/vendor/include/Preferences/PSViewController.h:
/home/glith/theos/vendor/include/Preferences/PSSpecifier.h:
/home/glith/theos/vendor/include/Preferences/PSTableCell.h:
/home/glith/theos/include/AppList/AppList.h:
/home/glith/theos/include/AppList/ALApplicationList.h:
/home/glith/theos/include/AppList/ALApplicationTableDataSource.h:
/home/glith/theos/include/AppList/ALValueCell.h:
/home/glith/theos/vendor/include/FrontBoardServices/FBSSystemService.h:
/home/glith/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h:
/home/glith/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h:
/home/glith/theos/vendor/include/BaseBoard/BSAction.h:
/home/glith/theos/vendor/include/BaseBoard/BSDescriptionProviding.h:
/home/glith/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h:
/home/glith/theos/vendor/include/BaseBoard/BSXPCCoding.h:
================================================
FILE: .theos/obj/arm64/FNPRootListController.m.a9e3cd08.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64/FNPRootListController.m.a9e3cd08.o: \
FNPRootListController.m /Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
FNPRootListController.h \
/Users/greg/theos/vendor/include/Preferences/PSListController.h \
/Users/greg/theos/vendor/include/Preferences/PSViewController.h \
/Users/greg/theos/vendor/include/Preferences/PSSpecifier.h \
/Users/greg/theos/vendor/include/Preferences/PSTableCell.h \
/Users/greg/theos/vendor/include/AppList/AppList.h \
/Users/greg/theos/vendor/include/AppList/ALApplicationList.h \
/Users/greg/theos/vendor/include/AppList/ALApplicationTableDataSource.h \
/Users/greg/theos/vendor/include/AppList/ALValueCell.h \
/Users/greg/theos/vendor/include/FrontBoardServices/FBSSystemService.h \
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h \
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h \
/Users/greg/theos/vendor/include/BaseBoard/BSAction.h \
/Users/greg/theos/vendor/include/BaseBoard/BSDescriptionProviding.h \
/Users/greg/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h \
/Users/greg/theos/vendor/include/BaseBoard/BSXPCCoding.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
FNPRootListController.h:
/Users/greg/theos/vendor/include/Preferences/PSListController.h:
/Users/greg/theos/vendor/include/Preferences/PSViewController.h:
/Users/greg/theos/vendor/include/Preferences/PSSpecifier.h:
/Users/greg/theos/vendor/include/Preferences/PSTableCell.h:
/Users/greg/theos/vendor/include/AppList/AppList.h:
/Users/greg/theos/vendor/include/AppList/ALApplicationList.h:
/Users/greg/theos/vendor/include/AppList/ALApplicationTableDataSource.h:
/Users/greg/theos/vendor/include/AppList/ALValueCell.h:
/Users/greg/theos/vendor/include/FrontBoardServices/FBSSystemService.h:
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h:
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h:
/Users/greg/theos/vendor/include/BaseBoard/BSAction.h:
/Users/greg/theos/vendor/include/BaseBoard/BSDescriptionProviding.h:
/Users/greg/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h:
/Users/greg/theos/vendor/include/BaseBoard/BSXPCCoding.h:
================================================
FILE: .theos/obj/arm64/ForwardNotifier.bundle/ForwardNotifier.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifier
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64/ForwardNotifier.dylib.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifier.dylib
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64/ForwardNotifierCC.bundle/ForwardNotifierCC.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifierCC
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64/ForwardNotifierCC.m.b26de4cf.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64/ForwardNotifierCC.m.b26de4cf.o: \
ForwardNotifierCC.m /Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
ForwardNotifierCC.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUIToggleModule.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUICAPackageDescription.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModule-Protocol.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModuleContentViewController-Protocol.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
ForwardNotifierCC.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUIToggleModule.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUICAPackageDescription.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModule-Protocol.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModuleContentViewController-Protocol.h:
================================================
FILE: .theos/obj/arm64/ForwardNotifierReceiver.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifierReceiver
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64/Tweak.x.10f0f3ca.Td
================================================
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/.theos/obj/arm64/Tweak.x.10f0f3ca.o: \
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/.theos/obj/arm64/Tweak.x.m \
/home/glith/theos/Prefix.pch \
/home/glith/theos/vendor/include/theos/BackwardsCompat.h \
/home/glith/theos/vendor/include/theos/IOSMacros.h \
/home/glith/theos/vendor/include/HBLog.h \
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/Tweak.h \
/home/glith/theos/include/NSTask.h \
/home/glith/theos/include/substrate.h
/home/glith/theos/Prefix.pch:
/home/glith/theos/vendor/include/theos/BackwardsCompat.h:
/home/glith/theos/vendor/include/theos/IOSMacros.h:
/home/glith/theos/vendor/include/HBLog.h:
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/Tweak.h:
/home/glith/theos/include/NSTask.h:
/home/glith/theos/include/substrate.h:
================================================
FILE: .theos/obj/arm64/Tweak.x.5dac7822.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64/Tweak.x.5dac7822.o: \
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64/Tweak.x.m \
/Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
/Users/greg/Desktop/forwardnotifier/Tweak.h \
/Users/greg/theos/include/NSTask.h \
/Users/greg/theos/include/substrate.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
/Users/greg/Desktop/forwardnotifier/Tweak.h:
/Users/greg/theos/include/NSTask.h:
/Users/greg/theos/include/substrate.h:
================================================
FILE: .theos/obj/arm64/Tweak.x.653cbd7a.Td
================================================
/home/glith/Escritorio/forwardnotifier/.theos/obj/arm64/Tweak.x.653cbd7a.o: \
/home/glith/Escritorio/forwardnotifier/.theos/obj/arm64/Tweak.x.m \
/home/glith/theos/Prefix.pch \
/home/glith/theos/vendor/include/theos/BackwardsCompat.h \
/home/glith/theos/vendor/include/theos/IOSMacros.h \
/home/glith/theos/vendor/include/HBLog.h \
/home/glith/Escritorio/forwardnotifier/Tweak.h \
/home/glith/theos/include/NSTask.h \
/home/glith/theos/include/substrate.h
/home/glith/theos/Prefix.pch:
/home/glith/theos/vendor/include/theos/BackwardsCompat.h:
/home/glith/theos/vendor/include/theos/IOSMacros.h:
/home/glith/theos/vendor/include/HBLog.h:
/home/glith/Escritorio/forwardnotifier/Tweak.h:
/home/glith/theos/include/NSTask.h:
/home/glith/theos/include/substrate.h:
================================================
FILE: .theos/obj/arm64/Tweak.x.m
================================================
#line 1 "Tweak.x"
#import "Tweak.h"
struct SBIconImageInfo iconspecs;
BOOL receiver;
BOOL errorlog;
BOOL lockstateenabled;
int pcspecifier;
int methodspecifier;
BOOL keyauthentication;
NSString *user;
NSString *ip;
NSString *port;
NSString *password;
NSString *command;
NSString *finalCommand;
NSArray *arguments;
NSString *pc;
NSString *title;
NSMutableString *finalTitle;
NSString *message;
NSMutableString *finalMessage;
NSString *bundleID;
NSString *appName;
BOOL locked;
NSPipe *out;
static BBServer *notificationserver = nil;
static void loadPrefs() {
NSMutableDictionary *prefs = [NSMutableDictionary dictionaryWithContentsOfFile:@"/User/Library/Preferences/com.greg0109.forwardnotifierprefs.plist"];
receiver = prefs[@"receiver"] ? [prefs[@"receiver"] boolValue] : NO;
errorlog = prefs[@"errorlog"] ? [prefs[@"errorlog"] boolValue] : NO;
lockstateenabled = prefs[@"lockstateenabled"] ? [prefs[@"lockstateenabled"] boolValue] : YES;
pcspecifier = prefs[@"pcspecifier"] ? [prefs[@"pcspecifier"] intValue] : 0;
methodspecifier = prefs[@"methodspecifier"] ? [prefs[@"methodspecifier"] intValue] : 0;
keyauthentication = prefs[@"keyauthentication"] ? [prefs[@"keyauthentication"] boolValue] : NO;
user = prefs[@"user"] && !([prefs[@"user"] isEqualToString:@""]) ? [prefs[@"user"] stringValue] : @"user";
ip = prefs[@"ip"] && !([prefs[@"ip"] isEqualToString:@""]) ? [prefs[@"ip"] stringValue] : @"ip";
port = prefs[@"port"] && !([prefs[@"port"] isEqualToString:@""]) ? [prefs[@"port"] stringValue] : @"22";
password = prefs[@"password"] && !([prefs[@"password"] isEqualToString:@""]) ? [prefs[@"password"] stringValue] : @"password";
user = [user stringByReplacingOccurrencesOfString:@" " withString:@""];
ip = [ip stringByReplacingOccurrencesOfString:@" " withString:@""];
password = [password stringByReplacingOccurrencesOfString:@" " withString:@""];
}
static dispatch_queue_t getBBServerQueue() {
static dispatch_queue_t queue;
static dispatch_once_t predicate;
dispatch_once(&predicate, ^{
void *handle = dlopen(NULL, RTLD_GLOBAL);
if (handle) {
dispatch_queue_t __weak *pointer = (__weak dispatch_queue_t *) dlsym(handle, "__BBServerQueue");
if (pointer) {
queue = *pointer;
}
dlclose(handle);
}
});
return queue;
}
#include
#if defined(__clang__)
#if __has_feature(objc_arc)
#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained
#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed))
#define _LOGOS_SELF_CONST const
#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained))
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
@class BBAction; @class SBApplicationController; @class SpringBoard; @class SBLockStateAggregator; @class BBBulletin; @class SBIconController; @class BBServer;
static BBServer* (*_logos_orig$_ungrouped$BBServer$initWithQueue$)(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id) _LOGOS_RETURN_RETAINED; static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id) _LOGOS_RETURN_RETAINED; static BBServer* (*_logos_orig$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$)(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id, id, id, id, id, id, id, id, id) _LOGOS_RETURN_RETAINED; static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id, id, id, id, id, id, id, id, id) _LOGOS_RETURN_RETAINED; static void (*_logos_orig$_ungrouped$BBServer$dealloc)(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL); static void _logos_method$_ungrouped$BBServer$dealloc(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL);
static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$SBIconController(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("SBIconController"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$BBBulletin(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("BBBulletin"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$SBApplicationController(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("SBApplicationController"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$SBLockStateAggregator(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("SBLockStateAggregator"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$BBAction(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("BBAction"); } return _klass; }
#line 70 "Tweak.x"
static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$(_LOGOS_SELF_TYPE_INIT BBServer* __unused self, SEL __unused _cmd, id arg1) _LOGOS_RETURN_RETAINED {
notificationserver = _logos_orig$_ungrouped$BBServer$initWithQueue$(self, _cmd, arg1);
return notificationserver;
}
static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$(_LOGOS_SELF_TYPE_INIT BBServer* __unused self, SEL __unused _cmd, id arg1, id arg2, id arg3, id arg4, id arg5, id arg6, id arg7, id arg8, id arg9) _LOGOS_RETURN_RETAINED {
notificationserver = _logos_orig$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$(self, _cmd, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
return notificationserver;
}
static void _logos_method$_ungrouped$BBServer$dealloc(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) {
if (notificationserver == self) {
notificationserver = nil;
}
_logos_orig$_ungrouped$BBServer$dealloc(self, _cmd);
}
void testnotif(NSString *titletest, NSString *messagetest) {
BBBulletin *bulletin = [[_logos_static_class_lookup$BBBulletin() alloc] init];
bulletin.title = titletest;
bulletin.message = messagetest;
bulletin.sectionID = @"com.apple.Preferences";
bulletin.bulletinID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.recordID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.publisherBulletinID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.date = [NSDate date];
bulletin.defaultAction = [_logos_static_class_lookup$BBAction() actionWithLaunchBundleID:@"prefs:root=ForwardNotifier" callblock:nil];
dispatch_sync(getBBServerQueue(), ^{
[notificationserver publishBulletin:bulletin destinations:14];
});
}
BOOL isItLocked() {
if (lockstateenabled) {
locked = [[_logos_static_class_lookup$SBLockStateAggregator() sharedInstance] lockState];
} else {
locked = TRUE;
}
return locked;
}
void sanitizeText() {
finalTitle = [@"" mutableCopy];
for (int i=0; i 2 && errorlog) {
testnotif(@"ForwardNotifier Error",erroroutput);
}
});
}
} else if (methodspecifier == 1) {
SBApplicationIcon *icon = [((SBIconController *)[_logos_static_class_lookup$SBIconController() sharedInstance]).model expectedIconForDisplayIdentifier:bundleID];
UIImage *image = nil;
iconspecs.size = CGSizeMake(60, 60);
iconspecs.scale = [UIScreen mainScreen].scale;
iconspecs.continuousCornerRadius = 12;
image = [icon generateIconImageWithInfo:iconspecs];
NSData *iconData = UIImagePNGRepresentation(image);
NSString *iconBase64;
if (![title isEqualToString:@"ForwardNotifier Test"]) {
iconBase64 = [iconData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
} else {
iconBase64 = forwardNotifierIconBase64;
}
NSData *titleData = [title dataUsingEncoding: NSUTF8StringEncoding];
NSString *titleBase64 = [titleData base64EncodedStringWithOptions:0];
NSData *messageData = [message dataUsingEncoding: NSUTF8StringEncoding];
NSString *messageBase64 = [messageData base64EncodedStringWithOptions:0];
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"ForwardNotifier-Status"] isEqual:@"1"] && (locked)) {
dispatch_queue_t sendnotif = dispatch_queue_create("Send Notif", NULL);
dispatch_async(sendnotif, ^{
title = [title stringByReplacingOccurrencesOfString:@"\"" withString:@"\\""\""];
message = [message stringByReplacingOccurrencesOfString:@"\"" withString:@"\\""\""];
if (pcspecifier == 0) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"Linux\", \"img\": \"%@\", \"appname\": \"%@\"}",titleBase64,messageBase64,iconBase64,appName];
} else if (pcspecifier == 1) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"MacOS\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
} else if (pcspecifier == 2) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"iOS\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
} else if (pcspecifier == 3) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"Windows\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
}
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/usr/bin/curl"];
[task setArguments:@[@"-sS",[NSString stringWithFormat:@"%@:8000",ip],@"-d",command ]];
out = [NSPipe pipe];
[task setStandardError:out];
[task launch];
[task waitUntilExit];
NSFileHandle * read = [out fileHandleForReading];
NSData * dataRead = [read readDataToEndOfFile];
NSString *erroroutput = [[NSString alloc] initWithData:dataRead encoding:NSUTF8StringEncoding];
if ([erroroutput length] > 2 && errorlog) {
if ([erroroutput containsString:@"curl"] && ![erroroutput containsString:@"Empty reply"]) {
testnotif(@"ForwardNotifier Error",erroroutput);
}
}
});
}
}
}
static void (*_logos_orig$sender$BBServer$publishBulletin$destinations$)(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL, BBBulletin *, unsigned long long); static void _logos_method$sender$BBServer$publishBulletin$destinations$(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL, BBBulletin *, unsigned long long); static void (*_logos_orig$sender$SpringBoard$applicationDidFinishLaunching$)(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id); static void _logos_method$sender$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id);
static void _logos_method$sender$BBServer$publishBulletin$destinations$(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, BBBulletin * arg1, unsigned long long arg2) {
_logos_orig$sender$BBServer$publishBulletin$destinations$(self, _cmd, arg1, arg2);
title = arg1.content.title;
message = arg1.content.message;
bundleID = arg1.sectionID;
SBApplication *app = [[_logos_static_class_lookup$SBApplicationController() sharedInstance] applicationWithBundleIdentifier:bundleID];
appName = app.displayName;
if (([title length] != 0) || ([message length] != 0)) {
if ([title length] == 0) {
title = app.displayName;
}
if (![title containsString:@"ForwardNotifier"] && [arg1.date timeIntervalSinceNow] > -2) {
NSMutableDictionary *applist = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.greg0109.forwardnotifierblacklist"];
if (![applist valueForKey:arg1.sectionID] || [[NSString stringWithFormat:@"%@",[applist valueForKey:arg1.sectionID]] isEqual:@"0"]) {
pushnotif(FALSE);
}
} else if ([title isEqualToString:@"ForwardNotifier Test"]) {
pushnotif(TRUE);
}
}
}
static void _logos_method$sender$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, id arg1) {
[[NSDistributedNotificationCenter defaultCenter] addObserverForName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
NSString *titlenotif = notification.userInfo[@"title"];
NSString *messagenotif = notification.userInfo[@"message"];
if ([titlenotif isEqualToString:@"ActivateForwardNotifier"]) {
if ([messagenotif isEqualToString:@"true"]) {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-Status"];
} else if ([messagenotif isEqualToString:@"false"]) {
[[NSUserDefaults standardUserDefaults] setBool:FALSE forKey:@"ForwardNotifier-Status"];
}
} else {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-Status"];
title = @"ForwardNotifier Test";
message = @"This is a test notification";
testnotif(title,message);
}
}];
_logos_orig$sender$SpringBoard$applicationDidFinishLaunching$(self, _cmd, arg1);
}
static void (*_logos_orig$devicereceiver$SpringBoard$applicationDidFinishLaunching$)(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id); static void _logos_method$devicereceiver$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id);
static void _logos_method$devicereceiver$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, id arg1) {
[[NSDistributedNotificationCenter defaultCenter] addObserverForName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
NSString *titlenotif = notification.userInfo[@"title"];
NSString *messagenotif = notification.userInfo[@"message"];
testnotif(titlenotif,messagenotif);
}];
_logos_orig$devicereceiver$SpringBoard$applicationDidFinishLaunching$(self, _cmd, arg1);
}
static __attribute__((constructor)) void _logosLocalCtor_5c40de68(int __unused argc, char __unused **argv, char __unused **envp) {
loadPrefs();
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("com.greg0109.forwardnotifierprefs.settingschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce);
{Class _logos_class$_ungrouped$BBServer = objc_getClass("BBServer"); { MSHookMessageEx(_logos_class$_ungrouped$BBServer, @selector(initWithQueue:), (IMP)&_logos_method$_ungrouped$BBServer$initWithQueue$, (IMP*)&_logos_orig$_ungrouped$BBServer$initWithQueue$);}{ MSHookMessageEx(_logos_class$_ungrouped$BBServer, @selector(initWithQueue:dataProviderManager:syncService:dismissalSyncCache:observerListener:utilitiesListener:conduitListener:systemStateListener:settingsListener:), (IMP)&_logos_method$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$, (IMP*)&_logos_orig$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$);}{ MSHookMessageEx(_logos_class$_ungrouped$BBServer, sel_registerName("dealloc"), (IMP)&_logos_method$_ungrouped$BBServer$dealloc, (IMP*)&_logos_orig$_ungrouped$BBServer$dealloc);}}
if (receiver) {
{Class _logos_class$devicereceiver$SpringBoard = objc_getClass("SpringBoard"); { MSHookMessageEx(_logos_class$devicereceiver$SpringBoard, @selector(applicationDidFinishLaunching:), (IMP)&_logos_method$devicereceiver$SpringBoard$applicationDidFinishLaunching$, (IMP*)&_logos_orig$devicereceiver$SpringBoard$applicationDidFinishLaunching$);}}
} else {
{Class _logos_class$sender$BBServer = objc_getClass("BBServer"); { MSHookMessageEx(_logos_class$sender$BBServer, @selector(publishBulletin:destinations:), (IMP)&_logos_method$sender$BBServer$publishBulletin$destinations$, (IMP*)&_logos_orig$sender$BBServer$publishBulletin$destinations$);}Class _logos_class$sender$SpringBoard = objc_getClass("SpringBoard"); { MSHookMessageEx(_logos_class$sender$SpringBoard, @selector(applicationDidFinishLaunching:), (IMP)&_logos_method$sender$SpringBoard$applicationDidFinishLaunching$, (IMP*)&_logos_orig$sender$SpringBoard$applicationDidFinishLaunching$);}}
}
}
================================================
FILE: .theos/obj/arm64/main.m.f318108f.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64/main.m.f318108f.o: \
main.m /Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
================================================
FILE: .theos/obj/arm64e/FNPRootListController.m.2caf96a5.Td
================================================
/home/glith/Escritorio/forwardnotifier/.theos/obj/arm64e/FNPRootListController.m.2caf96a5.o: \
FNPRootListController.m /home/glith/theos/Prefix.pch \
/home/glith/theos/vendor/include/theos/BackwardsCompat.h \
/home/glith/theos/vendor/include/theos/IOSMacros.h \
/home/glith/theos/vendor/include/HBLog.h FNPRootListController.h \
/home/glith/theos/vendor/include/Preferences/PSListController.h \
/home/glith/theos/vendor/include/Preferences/PSViewController.h \
/home/glith/theos/vendor/include/Preferences/PSSpecifier.h \
/home/glith/theos/vendor/include/Preferences/PSTableCell.h \
/home/glith/theos/include/AppList/AppList.h \
/home/glith/theos/include/AppList/ALApplicationList.h \
/home/glith/theos/include/AppList/ALApplicationTableDataSource.h \
/home/glith/theos/include/AppList/ALValueCell.h \
/home/glith/theos/vendor/include/FrontBoardServices/FBSSystemService.h \
/home/glith/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h \
/home/glith/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h \
/home/glith/theos/vendor/include/BaseBoard/BSAction.h \
/home/glith/theos/vendor/include/BaseBoard/BSDescriptionProviding.h \
/home/glith/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h \
/home/glith/theos/vendor/include/BaseBoard/BSXPCCoding.h
/home/glith/theos/Prefix.pch:
/home/glith/theos/vendor/include/theos/BackwardsCompat.h:
/home/glith/theos/vendor/include/theos/IOSMacros.h:
/home/glith/theos/vendor/include/HBLog.h:
FNPRootListController.h:
/home/glith/theos/vendor/include/Preferences/PSListController.h:
/home/glith/theos/vendor/include/Preferences/PSViewController.h:
/home/glith/theos/vendor/include/Preferences/PSSpecifier.h:
/home/glith/theos/vendor/include/Preferences/PSTableCell.h:
/home/glith/theos/include/AppList/AppList.h:
/home/glith/theos/include/AppList/ALApplicationList.h:
/home/glith/theos/include/AppList/ALApplicationTableDataSource.h:
/home/glith/theos/include/AppList/ALValueCell.h:
/home/glith/theos/vendor/include/FrontBoardServices/FBSSystemService.h:
/home/glith/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h:
/home/glith/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h:
/home/glith/theos/vendor/include/BaseBoard/BSAction.h:
/home/glith/theos/vendor/include/BaseBoard/BSDescriptionProviding.h:
/home/glith/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h:
/home/glith/theos/vendor/include/BaseBoard/BSXPCCoding.h:
================================================
FILE: .theos/obj/arm64e/FNPRootListController.m.f07d197f.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64e/FNPRootListController.m.f07d197f.o: \
FNPRootListController.m /Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
FNPRootListController.h \
/Users/greg/theos/vendor/include/Preferences/PSListController.h \
/Users/greg/theos/vendor/include/Preferences/PSViewController.h \
/Users/greg/theos/vendor/include/Preferences/PSSpecifier.h \
/Users/greg/theos/vendor/include/Preferences/PSTableCell.h \
/Users/greg/theos/vendor/include/AppList/AppList.h \
/Users/greg/theos/vendor/include/AppList/ALApplicationList.h \
/Users/greg/theos/vendor/include/AppList/ALApplicationTableDataSource.h \
/Users/greg/theos/vendor/include/AppList/ALValueCell.h \
/Users/greg/theos/vendor/include/FrontBoardServices/FBSSystemService.h \
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h \
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h \
/Users/greg/theos/vendor/include/BaseBoard/BSAction.h \
/Users/greg/theos/vendor/include/BaseBoard/BSDescriptionProviding.h \
/Users/greg/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h \
/Users/greg/theos/vendor/include/BaseBoard/BSXPCCoding.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
FNPRootListController.h:
/Users/greg/theos/vendor/include/Preferences/PSListController.h:
/Users/greg/theos/vendor/include/Preferences/PSViewController.h:
/Users/greg/theos/vendor/include/Preferences/PSSpecifier.h:
/Users/greg/theos/vendor/include/Preferences/PSTableCell.h:
/Users/greg/theos/vendor/include/AppList/AppList.h:
/Users/greg/theos/vendor/include/AppList/ALApplicationList.h:
/Users/greg/theos/vendor/include/AppList/ALApplicationTableDataSource.h:
/Users/greg/theos/vendor/include/AppList/ALValueCell.h:
/Users/greg/theos/vendor/include/FrontBoardServices/FBSSystemService.h:
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRestartRenderServerAction.h:
/Users/greg/theos/vendor/include/SpringBoardServices/SBSRelaunchAction.h:
/Users/greg/theos/vendor/include/BaseBoard/BSAction.h:
/Users/greg/theos/vendor/include/BaseBoard/BSDescriptionProviding.h:
/Users/greg/theos/vendor/include/BaseBoard/BSSettingDescriptionProvider.h:
/Users/greg/theos/vendor/include/BaseBoard/BSXPCCoding.h:
================================================
FILE: .theos/obj/arm64e/ForwardNotifier.bundle/ForwardNotifier.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifier
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64e/ForwardNotifier.dylib.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifier.dylib
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64e/ForwardNotifierCC.bundle/ForwardNotifierCC.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifierCC
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64e/ForwardNotifierCC.m.98cdb3a4.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64e/ForwardNotifierCC.m.98cdb3a4.o: \
ForwardNotifierCC.m /Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
ForwardNotifierCC.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUIToggleModule.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUICAPackageDescription.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModule-Protocol.h \
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModuleContentViewController-Protocol.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
ForwardNotifierCC.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUIToggleModule.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUICAPackageDescription.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModule-Protocol.h:
/Users/greg/theos/include/ControlCenterUIKit/CCUIContentModuleContentViewController-Protocol.h:
================================================
FILE: .theos/obj/arm64e/ForwardNotifierReceiver.dSYM/Contents/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleIdentifier
com.apple.xcode.dsym.ForwardNotifierReceiver
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
dSYM
CFBundleSignature
????
CFBundleShortVersionString
1.0
CFBundleVersion
1
================================================
FILE: .theos/obj/arm64e/Tweak.x.586144b7.Td
================================================
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/.theos/obj/arm64e/Tweak.x.586144b7.o: \
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/.theos/obj/arm64e/Tweak.x.m \
/home/glith/theos/Prefix.pch \
/home/glith/theos/vendor/include/theos/BackwardsCompat.h \
/home/glith/theos/vendor/include/theos/IOSMacros.h \
/home/glith/theos/vendor/include/HBLog.h \
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/Tweak.h \
/home/glith/theos/include/NSTask.h \
/home/glith/theos/include/substrate.h
/home/glith/theos/Prefix.pch:
/home/glith/theos/vendor/include/theos/BackwardsCompat.h:
/home/glith/theos/vendor/include/theos/IOSMacros.h:
/home/glith/theos/vendor/include/HBLog.h:
/home/glith/Documentos/Coding/PrivateTweaks/forwardnotifier/Tweak.h:
/home/glith/theos/include/NSTask.h:
/home/glith/theos/include/substrate.h:
================================================
FILE: .theos/obj/arm64e/Tweak.x.6472c773.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64e/Tweak.x.6472c773.o: \
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64e/Tweak.x.m \
/Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
/Users/greg/Desktop/forwardnotifier/Tweak.h \
/Users/greg/theos/include/NSTask.h \
/Users/greg/theos/include/substrate.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
/Users/greg/Desktop/forwardnotifier/Tweak.h:
/Users/greg/theos/include/NSTask.h:
/Users/greg/theos/include/substrate.h:
================================================
FILE: .theos/obj/arm64e/Tweak.x.9020a7f1.Td
================================================
/home/glith/Escritorio/forwardnotifier/.theos/obj/arm64e/Tweak.x.9020a7f1.o: \
/home/glith/Escritorio/forwardnotifier/.theos/obj/arm64e/Tweak.x.m \
/home/glith/theos/Prefix.pch \
/home/glith/theos/vendor/include/theos/BackwardsCompat.h \
/home/glith/theos/vendor/include/theos/IOSMacros.h \
/home/glith/theos/vendor/include/HBLog.h \
/home/glith/Escritorio/forwardnotifier/Tweak.h \
/home/glith/theos/include/NSTask.h \
/home/glith/theos/include/substrate.h
/home/glith/theos/Prefix.pch:
/home/glith/theos/vendor/include/theos/BackwardsCompat.h:
/home/glith/theos/vendor/include/theos/IOSMacros.h:
/home/glith/theos/vendor/include/HBLog.h:
/home/glith/Escritorio/forwardnotifier/Tweak.h:
/home/glith/theos/include/NSTask.h:
/home/glith/theos/include/substrate.h:
================================================
FILE: .theos/obj/arm64e/Tweak.x.m
================================================
#line 1 "Tweak.x"
#import "Tweak.h"
struct SBIconImageInfo iconspecs;
BOOL receiver;
BOOL errorlog;
BOOL lockstateenabled;
int pcspecifier;
int methodspecifier;
BOOL keyauthentication;
NSString *user;
NSString *ip;
NSString *port;
NSString *password;
NSString *command;
NSString *finalCommand;
NSArray *arguments;
NSString *pc;
NSString *title;
NSMutableString *finalTitle;
NSString *message;
NSMutableString *finalMessage;
NSString *bundleID;
NSString *appName;
BOOL locked;
NSPipe *out;
static BBServer *notificationserver = nil;
static void loadPrefs() {
NSMutableDictionary *prefs = [NSMutableDictionary dictionaryWithContentsOfFile:@"/User/Library/Preferences/com.greg0109.forwardnotifierprefs.plist"];
receiver = prefs[@"receiver"] ? [prefs[@"receiver"] boolValue] : NO;
errorlog = prefs[@"errorlog"] ? [prefs[@"errorlog"] boolValue] : NO;
lockstateenabled = prefs[@"lockstateenabled"] ? [prefs[@"lockstateenabled"] boolValue] : YES;
pcspecifier = prefs[@"pcspecifier"] ? [prefs[@"pcspecifier"] intValue] : 0;
methodspecifier = prefs[@"methodspecifier"] ? [prefs[@"methodspecifier"] intValue] : 0;
keyauthentication = prefs[@"keyauthentication"] ? [prefs[@"keyauthentication"] boolValue] : NO;
user = prefs[@"user"] && !([prefs[@"user"] isEqualToString:@""]) ? [prefs[@"user"] stringValue] : @"user";
ip = prefs[@"ip"] && !([prefs[@"ip"] isEqualToString:@""]) ? [prefs[@"ip"] stringValue] : @"ip";
port = prefs[@"port"] && !([prefs[@"port"] isEqualToString:@""]) ? [prefs[@"port"] stringValue] : @"22";
password = prefs[@"password"] && !([prefs[@"password"] isEqualToString:@""]) ? [prefs[@"password"] stringValue] : @"password";
user = [user stringByReplacingOccurrencesOfString:@" " withString:@""];
ip = [ip stringByReplacingOccurrencesOfString:@" " withString:@""];
password = [password stringByReplacingOccurrencesOfString:@" " withString:@""];
}
static dispatch_queue_t getBBServerQueue() {
static dispatch_queue_t queue;
static dispatch_once_t predicate;
dispatch_once(&predicate, ^{
void *handle = dlopen(NULL, RTLD_GLOBAL);
if (handle) {
dispatch_queue_t __weak *pointer = (__weak dispatch_queue_t *) dlsym(handle, "__BBServerQueue");
if (pointer) {
queue = *pointer;
}
dlclose(handle);
}
});
return queue;
}
#include
#if defined(__clang__)
#if __has_feature(objc_arc)
#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained
#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed))
#define _LOGOS_SELF_CONST const
#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained))
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
@class BBServer; @class SpringBoard; @class SBLockStateAggregator; @class SBApplicationController; @class SBIconController; @class BBAction; @class BBBulletin;
static BBServer* (*_logos_orig$_ungrouped$BBServer$initWithQueue$)(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id) _LOGOS_RETURN_RETAINED; static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id) _LOGOS_RETURN_RETAINED; static BBServer* (*_logos_orig$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$)(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id, id, id, id, id, id, id, id, id) _LOGOS_RETURN_RETAINED; static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$(_LOGOS_SELF_TYPE_INIT BBServer*, SEL, id, id, id, id, id, id, id, id, id) _LOGOS_RETURN_RETAINED; static void (*_logos_orig$_ungrouped$BBServer$dealloc)(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL); static void _logos_method$_ungrouped$BBServer$dealloc(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL);
static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$SBLockStateAggregator(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("SBLockStateAggregator"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$BBBulletin(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("BBBulletin"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$SBApplicationController(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("SBApplicationController"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$SBIconController(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("SBIconController"); } return _klass; }static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$BBAction(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("BBAction"); } return _klass; }
#line 70 "Tweak.x"
static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$(_LOGOS_SELF_TYPE_INIT BBServer* __unused self, SEL __unused _cmd, id arg1) _LOGOS_RETURN_RETAINED {
notificationserver = _logos_orig$_ungrouped$BBServer$initWithQueue$(self, _cmd, arg1);
return notificationserver;
}
static BBServer* _logos_method$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$(_LOGOS_SELF_TYPE_INIT BBServer* __unused self, SEL __unused _cmd, id arg1, id arg2, id arg3, id arg4, id arg5, id arg6, id arg7, id arg8, id arg9) _LOGOS_RETURN_RETAINED {
notificationserver = _logos_orig$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$(self, _cmd, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
return notificationserver;
}
static void _logos_method$_ungrouped$BBServer$dealloc(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) {
if (notificationserver == self) {
notificationserver = nil;
}
_logos_orig$_ungrouped$BBServer$dealloc(self, _cmd);
}
void testnotif(NSString *titletest, NSString *messagetest) {
BBBulletin *bulletin = [[_logos_static_class_lookup$BBBulletin() alloc] init];
bulletin.title = titletest;
bulletin.message = messagetest;
bulletin.sectionID = @"com.apple.Preferences";
bulletin.bulletinID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.recordID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.publisherBulletinID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.date = [NSDate date];
bulletin.defaultAction = [_logos_static_class_lookup$BBAction() actionWithLaunchBundleID:@"prefs:root=ForwardNotifier" callblock:nil];
dispatch_sync(getBBServerQueue(), ^{
[notificationserver publishBulletin:bulletin destinations:14];
});
}
BOOL isItLocked() {
if (lockstateenabled) {
locked = [[_logos_static_class_lookup$SBLockStateAggregator() sharedInstance] lockState];
} else {
locked = TRUE;
}
return locked;
}
void sanitizeText() {
finalTitle = [@"" mutableCopy];
for (int i=0; i 2 && errorlog) {
testnotif(@"ForwardNotifier Error",erroroutput);
}
});
}
} else if (methodspecifier == 1) {
SBApplicationIcon *icon = [((SBIconController *)[_logos_static_class_lookup$SBIconController() sharedInstance]).model expectedIconForDisplayIdentifier:bundleID];
UIImage *image = nil;
iconspecs.size = CGSizeMake(60, 60);
iconspecs.scale = [UIScreen mainScreen].scale;
iconspecs.continuousCornerRadius = 12;
image = [icon generateIconImageWithInfo:iconspecs];
NSData *iconData = UIImagePNGRepresentation(image);
NSString *iconBase64;
if (![title isEqualToString:@"ForwardNotifier Test"]) {
iconBase64 = [iconData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
} else {
iconBase64 = forwardNotifierIconBase64;
}
NSData *titleData = [title dataUsingEncoding: NSUTF8StringEncoding];
NSString *titleBase64 = [titleData base64EncodedStringWithOptions:0];
NSData *messageData = [message dataUsingEncoding: NSUTF8StringEncoding];
NSString *messageBase64 = [messageData base64EncodedStringWithOptions:0];
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"ForwardNotifier-Status"] isEqual:@"1"] && (locked)) {
dispatch_queue_t sendnotif = dispatch_queue_create("Send Notif", NULL);
dispatch_async(sendnotif, ^{
title = [title stringByReplacingOccurrencesOfString:@"\"" withString:@"\\""\""];
message = [message stringByReplacingOccurrencesOfString:@"\"" withString:@"\\""\""];
if (pcspecifier == 0) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"Linux\", \"img\": \"%@\", \"appname\": \"%@\"}",titleBase64,messageBase64,iconBase64,appName];
} else if (pcspecifier == 1) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"MacOS\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
} else if (pcspecifier == 2) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"iOS\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
} else if (pcspecifier == 3) {
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"Windows\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
}
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/usr/bin/curl"];
[task setArguments:@[@"-sS",[NSString stringWithFormat:@"%@:8000",ip],@"-d",command ]];
out = [NSPipe pipe];
[task setStandardError:out];
[task launch];
[task waitUntilExit];
NSFileHandle * read = [out fileHandleForReading];
NSData * dataRead = [read readDataToEndOfFile];
NSString *erroroutput = [[NSString alloc] initWithData:dataRead encoding:NSUTF8StringEncoding];
if ([erroroutput length] > 2 && errorlog) {
if ([erroroutput containsString:@"curl"] && ![erroroutput containsString:@"Empty reply"]) {
testnotif(@"ForwardNotifier Error",erroroutput);
}
}
});
}
}
}
static void (*_logos_orig$sender$BBServer$publishBulletin$destinations$)(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL, BBBulletin *, unsigned long long); static void _logos_method$sender$BBServer$publishBulletin$destinations$(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST, SEL, BBBulletin *, unsigned long long); static void (*_logos_orig$sender$SpringBoard$applicationDidFinishLaunching$)(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id); static void _logos_method$sender$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id);
static void _logos_method$sender$BBServer$publishBulletin$destinations$(_LOGOS_SELF_TYPE_NORMAL BBServer* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, BBBulletin * arg1, unsigned long long arg2) {
_logos_orig$sender$BBServer$publishBulletin$destinations$(self, _cmd, arg1, arg2);
title = arg1.content.title;
message = arg1.content.message;
bundleID = arg1.sectionID;
SBApplication *app = [[_logos_static_class_lookup$SBApplicationController() sharedInstance] applicationWithBundleIdentifier:bundleID];
appName = app.displayName;
if (([title length] != 0) || ([message length] != 0)) {
if ([title length] == 0) {
title = app.displayName;
}
if (![title containsString:@"ForwardNotifier"] && [arg1.date timeIntervalSinceNow] > -2) {
NSMutableDictionary *applist = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.greg0109.forwardnotifierblacklist"];
if (![applist valueForKey:arg1.sectionID] || [[NSString stringWithFormat:@"%@",[applist valueForKey:arg1.sectionID]] isEqual:@"0"]) {
pushnotif(FALSE);
}
} else if ([title isEqualToString:@"ForwardNotifier Test"]) {
pushnotif(TRUE);
}
}
}
static void _logos_method$sender$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, id arg1) {
[[NSDistributedNotificationCenter defaultCenter] addObserverForName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
NSString *titlenotif = notification.userInfo[@"title"];
NSString *messagenotif = notification.userInfo[@"message"];
if ([titlenotif isEqualToString:@"ActivateForwardNotifier"]) {
if ([messagenotif isEqualToString:@"true"]) {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-Status"];
} else if ([messagenotif isEqualToString:@"false"]) {
[[NSUserDefaults standardUserDefaults] setBool:FALSE forKey:@"ForwardNotifier-Status"];
}
} else {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-Status"];
title = @"ForwardNotifier Test";
message = @"This is a test notification";
testnotif(title,message);
}
}];
_logos_orig$sender$SpringBoard$applicationDidFinishLaunching$(self, _cmd, arg1);
}
static void (*_logos_orig$devicereceiver$SpringBoard$applicationDidFinishLaunching$)(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id); static void _logos_method$devicereceiver$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST, SEL, id);
static void _logos_method$devicereceiver$SpringBoard$applicationDidFinishLaunching$(_LOGOS_SELF_TYPE_NORMAL SpringBoard* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, id arg1) {
[[NSDistributedNotificationCenter defaultCenter] addObserverForName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
NSString *titlenotif = notification.userInfo[@"title"];
NSString *messagenotif = notification.userInfo[@"message"];
testnotif(titlenotif,messagenotif);
}];
_logos_orig$devicereceiver$SpringBoard$applicationDidFinishLaunching$(self, _cmd, arg1);
}
static __attribute__((constructor)) void _logosLocalCtor_5c40de68(int __unused argc, char __unused **argv, char __unused **envp) {
loadPrefs();
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("com.greg0109.forwardnotifierprefs.settingschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce);
{Class _logos_class$_ungrouped$BBServer = objc_getClass("BBServer"); { MSHookMessageEx(_logos_class$_ungrouped$BBServer, @selector(initWithQueue:), (IMP)&_logos_method$_ungrouped$BBServer$initWithQueue$, (IMP*)&_logos_orig$_ungrouped$BBServer$initWithQueue$);}{ MSHookMessageEx(_logos_class$_ungrouped$BBServer, @selector(initWithQueue:dataProviderManager:syncService:dismissalSyncCache:observerListener:utilitiesListener:conduitListener:systemStateListener:settingsListener:), (IMP)&_logos_method$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$, (IMP*)&_logos_orig$_ungrouped$BBServer$initWithQueue$dataProviderManager$syncService$dismissalSyncCache$observerListener$utilitiesListener$conduitListener$systemStateListener$settingsListener$);}{ MSHookMessageEx(_logos_class$_ungrouped$BBServer, sel_registerName("dealloc"), (IMP)&_logos_method$_ungrouped$BBServer$dealloc, (IMP*)&_logos_orig$_ungrouped$BBServer$dealloc);}}
if (receiver) {
{Class _logos_class$devicereceiver$SpringBoard = objc_getClass("SpringBoard"); { MSHookMessageEx(_logos_class$devicereceiver$SpringBoard, @selector(applicationDidFinishLaunching:), (IMP)&_logos_method$devicereceiver$SpringBoard$applicationDidFinishLaunching$, (IMP*)&_logos_orig$devicereceiver$SpringBoard$applicationDidFinishLaunching$);}}
} else {
{Class _logos_class$sender$BBServer = objc_getClass("BBServer"); { MSHookMessageEx(_logos_class$sender$BBServer, @selector(publishBulletin:destinations:), (IMP)&_logos_method$sender$BBServer$publishBulletin$destinations$, (IMP*)&_logos_orig$sender$BBServer$publishBulletin$destinations$);}Class _logos_class$sender$SpringBoard = objc_getClass("SpringBoard"); { MSHookMessageEx(_logos_class$sender$SpringBoard, @selector(applicationDidFinishLaunching:), (IMP)&_logos_method$sender$SpringBoard$applicationDidFinishLaunching$, (IMP*)&_logos_orig$sender$SpringBoard$applicationDidFinishLaunching$);}}
}
}
================================================
FILE: .theos/obj/arm64e/main.m.0135e4e0.Td
================================================
/Users/greg/Desktop/forwardnotifier/.theos/obj/arm64e/main.m.0135e4e0.o: \
main.m /Users/greg/theos/Prefix.pch \
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h \
/Users/greg/theos/vendor/include/theos/IOSMacros.h \
/Users/greg/theos/vendor/include/HBLog.h \
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h
/Users/greg/theos/Prefix.pch:
/Users/greg/theos/vendor/include/theos/BackwardsCompat.h:
/Users/greg/theos/vendor/include/theos/IOSMacros.h:
/Users/greg/theos/vendor/include/HBLog.h:
/Users/greg/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
================================================
FILE: ForwardNotifier Client Tools/Crossplatform Server/ForwardNotifierServer.py
================================================
#!/usr/bin/env python3
from http.server import BaseHTTPRequestHandler, HTTPServer
import json
import platform
import subprocess
import base64
import requests
import re
import time
if platform.system() == "Windows":
from PIL import Image # convert to ico
from win10toast import ToastNotifier
toaster = ToastNotifier()
port = 8000
forwardnotifiericon = "iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAASJXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZppdmOpskb/M4o7BLqgGQ4EsNabwRv+3YFkZdpplzNvZbpsqaQjDkTzNSC3////jvsP/ySV7LLUVnopnn+55x4HT5p//Ov3b/D5/r3/0ni+F96/7l5vRF5KduXjf+vz9TB4XX584O0eYb5/3bXnO7E9BwqvgR8zsDvb8/XzJHk9Pl4P+TlQ348npbf681TncyB9Xnin8vzNr2k9Huz/3bsXKlFawo1SjDuF5O/f9phBevwOfgt/Yyrx7RX+uftSew5GQN4t7+3R+58D9C7Ib8/cx+i/nn0IfhzP19OHWJZnjHjy6RtBPryeXreJ78rhNaP4/o25Q/plOc/fc1Y7Zz9WN3IhouVZUTfY4W0YLpyEPN2PFX4qv8Lzen86P80Pr6R8efWTHw09RG59XMhhhRFO2PdRgzLFHHesPMaoMd3XWqqxRyVHIWX7CSfW1NNKjWRp3I7M5RRfcwn3vv3eT0PjzitwaQwMFvjIlz/un978kx93jlqIgm+vWDGvaHXNNCxz9perSEg4z7zJDfDbzzP9/qf6oVTJoNwwNxY4/HwMMSX8qK1085y4Tnh8tFBwdT0HIETcW5hMSGTAl5AklOBrjDUE4thI0GDmMeU4yUAQiYtJxpzoFldji3ZvPlPDvTZKLNFeBptIBKiVKrnpaZCsnIX6qblRQ0OSZBEpUqU56TIKCFeklFKLgdyoqeYqtdRaW+11tNRyk1Zaba31NnrsCQyUXnrtrfc+RnSDGw3GGlw/eGXGmWaeMsuss80+h1I+mlW0aNWmXceKKy1gYpVVV1t9jR3cBil23rLLrrvtvseh1k46+cgpp552+hmvrD2z+svPH2QtPLMWb6bsuvrKGq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mRmOlNlcS8+CiAgIDwvcGx1czpMaWNlbnNvcj4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICA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h+6Q+Zgvc/Q2Gk4aCwp8CnwQrU3C7LEK7P/sWKeeMBNkcu8HZEhoJIEjVVubrsl21ouGXZtLcZsGTJvPIrE4xXWOkU1xKL763y4FWtt1A2xqNUg8waVMnmr1ZRQxepb9PKMZjnQy1e11QftHIwTntctAxme1+n8Of8TCqmhI5S3/SWg1q+weUN+v4/bBbu2elBukvjEVEH/hQSpPL9k+lqKUwVuGAryugLSAwTz7xNRBc9uX3lHoqegqz/GmZCxS8Pw/OuzsSRDl9QVn38/HDcc0hRQgCMDca7MZa/v8xMqXaOqfePof5US8N7JKAvRpZ3LZFjjSL95x52mnQLOxQVvHo/wTEURCU3wzXgSzcQTe1P/OZqLCz4xaarmmrprM7K5UmXS9a5O16hMuqjX6RqQgWPrAPRLeSE43ke6ctmpGlkIjp9ZN2WsMkCmBr3dgZDt1+vrl1dgtwLdDoLsRqI1KwUMNPt1IdHkEMu2C4mmwGs5Lg8sl+OvgyxX3etf49v8iK0u+ESnh/t6330u54v/ANPdaJCn+0gpAAAAAElFTkSuQmCC"
version = "1.0.4"
iconpath = {
"Windows": "/temp/ForwardNotifierIcon",
"Linux": "/tmp/ForwardNotifierIcon",
"Darwin": "/tmp/ForwardNotifierIcon", #mac
"MacOS": "/tmp/ForwardNotifierIcon"
}
tries = 0
def checkforupadate():
global tries
try:
url = "https://raw.githubusercontent.com/Greg0109/ForwardNotifier/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/ForwardNotifierServer.py"
r = requests.get(url).text
m = re.search(r'version = .+', r)
ver = m.group(0).split("=")[1].replace('"', "").replace(" ", "")
if ver != version:
sendnotif("Update availabe!",
"Run the install script again to update ForwardNotifier", platform.system(), "ForwardNotifier", forwardnotifiericon)
except requests.exceptions.ConnectionError:
if tries < 5:
sendnotif("Couldn't access github", "Trying again in 5 seconds.", platform.system(), "ForwardNotifier", forwardnotifiericon)
time.sleep(5)
tries += 1
checkforupadate()
else:
sendnotif("Couldn't access github", "Please check your internet connection or contact the developer.", platform.system(), "ForwardNotifier", forwardnotifiericon)
# send os with the request since it's known by the sender
def sendnotif(Title, Message, OS, appname=None, icon=None):
# system = platform.system()
try:
try: # Try to decode
Title = base64.b64decode(Title.encode("utf-8")).decode("utf-8")
except:
print("Title is not base64")
try: # Try to decode
Message = base64.b64decode(Message.encode("utf-8")).decode("utf-8")
except:
print("Message is not base64")
if icon:
print("Theres an icon!")
icon = base64.decodebytes(icon.encode("utf-8"))
if OS == "Linux":
imageFile = "/tmp/"+appname
open(imageFile, "wb").write(icon)
else:
open(iconpath[OS], "wb").write(icon) # send img to correct path
print("Sending notification:")
print("Title: ", Title)
print("Message: ", Message)
print("App Name: ", appname)
if OS == "Windows":
if icon:
# try: # Try to decode
filename = iconpath[OS]
img = Image.open(filename)
img.save(iconpath[OS] + '.ico', format = 'ICO')
toaster.show_toast(Title,
Message,
icon_path=iconpath[OS] + ".ico",
duration=5,
threaded=True)
# except: # icon not base64 aka ignore
# toaster.show_toast(Title,
# Message,
# duration=5,
# threaded=True)
else:
toaster.show_toast(Title,
Message,
duration=5,
threaded=True)
elif OS == "Linux":
if icon:
imageFile = "/tmp/"+appname
subprocess.call(
["notify-send", "-i", imageFile, Title, Message])
else:
subprocess.call(
["notify-send", "-i", "applications-development", Title, Message])
elif OS == "Darwin" or OS == "MacOS": # macos
if icon:
subprocess.call(["/usr/local/bin/terminal-notifier",
"-sound", "pop", "-appIcon", iconpath[OS], "-title", Title, "-message", Message])
else:
subprocess.call(["/usr/local/bin/terminal-notifier",
"-sound", "pop", "-title", Title, "-message", Message])
except:
sendnotif("Error", "unknown error while sending notification", platform.system())
def checkbody(body): # checking the body for a post request, wont be a problem since we send it
try:
try:
body = json.loads(body)
except:
return [False, "Unable to parse json"]
if "Title" not in body:
return [False, "No 'Title' in body"]
if "Message" not in body:
return [False, "No 'Message' in body"]
if "OS" not in body:
return [False, "No 'OS' in body"]
if "img" in body:
try:
base64.decodebytes(body["img"].encode("utf-8"))
except:
return [False, "Img not base64"]
return [True]
except:
return [False, "unknown error"]
class S(BaseHTTPRequestHandler):
def send_res(self, args, code=200, Success=True):
self.send_response(code)
self.send_header('Content-type', 'text/html')
self.send_header('Access-Control-Allow-Origin', '*')
self.end_headers()
out = {
"Success": Success,
"value": args
}
print("Sending: ", json.dumps(out).encode('utf-8'))
self.wfile.write(json.dumps(out).encode('utf-8'))
def do_GET(self):
print("\nPath:", self.path)
print(self.headers)
self.send_res(
"Send a Post with a title and a message in a json format")
def do_POST(self):
# <--- Gets the size of data
content_length = int(self.headers['Content-Length'])
# <--- Gets the data itself
post_data = self.rfile.read(content_length)
# print(json.loads(post_data.decode('utf-8')))
print("\nPath:", str(self.path),
"\nHeaders:\n" + str(self.headers))
print(content_length)
if content_length > 0:
try:
body = post_data.decode('utf-8')
print("Body:\n" + post_data.decode('utf-8'), "\n")
except UnicodeEncodeError as e:
print("ForwardNotifierReciver Error:", e)
sendnotif("ForwardNotifierReciver Error:",
"invalid characters", platform.system())
if checkbody(body)[0] == True: # all good
body = json.loads(body)
if "img" in body:
if "appname" in body:
sendnotif(body["Title"], body["Message"],
body["OS"], body["appname"], body["img"]) # sends the body
else:
sendnotif(body["Title"], body["Message"],
body["OS"], body["img"])
else:
sendnotif(body["Title"], body["Message"],
body["OS"]) # sends the body
self.send_res("Sent!")
else: # Body is wrong
print(checkbody(body)[1]) # send the error
self.send_res(checkbody(body)[1], Success=False, code=400)
else:
self.send_res(
"POST request for {} . Please send a body".format(self.path), Success=False)
def run(server_class=HTTPServer, handler_class=S, port=port):
server_address = ('', port)
httpd = server_class(server_address, handler_class)
print('Starting httpd on port', port, '...')
checkforupadate()
try:
httpd.serve_forever()
except KeyboardInterrupt:
pass
httpd.server_close()
print('\nStopping httpd...')
if __name__ == '__main__':
from sys import argv
if len(argv) == 2:
run(port=int(argv[1]))
else:
run()
================================================
FILE: ForwardNotifier Client Tools/Crossplatform Server/Linux Autoinstall/ForwardNotifierInstaller.bash
================================================
#!/bin/bash
checkroot=$(whoami)
if [[ $checkroot != "root" ]]; then
echo "This script needs to be executed as root"
exit
fi
checkapt=$(which apt-get)
checkpacman=$(which pacman)
if [[ ! -z "$checkapt" ]]; then
manager="apt-get install"
echo "You are using apt-get"
elif [[ ! -z "$checkpacman" ]]; then
manager="pacman -S"
echo "You are using pacman"
else
echo "Package Manager not recognized"
exit
fi
user=$(awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) print $1}' /etc/passwd)
echo "Select your user account (type the number):"
iter=0
for username in "${user[@]}"
do
echo "$iter: $username"
iter=$(( iter + 1 ))
done
read answer
user="${user[$answer]}"
echo "user is $user"
echo "Checking python3 installation...."
check=$( which python3 )
if [[ -z "$check" ]]; then
sudo $manager python3
else
echo "Python3 is installed"
fi
echo "Installing python modules..."
checkmodules=$(pip3 freeze)
checkrequests=$(echo $checkmodules | grep -i requests)
if [[ -z $checkrequests ]]; then
pip3 install requests
fi
echo "Checking python script installation....."
serverinstalled=$( ls /usr/bin | grep ForwardNotifierServer)
if [[ -z $serverinstalled ]]; then
echo "Installing the python script...."
wget https://raw.githubusercontent.com/Greg0109/ForwardNotifier/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/ForwardNotifierServer.py
if [[ $? -ne 0 ]]; then
echo "Something went wrong with the download, please make sure your internet connection is on"
exit
fi
sudo mv ForwardNotifierServer.py /usr/bin/
echo "Python script installed"
else
echo "Python script is installed, updating....."
sudo rm /usr/bin/ForwardNotifierServer.py
wget https://raw.githubusercontent.com/Greg0109/ForwardNotifier/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/ForwardNotifierServer.py
if [[ $? -ne 0 ]]; then
echo "Something went wrong with the download, please make sure your internet connection is on"
exit
fi
sudo mv ForwardNotifierServer.py /usr/bin/
echo "Python script updated"
fi
echo "Checking service installation..."
service=$(ls /etc/systemd/system | grep ForwardNotifierServer)
if [[ -z $service ]]; then
echo "Setting up the service..."
sudo cat <> /etc/systemd/system/ForwardNotifierServer.service
[Unit]
Description=ForwardNotifierServer
Requires=network-online.target
[Service]
User=$user
ExecStart=$check /usr/bin/ForwardNotifierServer.py
Type=simple
RemainAfterExit=yes
Environment="DISPLAY=:0" "XAUTHORITY=/home/$user/.Xauthority"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable ForwardNotifierServer.service
sudo systemctl start ForwardNotifierServer.service
echo "Service set up, installation done!"
else
sudo systemctl daemon-reload
sudo systemctl enable ForwardNotifierServer.service
sudo systemctl start ForwardNotifierServer.service
echo "Service installed"
fi
echo "Checking notify-send installation...."
notifier=$(which notify-send)
if [[ -z "$notifier" ]]; then
sudo $manager libnotify-bin #sudo pacman -S libnotify
else
echo "Notify-send installed"
fi
host=$(hostname)
echo ""
echo "----------------------------"
echo ""
echo "This is your hostname: $host.local"
echo "You can also use your PC's ip address"
echo "Enjoy!"
================================================
FILE: ForwardNotifier Client Tools/Crossplatform Server/Mac Autoinstall/ForwardNotifierInstaller.bash
================================================
#!/bin/bash
echo "Checking for brew installation..."
brewinstallation=$(ls /usr/local/bin | grep brew)
if [[ -z $brewinstallation ]]; then
echo "Installing brew....."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
else
echo "Brew is already installed"
fi
echo "Installing wget..."
brew install wget
echo "Checking for terminal-notifier installation..."
terminalnotifierinstallation=$(ls /usr/local/bin | grep terminal-notifier)
if [[ -z $terminalnotifierinstallation ]]; then
echo "Installing terminal-notifier....."
brew install terminal-notifier
else
echo "Terminal-notifier already installed"
fi
echo "Checking python3 installation...."
check=$( which python3 )
if [[ -z "$check" ]]; then
brew install python3
else
echo "Python3 is installed"
fi
echo "Installing python modules..."
checkmodules=$(pip3 freeze)
checkrequests=$(echo $checkmodules | grep -i requests)
if [[ -z $checkrequests ]]; then
pip3 install requests
fi
echo "Checking python script installation....."
serverinstalled=$( ls ~/ | grep ForwardNotifierServer)
if [[ -z $serverinstalled ]]; then
echo "Installing the python script...."
wget https://raw.githubusercontent.com/Greg0109/ForwardNotifier/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/ForwardNotifierServer.py
if [[ $? -ne 0 ]]; then
echo "Something went wrong with the download, please make sure your internet connection is on"
exit
fi
sudo mv ForwardNotifierServer.py ~/
serverpath=$(echo ~/ForwardNotifierServer.py)
sudo cat <> ~/Library/LaunchAgents/ForwardNotifierServer.plist
Label
ForwardNotifierServer
ProgramArguments
$check
$serverpath
KeepAlive
EOF
sudo chown root:wheel ~/Library/LaunchAgents/ForwardNotifierServer.plist
sudo chmod 644 ~/Library/LaunchAgents/ForwardNotifierServer.plist
sudo launchctl load ~/Library/LaunchAgents/ForwardNotifierServer.plist
sudo launchctl start ~/Library/LaunchAgents/ForwardNotifierServer.plist
else
echo "Python script is installed, updating....."
sudo rm ~/ForwardNotifierServer.py
wget https://raw.githubusercontent.com/Greg0109/ForwardNotifier/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/ForwardNotifierServer.py
if [[ $? -ne 0 ]]; then
echo "Something went wrong with the download, please make sure your internet connection is on"
exit
fi
sudo mv ForwardNotifierServer.py ~/
sudo launchctl stop ~/Library/LaunchAgents/ForwardNotifierServer.plist
sudo launchctl load ~/Library/LaunchAgents/ForwardNotifierServer.plist
sudo launchctl start ~/Library/LaunchAgents/ForwardNotifierServer.plist
echo "Python script updated"
fi
host=$(hostname)
echo ""
echo "----------------------------"
echo ""
echo "This is your hostname: $host"
echo "You can also use your PC's ip address"
echo "Enjoy!"
echo "Reboot is required, press any key to reboot, or type \"cancel\" to reboot later:"
read reboot
if [[ $reboot != "cancel" ]]; then
sudo reboot
fi
================================================
FILE: ForwardNotifier Client Tools/Crossplatform Server/Windows Autoinstall/Program.cs
================================================
using System.IO;
using System;
using System.Net;
using System.Threading;
using System.Diagnostics;
using System.Security.Principal;
using System.Linq.Expressions;
using System.Net.Http.Headers;
using System.Reflection;
namespace ForwardNotifierSetup
{
class Program
{
static string PythonDirectory = "";
static bool DownloadCompleted = false;
static bool IsBusy = false;
static void Main(string[] args)
{
Console.Clear();
Console.SetCursorPosition(0, 0);
if (IsAdministrator())
{
if (args.Length == 0)
{
NoArgsMain();
}
else if (args.Length == 2)
{
if (args[0] == "-pd" && Directory.Exists(args[1]))
{
PythonDirectory = args[1];
Console.WriteLine("Downloading necessary modules, please wait...");
DownloadModules();
Console.WriteLine("Done, unzipping packages.");
GetServerPy();
}
else if (args[0] == "-uninstall" && args[1] == "-py")
{
try
{
Console.WriteLine("Uninstalling server. . .");
Process[] p = Process.GetProcessesByName("Python");
foreach (var i in p)
i.Kill();
File.Delete($"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\Server.pyw");
Console.WriteLine("Downloading python to uninstall python.");
DownloadPython();
Console.WriteLine("Uninstalling. . .");
Process pr = Process.Start(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\python-setup.exe", "/uninstall");
pr.WaitForExit();
Console.WriteLine("Done uninstalling!");
}
catch (Exception)
{
Console.WriteLine("Unable to uninstall. . .");
}
}
}
else if (args.Length == 1)
{
if (args[0] == "-uninstall")
{
try
{
Console.WriteLine("Uninstalling server. . .");
Process[] p = Process.GetProcessesByName("Python");
foreach (var i in p)
i.Kill();
File.Delete($"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\Server.pyw");
Console.WriteLine("Successfully uninstalled!");
}
catch (Exception)
{
Console.WriteLine("Unable to uninstall. . .");
}
Console.ReadKey(true);
}
}
}
else
{
Console.WriteLine("Please run this program as administrator...");
Console.ReadKey(true);
}
}
static void NoArgsMain()
{
Console.WriteLine("Installing ForwardNotifier. . .");
Console.WriteLine("Checking if python is installed.");
string userApps = $@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Programs";
if (!Directory.Exists(userApps + "\\Python"))
{
DownloadPython();
}
try
{
DirectoryInfo directories = new DirectoryInfo(userApps + @"\Python");
foreach (var i in directories.GetDirectories())
{
if (i.Name == "Launcher")
continue;
else
{
PythonDirectory = i.FullName;
break;
}
}
}
catch (Exception)
{
Console.WriteLine("Python directory not found. Press any key to run python setup else exit and contact dev.");
Console.ReadKey(true);
Console.Clear();
DownloadPython();
DirectoryInfo directories = new DirectoryInfo(userApps + @"\Python");
foreach (var i in directories.GetDirectories())
{
if (i.Name == "Launcher")
continue;
else
{
PythonDirectory = i.FullName;
break;
}
}
}
Console.WriteLine("Downloading necessary modules, please wait...");
DownloadModules();
Console.WriteLine("Done, unzipping packages.");
GetServerPy();
}
static void GetServerPy()
{
using (WebClient client = new WebClient())
{
client.DownloadFile("https://raw.githubusercontent.com/Greg0109/ForwardNotifier/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/ForwardNotifierServer.py", $"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\Server.pyw");
}
try
{
Process.Start($"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\Server.pyw");
}
catch (System.ComponentModel.Win32Exception)
{
Console.WriteLine("Unable to start the file. No big deal, just reboot and it will work!");
}
Console.WriteLine("Done!");
Console.ReadKey(true);
}
static void DownloadModules()
{
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = PythonDirectory + @"\Scripts\pip.exe";
psi.Arguments = "install win10toast";
psi.UseShellExecute = false;
Process p = new Process();
p.StartInfo = psi;
p.Start();
p.WaitForExit();
}
static void DownloadPython()
{
Console.WriteLine("Python is not installed, installing python... please wait.");
using (WebClient client = new WebClient())
{
Console.CursorVisible = false;
client.DownloadProgressChanged += Client_DownloadProgressChanged;
client.DownloadFileCompleted += Client_DownloadFileCompleted;
client.DownloadFileAsync(new Uri(Environment.Is64BitOperatingSystem ? "https://www.python.org/ftp/python/3.8.3/python-3.8.3-amd64.exe" : "https://www.python.org/ftp/python/3.8.3/python-3.8.3.exe"), Path.Combine(Directory.GetCurrentDirectory(), "python-setup.exe"));
while (!DownloadCompleted)
Thread.Sleep(1000);
}
Console.CursorVisible = true;
Console.WriteLine("Download completed. Running installer.");
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = Path.Combine(Directory.GetCurrentDirectory(), "python-setup.exe");
psi.UseShellExecute = true;
psi.Arguments = "/passive InstallLauncherAllUsers=0 PrependPath=1 Include_pip=1 Include_test=0";
Process p = new Process();
p.StartInfo = psi;
p.Start();
p.WaitForExit();
}
private static void Client_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
DownloadCompleted = true;
Console.SetCursorPosition(0, 3);
}
private static void Client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
if (!IsBusy)
{
IsBusy = true;
Console.SetCursorPosition(0, 3);
if (e.ProgressPercentage < 10)
{
Console.Write("[ ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 20)
{
Console.Write("[# ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 30)
{
Console.Write("[## ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 40)
{
Console.Write("[### ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 50)
{
Console.Write("[#### ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 60)
{
Console.Write("[##### ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 70)
{
Console.Write("[###### ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 80)
{
Console.Write("[####### ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 90)
{
Console.Write("[######## ] " + e.ProgressPercentage + "%");
}
else if (e.ProgressPercentage < 100)
{
Console.Write("[######### ] " + e.ProgressPercentage + "%");
}
else
{
Console.Write("[##########] " + e.ProgressPercentage + "%");
}
IsBusy = false;
}
}
public static bool IsAdministrator()
{
return (new WindowsPrincipal(WindowsIdentity.GetCurrent()))
.IsInRole(WindowsBuiltInRole.Administrator);
}
}
}
================================================
FILE: ForwardNotifier.plist
================================================
{ Filter = { Bundles = ( "com.apple.springboard" ); }; }
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
================================================
FILE: Makefile
================================================
ARCHS = arm64 arm64e
FINALPACKAGE = 1
GO_EASY_ON_ME = 1
INSTALL_TARGET_PROCESSES = SpringBoard
include $(THEOS)/makefiles/common.mk
TWEAK_NAME = ForwardNotifier
ForwardNotifier_FILES = Tweak.x
ForwardNotifier_CFLAGS = -fobjc-arc
include $(THEOS_MAKE_PATH)/tweak.mk
SUBPROJECTS += forwardnotifier
SUBPROJECTS += forwardnotifiercc
SUBPROJECTS += forwardnotifierreceiver
include $(THEOS_MAKE_PATH)/aggregate.mk
================================================
FILE: README.md
================================================
# ForwardNotifier
Forward your notifications from your iOS device to your PC/iOS device!
Hi! This tweak forwards your notifications to your PC (Windows, Mac or Linux!) or iOS device (tested on iOS 9-13 for the receiver part)
Up uptil now it only worked using SSH, but now, I am introducing the crossplatform server! A python script that creates a https server on your machine that listens to ForwardNotifier calls to display those notifications on your PC. (**Crossplatform server doesn't work on iOS devices, if you want to use an iOS device as a receiver you must use SSH. Instructions down below**).
**Read both methods (SSH and Crossplatform server) to decide which method you prefer to use. If one method does not work for you, you can try the other method**.
**If you are a beginner, I suggest you use the Crossplatform Server, it's much more user friendly. The SSH tutorial and Crossplatform tutorial are down below.**
# SSH Setup for the Receiver
## DO NOT USE THE SSH OPTION IF YOU STILL HAVE A VERSION THAT SUPPORTS IT. IT HAS A MAJOR BUG THAT COULD BE USED TO RUN TERMINAL COMMANDS ON YOUR COMPUTER
### MacOS
For MacOS you need a tool called “terminal-notifier”. It’s free and there are several tutorials on how to install it. Like this [one](https://brewinstall.org/install-terminal-notifier-on-mac-with-brew/)
To enable ssh on a Mac, follow this [tutorial](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwi6pbvMidzpAhURahQKHQYaBvsQFjACegQIDBAG&url=https%3A%2F%2Fosxdaily.com%2F2011%2F09%2F30%2Fremote-login-ssh-server-mac-os-x%2F&usg=AOvVaw3qUh4DI6uMFzS8KsyDa5Wm)
### Linux
For Linux you need a tool called “notify-send”. It comes preinstalled on several distros (most of Ubuntu flavors have it).
To enable ssh on Linux, install openssh-server
### Windows
For windows there’s a custom [tool](https://github.com/Greg0109/ForwardNotifier/tree/master/ForwardNotifier%20Client%20Tools/Windows%20SSH%20Client%20tool) (Although it is advised to use the Crossplatform server if using windows. It works better, is much more stable and it's more user friendly)
You also need OpenSSH server to be installed and working (**Please install openssh from [Powershell](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse#installing-openssh-with-powershell), in our testing it has proved to be more effective and it causes less errors**)
**Please, make sure the SSH service is up and running [SSH Service Configuration](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse#initial-configuration-of-ssh-server)**
**To use the tool, you need to download both .exe files and put them in Documents/ForwardNotifier, then, open the "SetEnvironmentVariable.exe" and it will set everything up.
Do not remove those .exe files, they are needed for it to work!
You might need a reboot upon installation.**
### iOS
On iOS you only need to have ForwardNotifier installed on both devices!
Notifications can be disabled when device is unlocked.
# Crossplatform Server Setup for the Receiver
To install the crossplatform server, you only need to install the provided Autoinstall packages. These installers will check and install all necessary dependencies for this program to work. **The Crossplatform server will autolaunch on every boot of the system**. Follow the instructions for each specific OS down below:
[MacOS](https://github.com/Greg0109/ForwardNotifier/blob/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/Mac%20Autoinstall/ForwardNotifierInstaller.bash): Place the script anywhere you want on your Mac and launch it on terminal, like so "./ForwardNotifierInstaller" (Do not use sudo).
[Windows](https://github.com/Greg0109/ForwardNotifier/blob/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/Windows%20Autoinstall/ForwardNotifierSetup.exe): Execute it as administrator as you would any other .exe file
[Linux](https://github.com/Greg0109/ForwardNotifier/blob/master/ForwardNotifier%20Client%20Tools/Crossplatform%20Server/Linux%20Autoinstall/ForwardNotifierInstaller.bash): Place the script anywhere you want on your Linux machine and launch it on terminal, like so "sudo ./ForwardNotifierInstaller" (please, use sudo).
If there's a "permissions error" while trying to use the MacOS or Linux tool, give the script permissions by using "chmod +x ForwardNotifierInstaller" in terminal on the same directory as the script.
# Where to find user and hostname
### In MacOS and Linux:
if you open terminal and type "users" you will get the users.
Also if you type "hostname", you will get the hostname.
Hostname needs a .local at the end.
**Password on all cases are the same as your main accounts on your devices**
### In Windows:
In Windows the username is the same as your username for your account.
IP can be found if you type "ipconfig" on cmd
**Password on all cases are the same as your main accounts on your devices**
### In iOS:
User is "root" or "mobile"
Hostname can be found if you open terminal, the first line where it usually says "*s-iphone"
You can also use your local ip instead of a hostname
**The default iOS password for SSH is "alpine" but you should definitely change your SSH password**
# ForwardNotifier sender setup
## Steps:
-Once the receivers have been setup, go to the tweak settings and fill out the SSH information there.
-**Make sure the user and hostname/ip are correct. Keep in mind that the crossplatform server only requires the hostname information**
-Enable the necessary switches
-**In order to activate the tweak, you need to activate the CC module and make sure its enabled. CC module can be found in the CC settings, if it's not there, you might need to install a third party CC module enabler like CCSupport**
# Additional Information
Since this tweak relies on a CC module to enable or disable it, it only supports iOS 11-13, but, I’ve tested the receiver from iOS 9-13 and it works without problems.
**Don't forget to insert your password!**
**If you prefer to use Key authentication, then make sure the key is working properly before using it. I've tested this tweak with keys using the .pem format**
# Troubleshooting
If the ssh fails, you will get a notification on your sender device with the title "ForwardNotifier Error". This will have the output of the error as a message. It will point you in the direction of where the error happened.
If you don't get that message and the notifications are still not displayed on the receiver, then something is wrong on the receiver end.
Other than that, there’s nothing more to it! Enjoy!
# Special thanks!
Thanks [u/LavamasterYT](https://www.reddit.com/u/LavamasterYT/?utm_source=share&utm_medium=ios_app&utm_name=iossmf) for making the SSH Windows Tool and the Windows Installation Package for the Crossplatform Server
Thanks to [u/tokilokit](https://www.reddit.com/u/tokilokit/?utm_source=share&utm_medium=ios_app&utm_name=iossmf) for the idea and development of the python script used for the Crossplatform server. His [GitHub](https://github.com/tokfrans03).
================================================
FILE: Tweak.h
================================================
#import
#import
#import
#import
#include
@interface NSDistributedNotificationCenter : NSNotificationCenter
+ (instancetype)defaultCenter;
- (void)postNotificationName:(NSString *)name object:(NSString *)object userInfo:(NSDictionary *)userInfo;
@end
@interface JBBulletinManager : NSObject
+(id)sharedInstance;
-(id)showBulletinWithTitle:(NSString *)title message:(NSString *)message bundleID:(NSString *)bundleID;
-(id)showBulletinWithTitle:(NSString *)title message:(NSString *)message bundleID:(NSString *)bundleID hasSound:(BOOL)hasSound soundID:(int)soundID vibrateMode:(int)vibrate soundPath:(NSString *)soundPath attachmentImage:(UIImage *)attachmentImage overrideBundleImage:(UIImage *)overrideBundleImage;
@end
@interface SpringBoard
-(void)applicationDidFinishLaunching:(id)arg1 ;
@end
@interface BBAction : NSObject
+(id)actionWithLaunchURL:(id)arg1 callblock:(/*^block*/id)arg2 ;
+(id)actionWithLaunchBundleID:(id)arg1 callblock:(/*^block*/id)arg2 ;
+(id)actionWithCallblock:(/*^block*/id)arg1 ;
+(id)actionWithAppearance:(id)arg1 ;
+(id)actionWithLaunchURL:(id)arg1 ;
+(id)actionWithActivatePluginName:(id)arg1 activationContext:(id)arg2 ;
+(id)actionWithIdentifier:(id)arg1 ;
+(id)actionWithIdentifier:(id)arg1 title:(id)arg2 ;
+(id)actionWithLaunchBundleID:(id)arg1 ;
@end
@class BBContent;
@interface BBContent : NSObject
@property (nonatomic,retain) NSString * message;
@property (nonatomic,retain) NSString * title;
@end
@interface BBSectionIcon : NSObject
@end
@interface BBBulletin : NSObject
@property (nonatomic,retain) NSString * message;
@property (nonatomic,retain) NSString * title;
@property (nonatomic,retain) NSString * sectionID;
@property (nonatomic,retain) BBSectionIcon * icon;
@property (nonatomic,retain) NSString * bulletinID;
@property (nonatomic,retain) NSString * recordID;
@property (nonatomic,retain) NSString * publisherBulletinID;
@property (nonatomic,retain) NSString * sectionDisplayName;
@property (nonatomic,retain) NSDate * date;
@property (nonatomic,copy) BBAction * defaultAction;
@property (nonatomic,retain) BBContent * content;
@end
@interface BBServer
-(void)publishBulletin:(id)arg1 destinations:(unsigned long long)arg2 ;
@end
@interface SBLockStateAggregator : NSObject
+(id)sharedInstance;
-(unsigned long long)lockState;
@end
typedef struct SBIconImageInfo {
CGSize size;
double scale;
double continuousCornerRadius;
} SBIconImageInfo;
@interface SBApplicationIcon : NSObject
// iOS 12 and below
- (UIImage *)generateIconImage:(int)arg1;
// iOS 13
- (id)generateIconImageWithInfo:(SBIconImageInfo)arg1;
@end
@interface SBIconModel : NSObject
- (SBApplicationIcon *)expectedIconForDisplayIdentifier:(id)arg1;
@end
@interface SBIconController : UIViewController
@property (nonatomic, retain) SBIconModel *model;
+ (id)sharedInstance;
@end
@interface SBApplication : NSObject
+(id)sharedInstance;
-(NSString *)displayName;
@end
@interface SBApplicationController : NSObject
-(id)applicationWithBundleIdentifier:(id)arg1 ;
@end
NSString *forwardNotifierIconBase64 = @"iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAASJXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZppdmOpskb/M4o7BLqgGQ4EsNabwRv+3YFkZdpplzNvZbpsqaQjDkTzNSC3////jvsP/ySV7LLUVnopnn+55x4HT5p//Ov3b/D5/r3/0ni+F96/7l5vRF5KduXjf+vz9TB4XX584O0eYb5/3bXnO7E9BwqvgR8zsDvb8/XzJHk9Pl4P+TlQ348npbf681TncyB9Xnin8vzNr2k9Huz/3bsXKlFawo1SjDuF5O/f9phBev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mRmOmxpCiAgICAgIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiCiAgICAgIHN0RXZ0OmNoYW5nZWQ9Ii8iCiAgICAgIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6Y2M1MmU0ZTktMWZlMS00N2Y4LWFiYTktNDFjNzE1YzA2YjZiIgogICAgICBzdEV2dDpzb2Z0d2FyZUFnZW50PSJHaW1wIDIuMTAgKExpbnV4KSIKICAgICAgc3RFdnQ6d2hlbj0iKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICAgPHBsdXM6SW1hZ2VTdXBwbGllcj4KICAgIDxyZGY6U2VxLz4KICAgPC9wbHVzOkltYWdlU3VwcGxpZXI+CiAgIDxwbHVzOkltYWdlQ3JlYXRvcj4KICAgIDxyZGY6U2VxLz4KICAgPC9wbHVzOkltYWdlQ3JlYXRvcj4KICAgPHBsdXM6Q29weXJpZ2h0T3duZXI+CiAgICA8cmRmOlNlcS8+CiAgIDwvcGx1czpDb3B5cmlnaHRPd25lcj4KICAgPHBsdXM6TGljZW5zb3I+CiAgICA8cmRmOlNlcS8+CiAgIDwvcGx1czpMaWNlbnNvcj4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PlljaEQAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfkBhoSIR/v0N5nAAAEHUlEQVRo3uWbX0wcVRSHv5kdlt0VsdFqSqNsokWMlRpjtWqphIAvjdSkKQkx8UWTNtpEoQm++GBMTEzFCI3xyRceKmrEql1ropS2KChNFSqQpsSGZheKlMVYkP03O7PXh90KdRe7mzDDzPB7vDM3d749955z7t1zJVbQ9oOfU1axowbYC+wEqgA31pIKjAIDwLE/fj/b98uHjTlflHI1NnSE6oD3gW3YSyPAoUBzee//gu75IOQSOm1AC/ZWu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LdDoLsRqI1KwUMNPt1IdHkEMu2C4mmwGs5Lg8sl+OvgyxX3etf49v8iK0u+ESnh/t6330u54v/ANPdaJCn+0gpAAAAAElFTkSuQmCC";
================================================
FILE: Tweak.x
================================================
#import "Tweak.h"
struct SBIconImageInfo iconspecs;
//Settings
BOOL receiver;
BOOL errorlog;
BOOL lockstateenabled;
int pcspecifier;
//Settings
int methodspecifier;
BOOL keyauthentication;
NSString *user;
NSString *ip;
NSString *port;
NSString *password;
NSString *command;
NSString *finalCommand;
NSArray *arguments;
//Notifications
NSString *pc;
NSString *title;
NSMutableString *finalTitle;
NSString *message;
NSMutableString *finalMessage;
NSString *bundleID;
NSString *appName;
BOOL locked;
//For the error output
NSPipe *out;
static BBServer *notificationserver = nil;
static void loadPrefs() {
NSMutableDictionary *prefs = [NSMutableDictionary dictionaryWithContentsOfFile:@"/User/Library/Preferences/com.greg0109.forwardnotifierprefs.plist"];
receiver = prefs[@"receiver"] ? [prefs[@"receiver"] boolValue] : NO;
errorlog = prefs[@"errorlog"] ? [prefs[@"errorlog"] boolValue] : NO;
lockstateenabled = prefs[@"lockstateenabled"] ? [prefs[@"lockstateenabled"] boolValue] : YES;
pcspecifier = prefs[@"pcspecifier"] ? [prefs[@"pcspecifier"] intValue] : 0;
methodspecifier = prefs[@"methodspecifier"] ? [prefs[@"methodspecifier"] intValue] : 0;
keyauthentication = prefs[@"keyauthentication"] ? [prefs[@"keyauthentication"] boolValue] : NO;
user = prefs[@"user"] && !([prefs[@"user"] isEqualToString:@""]) ? [prefs[@"user"] stringValue] : @"user";
ip = prefs[@"ip"] && !([prefs[@"ip"] isEqualToString:@""]) ? [prefs[@"ip"] stringValue] : @"ip";
port = prefs[@"port"] && !([prefs[@"port"] isEqualToString:@""]) ? [prefs[@"port"] stringValue] : @"22";
password = prefs[@"password"] && !([prefs[@"password"] isEqualToString:@""]) ? [prefs[@"password"] stringValue] : @"password";
user = [user stringByReplacingOccurrencesOfString:@" " withString:@""];
ip = [ip stringByReplacingOccurrencesOfString:@" " withString:@""];
password = [password stringByReplacingOccurrencesOfString:@" " withString:@""];
}
static dispatch_queue_t getBBServerQueue() {
static dispatch_queue_t queue;
static dispatch_once_t predicate;
dispatch_once(&predicate, ^{
void *handle = dlopen(NULL, RTLD_GLOBAL);
if (handle) {
dispatch_queue_t __weak *pointer = (__weak dispatch_queue_t *) dlsym(handle, "__BBServerQueue");
if (pointer) {
queue = *pointer;
}
dlclose(handle);
}
});
return queue;
}
%hook BBServer
-(id)initWithQueue:(id)arg1 {
notificationserver = %orig;
return notificationserver;
}
-(id)initWithQueue:(id)arg1 dataProviderManager:(id)arg2 syncService:(id)arg3 dismissalSyncCache:(id)arg4 observerListener:(id)arg5 utilitiesListener:(id)arg6 conduitListener:(id)arg7 systemStateListener:(id)arg8 settingsListener:(id)arg9 {
notificationserver = %orig;
return notificationserver;
}
- (void)dealloc {
if (notificationserver == self) {
notificationserver = nil;
}
%orig;
}
%end
void testnotif(NSString *titletest, NSString *messagetest) {
BBBulletin *bulletin = [[%c(BBBulletin) alloc] init];
bulletin.title = titletest;
bulletin.message = messagetest;
bulletin.sectionID = @"com.apple.Preferences";
bulletin.bulletinID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.recordID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.publisherBulletinID = [[NSProcessInfo processInfo] globallyUniqueString];
bulletin.date = [NSDate date];
bulletin.defaultAction = [%c(BBAction) actionWithLaunchBundleID:@"prefs:root=ForwardNotifier" callblock:nil];
dispatch_sync(getBBServerQueue(), ^{
[notificationserver publishBulletin:bulletin destinations:14];
});
}
BOOL isItLocked() {
if (lockstateenabled) {
locked = [[%c(SBLockStateAggregator) sharedInstance] lockState];
} else {
locked = TRUE;
}
return locked;
}
void sanitizeText() { //Thanks Tom for the idea of using \ everywhere :P
finalTitle = [@"" mutableCopy];
for (int i=0; i 2 && errorlog) {
testnotif(@"ForwardNotifier Error",erroroutput);
}
});
}
} else if (methodspecifier == 1) { // Crossplatform Server
// Get Icon data
SBApplicationIcon *icon = [((SBIconController *)[%c(SBIconController) sharedInstance]).model expectedIconForDisplayIdentifier:bundleID];
UIImage *image = nil;
iconspecs.size = CGSizeMake(60, 60);
iconspecs.scale = [UIScreen mainScreen].scale;
iconspecs.continuousCornerRadius = 12;
image = [icon generateIconImageWithInfo:iconspecs];
NSData *iconData = UIImagePNGRepresentation(image);
NSString *iconBase64;
if (![title isEqualToString:@"ForwardNotifier Test"]) {
iconBase64 = [iconData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
} else {
iconBase64 = forwardNotifierIconBase64;
}
// Base64 both title and message
NSData *titleData = [title dataUsingEncoding: NSUTF8StringEncoding];
NSString *titleBase64 = [titleData base64EncodedStringWithOptions:0];
NSData *messageData = [message dataUsingEncoding: NSUTF8StringEncoding];
NSString *messageBase64 = [messageData base64EncodedStringWithOptions:0];
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"ForwardNotifier-Status"] isEqual:@"1"] && (locked)) {
dispatch_queue_t sendnotif = dispatch_queue_create("Send Notif", NULL);
dispatch_async(sendnotif, ^{
title = [title stringByReplacingOccurrencesOfString:@"\"" withString:@"\\""\""];
message = [message stringByReplacingOccurrencesOfString:@"\"" withString:@"\\""\""];
if (pcspecifier == 0) { // Linux
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"Linux\", \"img\": \"%@\", \"appname\": \"%@\"}",titleBase64,messageBase64,iconBase64,appName];
} else if (pcspecifier == 1) { // MacOS
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"MacOS\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
} else if (pcspecifier == 2) { // iOS
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"iOS\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
} else if (pcspecifier == 3) { // Windows
command = [NSString stringWithFormat:@"{\"Title\": \"%@\", \"Message\": \"%@\", \"OS\": \"Windows\", \"img\": \"%@\"}",titleBase64,messageBase64,iconBase64];
}
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/usr/bin/curl"];
[task setArguments:@[@"-sS",[NSString stringWithFormat:@"%@:8000",ip],@"-d",command ]];
out = [NSPipe pipe];
[task setStandardError:out];
[task launch];
[task waitUntilExit];
NSFileHandle * read = [out fileHandleForReading];
NSData * dataRead = [read readDataToEndOfFile];
NSString *erroroutput = [[NSString alloc] initWithData:dataRead encoding:NSUTF8StringEncoding];
if ([erroroutput length] > 2 && errorlog) {
if ([erroroutput containsString:@"curl"] && ![erroroutput containsString:@"Empty reply"]) {
testnotif(@"ForwardNotifier Error",erroroutput);
}
}
});
}
}
}
%group sender
%hook BBServer
-(void)publishBulletin:(BBBulletin *)arg1 destinations:(unsigned long long)arg2 {
%orig;
title = arg1.content.title;
message = arg1.content.message;
bundleID = arg1.sectionID;
SBApplication *app = [[%c(SBApplicationController) sharedInstance] applicationWithBundleIdentifier:bundleID];
appName = app.displayName;
if (([title length] != 0) || ([message length] != 0)) {
if ([title length] == 0) {
title = app.displayName;
}
if (![title containsString:@"ForwardNotifier"] && [arg1.date timeIntervalSinceNow] > -2) { //This helps avoid the notifications to get forwarded again after a respring, which makes them avoid respring loops. If notifications are 2 seconds old, then won't get forwarded.
NSMutableDictionary *applist = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.greg0109.forwardnotifierblacklist"];
if (![applist valueForKey:arg1.sectionID] || [[NSString stringWithFormat:@"%@",[applist valueForKey:arg1.sectionID]] isEqual:@"0"]) {
pushnotif(FALSE);
}
} else if ([title isEqualToString:@"ForwardNotifier Test"]) {
pushnotif(TRUE);
}
}
}
%end
%hook SpringBoard
-(void)applicationDidFinishLaunching:(id)arg1 {
[[NSDistributedNotificationCenter defaultCenter] addObserverForName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
NSString *titlenotif = notification.userInfo[@"title"];
NSString *messagenotif = notification.userInfo[@"message"];
if ([titlenotif isEqualToString:@"ActivateForwardNotifier"]) {
if ([messagenotif isEqualToString:@"true"]) {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-Status"];
} else if ([messagenotif isEqualToString:@"false"]) {
[[NSUserDefaults standardUserDefaults] setBool:FALSE forKey:@"ForwardNotifier-Status"];
}
} else {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-Status"];
title = @"ForwardNotifier Test";
message = @"This is a test notification";
testnotif(title,message);
}
}];
%orig;
}
%end
%end
%group devicereceiver
%hook SpringBoard
-(void)applicationDidFinishLaunching:(id)arg1 {
[[NSDistributedNotificationCenter defaultCenter] addObserverForName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
NSString *titlenotif = notification.userInfo[@"title"];
NSString *messagenotif = notification.userInfo[@"message"];
testnotif(titlenotif,messagenotif);
}];
%orig;
}
%end
%end
%ctor {
loadPrefs();
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("com.greg0109.forwardnotifierprefs.settingschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce);
%init();
if (receiver) {
%init(devicereceiver);
} else {
%init(sender);
}
}
================================================
FILE: control
================================================
Package: com.greg0109.forwardnotifier
Name: ForwardNotifier
Depends: mobilesubstrate, sshpass, openssh, applist, preferenceloader, curl
Conflict: com.yourepo.greg0109.forwardnotifier8
Replaces: com.yourepo.greg0109.forwardnotifier8
Version: 1.4.3
Architecture: iphoneos-arm
Description: Forward Notifications to your PC!
Maintainer: Greg0109
Author: Greg0109
Section: Tweaks
================================================
FILE: forwardnotifier/.theos/build_session
================================================
================================================
FILE: forwardnotifier/.theos/obj/.stamp
================================================
================================================
FILE: forwardnotifier/FNPRootListController.h
================================================
#import
#import
#import
#import
#import
@interface FNPRootListController : PSListController
@property (nonatomic,retain) NSMutableDictionary *savedSpecifiers;
@end
typedef struct SBIconImageInfo {
CGSize size;
double scale;
double continuousCornerRadius;
} SBIconImageInfo;
@interface FBSSystemService (ForwardNotifier)
+(id)sharedService;
-(void)sendActions:(id)arg1 withResult:(/*^block*/id)arg2 ;
@end
@interface SBSRelaunchAction (ForwardNotifier)
@property (nonatomic,copy,readonly) NSString * reason;
@property (nonatomic,readonly) unsigned long long options;
@property (nonatomic,retain,readonly) NSURL * targetURL;
+(id)actionWithReason:(id)arg1 options:(unsigned long long)arg2 targetURL:(id)arg3 ;
-(unsigned long long)options;
-(NSString *)reason;
-(id)initWithReason:(id)arg1 options:(unsigned long long)arg2 targetURL:(id)arg3 ;
-(NSURL *)targetURL;
@end
@interface NSDistributedNotificationCenter : NSNotificationCenter
+ (instancetype)defaultCenter;
- (void)postNotificationName:(NSString *)name object:(NSString *)object userInfo:(NSDictionary *)userInfo;
@end
@interface OBButtonTray : UIView
- (void)addButton:(id)arg1;
- (void)addCaptionText:(id)arg1;;
@end
@interface OBBoldTrayButton : UIButton
-(void)setTitle:(id)arg1 forState:(unsigned long long)arg2;
+(id)buttonWithType:(long long)arg1;
@end
@interface OBWelcomeController : UIViewController
- (OBButtonTray *)buttonTray;
- (id)initWithTitle:(id)arg1 detailText:(id)arg2 icon:(id)arg3;
- (void)addBulletedListItemWithTitle:(id)arg1 description:(id)arg2 image:(id)arg3;
@end
OBWelcomeController *welcomeController;
@interface UIImage (Private)
+ (id)_applicationIconImageForBundleIdentifier:(id)arg1 format:(int)arg2 scale:(double)arg3;
@end
================================================
FILE: forwardnotifier/FNPRootListController.m
================================================
#include "FNPRootListController.h"
int __isOSVersionAtLeast(int major, int minor, int patch) { NSOperatingSystemVersion version; version.majorVersion = major; version.minorVersion = minor; version.patchVersion = patch; return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:version]; }
@implementation FNPRootListController
- (NSArray *)specifiers {
if (!_specifiers) {
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
NSArray *chosenIDs = @[@"hide1",@"hide2",@"hide3",@"hide4"];
self.savedSpecifiers = (!self.savedSpecifiers) ? [[NSMutableDictionary alloc] init] : self.savedSpecifiers;
for(PSSpecifier *specifier in _specifiers) {
if ([chosenIDs containsObject:[specifier propertyForKey:@"id"]]) {
[self.savedSpecifiers setObject:specifier forKey:[specifier propertyForKey:@"id"]];
}
}
}
return _specifiers;
}
- (void)viewDidLoad {
[super viewDidLoad];
if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"ForwardNotifier-FirstUse"] isEqual:@"1"]) {
if (@available(iOS 13, *)){
[self updateController];
} else {
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"This tweak relies on a CC module!"
message:@"To enable or disable ForwardNotifier, you need to use the CC module. We recomend CC support to enable third party modules. This alert and any other that show up on settings will only show up once."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-FirstUse"];
}
}
((UITableView *)[self.view.subviews objectAtIndex:0]).keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"HideSSH"] isEqual:@"1"]) {
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide1"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide2"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide3"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide4"]] animated:YES];
}
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"HideSSH"] isEqual:@"0"]) {
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Possible exploit warning while using SSH"
message:@"While the text has been sanitized to avoid possible execution of commands, the text is sent 'as is' and this presents a possible security risk.\nIt is advised to use the Crossplatform Server as it's more secure"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
}
}
-(void)reloadSpecifiers {
[super reloadSpecifiers];
//This will look the exact same as step 5, where we only check if specifiers need to be removed
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"HideSSH"] isEqual:@"1"]) {
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide1"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide2"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide3"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide4"]] animated:YES];
}
}
- (id)readPreferenceValue:(PSSpecifier*)specifier {
NSString *path = [NSString stringWithFormat:@"/User/Library/Preferences/%@.plist", specifier.properties[@"defaults"]];
NSMutableDictionary *settings = [NSMutableDictionary dictionary];
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]];
return (settings[specifier.properties[@"key"]]) ?: specifier.properties[@"default"];
}
- (void)setPreferenceValue:(id)value specifier:(PSSpecifier*)specifier {
NSString *path = [NSString stringWithFormat:@"/User/Library/Preferences/%@.plist", specifier.properties[@"defaults"]];
NSMutableDictionary *settings = [NSMutableDictionary dictionary];
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]];
[settings setObject:value forKey:specifier.properties[@"key"]];
[settings writeToFile:path atomically:YES];
CFStringRef notificationName = (__bridge CFStringRef)specifier.properties[@"PostNotification"];
if (notificationName) {
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), notificationName, NULL, NULL, YES);
}
if ([[NSString stringWithFormat:@"%@",value] isEqual:@"3"] && [[NSString stringWithFormat:@"%@",specifier.properties[@"key"]] isEqual:@"pcspecifier"]) {
if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"ForwardNotifier-PCSpecifierWindows"] isEqual:@"1"]) {
if (@available(iOS 13,*)) {} else {
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Crossplatform use is advised!"
message:@"Windows SSH support is buggy at the moment. Crossplatform server use is advised."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-PCSpecifierWindows"];
}
}
} else if ([[NSString stringWithFormat:@"%@",value] isEqual:@"2"] && [[NSString stringWithFormat:@"%@",specifier.properties[@"key"]] isEqual:@"pcspecifier"]) {
if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"ForwardNotifier-PCSpecifieriOS"] isEqual:@"1"]) {
if (@available(iOS 13,*)) {} else {
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"iOS only supports SSH"
message:@"Since the crossplatform server uses python3, iOS as a receiver only supports SSH at the moment."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-PCSpecifieriOS"];
}
}
} else if ([[NSString stringWithFormat:@"%@",value] isEqual:@"1"] && [[NSString stringWithFormat:@"%@",specifier.properties[@"key"]] isEqual:@"methodspecifier"]) {
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide1"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide2"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide3"]] animated:YES];
[self removeContiguousSpecifiers:@[self.savedSpecifiers[@"hide4"]] animated:YES];
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"HideSSH"];
} else if ([[NSString stringWithFormat:@"%@",value] isEqual:@"0"] && [[NSString stringWithFormat:@"%@",specifier.properties[@"key"]] isEqual:@"methodspecifier"]) {
[self insertContiguousSpecifiers:@[self.savedSpecifiers[@"hide1"]] afterSpecifierID:@"hostnameip" animated:YES];
[self insertContiguousSpecifiers:@[self.savedSpecifiers[@"hide2"]] afterSpecifierID:@"hide1" animated:YES];
[self insertContiguousSpecifiers:@[self.savedSpecifiers[@"hide3"]] afterSpecifierID:@"hide2" animated:YES];
[self insertContiguousSpecifiers:@[self.savedSpecifiers[@"hide4"]] afterSpecifierID:@"hide3" animated:YES];
[[NSUserDefaults standardUserDefaults] setBool:FALSE forKey:@"HideSSH"];
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Possible exploit warning while using SSH"
message:@"While the text has been sanitized to avoid possible execution of commands, the text is sent 'as is' and this presents a possible security risk.\nIt is advised to use the Crossplatform Server as it's more secure"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
}
if ([[NSString stringWithFormat:@"%@",specifier.properties[@"key"]] isEqual:@"receiver"] || [[NSString stringWithFormat:@"%@",specifier.properties[@"key"]] isEqual:@"password"] || [[NSString stringWithFormat:@"%@",specifier.properties[@"key"]] isEqual:@"chargingenabled"]) {
UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:@"Respring" style:UIBarButtonItemStylePlain target:self action:@selector(killall)];
self.navigationItem.rightBarButtonItem = button;
}
}
-(void)updateController {
if (@available(iOS 13,*)) {
UIImage *iconImage = [UIImage imageNamed:@"IconWelcome" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil];
welcomeController = [[OBWelcomeController alloc] initWithTitle:@"ForwardNotifier!" detailText:@"Please, be sure to follow the github instructions carefully and enjoy the tweak!" icon:iconImage];
[welcomeController addBulletedListItemWithTitle:@"This tweak relies on a CC module!" description:@"To enable or disable ForwardNotifier, you need to use the CC module. We recommend CC support to enable third party modules." image:[UIImage systemImageNamed:@"1.circle.fill"]];
[welcomeController addBulletedListItemWithTitle:@"Use of the Crossplatform server is advised" description:@"The use of the crossplatform server is advised, as it brings more features and will have more support. Besides, it only requires the IP or hostname! No username or password is required." image:[UIImage systemImageNamed:@"2.circle.fill"]];
[welcomeController addBulletedListItemWithTitle:@"Windows" description:@"If you are using windows, please use the crossplatform server, as SSH on windows is not reliable enough." image:[UIImage systemImageNamed:@"3.circle.fill"]];
[welcomeController addBulletedListItemWithTitle:@"iOS" description:@"Using iOS as the receiver only works over SSH at the moment. Crossplatform support for iOS receiver is being researched." image:[UIImage systemImageNamed:@"4.circle.fill"]];
[welcomeController addBulletedListItemWithTitle:@"Support" description:@"If you are experiencing bugs, please read the github instructions carefuly, there is a link at the buttom of the preferences page. If you still need help, contact me via the links at the bottom of the preferences page." image:[UIImage systemImageNamed:@"5.circle.fill"]];
//welcomeController.buttonTray.effectView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemChromeMaterial];
UIVisualEffectView *effectWelcomeView = [[UIVisualEffectView alloc] initWithFrame:welcomeController.viewIfLoaded.bounds];
effectWelcomeView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemChromeMaterial];
[welcomeController.viewIfLoaded insertSubview:effectWelcomeView atIndex:0];
welcomeController.viewIfLoaded.backgroundColor = [UIColor clearColor];
OBBoldTrayButton* continueButton = [OBBoldTrayButton buttonWithType:1];
[continueButton addTarget:self action:@selector(dismissWelcomeController) forControlEvents:UIControlEventTouchUpInside];
[continueButton setTitle:@"Let's Go!" forState:UIControlStateNormal];
[continueButton setClipsToBounds:YES];
[continueButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[continueButton.layer setCornerRadius:15];
[welcomeController.buttonTray addButton:continueButton];
welcomeController.modalPresentationStyle = UIModalPresentationPageSheet;
welcomeController.modalInPresentation = YES;
welcomeController.view.tintColor = [UIColor systemBlueColor];
[self presentViewController:welcomeController animated:YES completion:nil];
}
}
-(void)dismissWelcomeController { // Say goodbye to your controller. :(
[welcomeController dismissViewControllerAnimated:YES completion:nil];
}
- (void)killall {
NSURL *relaunchURL = [NSURL URLWithString:@"prefs:root=ForwardNotifier"];
SBSRelaunchAction *restartAction;
restartAction = [NSClassFromString(@"SBSRelaunchAction") actionWithReason:@"RestartRenderServer" options:SBSRelaunchActionOptionsFadeToBlackTransition targetURL:relaunchURL];
[[NSClassFromString(@"FBSSystemService") sharedService] sendActions:[NSSet setWithObject:restartAction] withResult:nil];
}
- (void)paypal {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.paypal.me/greg0109"] options:@{} completionHandler:nil];
}
- (void)openTwitter {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://twitter.com/greg_0109"] options:@{} completionHandler:nil];
}
- (void)reddit {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.reddit.com/user/greg0109/"] options:@{} completionHandler:nil];
}
- (void)sendEmail {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:greg.rabago@gmail.com?subject=ForwardNotifier"] options:@{} completionHandler:nil];
}
-(void)testnotif {
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil userInfo:nil];
}
@end
================================================
FILE: forwardnotifier/Makefile
================================================
ARCHS = arm64 arm64e
GO_EASY_ON_ME = 1
include $(THEOS)/makefiles/common.mk
BUNDLE_NAME = ForwardNotifier
ForwardNotifier_FILES = FNPRootListController.m
ForwardNotifier_INSTALL_PATH = /Library/PreferenceBundles
ForwardNotifier_FRAMEWORKS = UIKit
ForwardNotifier_PRIVATE_FRAMEWORKS = Preferences OnBoardingKit
ForwardNotifier_CFLAGS = -fobjc-arc
include $(THEOS_MAKE_PATH)/bundle.mk
internal-stage::
$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/ForwardNotifier.plist$(ECHO_END)
================================================
FILE: forwardnotifier/Resources/Info.plist
================================================
CFBundleDevelopmentRegion
English
CFBundleExecutable
ForwardNotifier
CFBundleIdentifier
com.greg0109.forwardnotifierprefs
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
BNDL
CFBundleShortVersionString
1.0.0
CFBundleSignature
????
CFBundleVersion
1.0
NSPrincipalClass
FNPRootListController
================================================
FILE: forwardnotifier/Resources/Root.plist
================================================
items
cell
PSGroupCell
label
General Settings
footerText
This feature makes this device the one that displays the notifications from other device.
Enable this feature if you would like to receive notifications on this device.
If this setting is enabled, the other ones should be disabled.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
receiver
label
Set Device as Receiver
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
Apps selected in the blacklisted section won't get their notifications forwarded.
cell
PSLinkCell
bundle
AppList
isController
1
label
Blacklisted Apps
ALAllowsSelection
1
ALSettingsKeyPrefix
ALSettingsDefaultValue
0
ALSettingsPath
/var/mobile/Library/Preferences/com.greg0109.forwardnotifierblacklist
ALSingleEnabledMode
cell
PSGroupCell
footerText
Enable this option to get an error output of the notifications.
It should only be enabled if the tweak is not working properly.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
errorlog
label
Post a notification if something went wrong
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
If this setting is enabled, the device won't send the notifications when is unlocked.
Disable this if you would like to receive notifications on your PC/iOS device all the time.
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
lockstateenabled
label
Disable when unlocked
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
Select which OS you would like the notifications to be forwarded:
- Linux requires a package called "notify-send" to be installed.
- MacOS requires a package "terminal-notifier" to be installed.
- iOS requires this tweak to be installed on the receiver device with the receiver option enabled.
- Windows requires the Windows Client Tool "ForwardNotifierReceiver" to be installed. This feature is not yet supported.
If you are using the crossplatform server option, the server tool for each OS should be installed on the receiver. That tool can be found in my github.
cell
PSSegmentCell
default
0
defaults
com.greg0109.forwardnotifierprefs
key
pcspecifier
validValues
0
1
2
3
validTitles
Linux
MacOS
iOS
Windows
alignment
0
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
cell
PSGroupCell
label
Notifier Settings
footerText
If you are using key authentication, make sure the key works before activating. This tweak has been tested with keys in the .pem format
cell
PSSegmentCell
default
0
defaults
com.greg0109.forwardnotifierprefs
key
methodspecifier
validValues
0
1
validTitles
SSH
Crossplatform Server
alignment
0
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
IP or Hostaname.local
defaults
com.greg0109.forwardnotifierprefs
key
ip
id
hostnameip
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
Port. Leave empty if its default (22)
defaults
com.greg0109.forwardnotifierprefs
key
port
id
hide1
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSEditTextCell
placeholder
User
defaults
com.greg0109.forwardnotifierprefs
key
user
id
hide2
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSSecureEditTextCell
placeholder
Password or path to Key Authentication File
defaults
com.greg0109.forwardnotifierprefs
key
password
id
hide3
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSSwitchCell
default
defaults
com.greg0109.forwardnotifierprefs
key
keyauthentication
id
hide4
label
Use key authentication
PostNotification
com.greg0109.forwardnotifierprefs.settingschanged
cell
PSGroupCell
footerText
This will send a test notification to the PC/iOS Device.
Please, make sure all the settings are correct and that the CC module is enabled before testing.
action
testnotif
cell
PSButtonCell
label
Test Notification
cell
PSGroupCell
action
paypal
cell
PSButtonCell
icon
Paypal
label
Buy me a coffee
action
openTwitter
cell
PSButtonCell
icon
Twitter
label
Twitter (@Greg_0109)
action
reddit
cell
PSButtonCell
icon
Reddit
label
Reddit (u/greg0109)
action
sendEmail
cell
PSButtonCell
icon
Email
label
Email
title
ForwardNotifier
================================================
FILE: forwardnotifier/entry.plist
================================================
entry
bundle
ForwardNotifier
cell
PSLinkCell
detail
FNPRootListController
icon
icon.png
isController
label
ForwardNotifier
================================================
FILE: forwardnotifiercc/ForwardNotifierCC.h
================================================
#import
@interface ForwardNotifierCC : CCUIToggleModule {
BOOL _selected;
}
@end
================================================
FILE: forwardnotifiercc/ForwardNotifierCC.m
================================================
#import "ForwardNotifierCC.h"
@implementation ForwardNotifierCC
//Return the icon of your module here
- (UIImage *)iconGlyph {
return [UIImage imageNamed:@"Icon" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil];
}
//Return the color selection color of your module here
- (UIColor *)selectedColor {
return [UIColor blackColor];
}
- (BOOL)isSelected {
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"ForwardNotifier-Status"] isEqual:@"1"]) {
return TRUE;
} else {
return FALSE;
}
}
- (void)setSelected:(BOOL)selected {
_selected = selected;
[super refreshState];
if(_selected) {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"ForwardNotifier-Status"];
} else {
[[NSUserDefaults standardUserDefaults] setBool:FALSE forKey:@"ForwardNotifier-Status"];
}
}
@end
================================================
FILE: forwardnotifiercc/Makefile
================================================
ARCHS = arm64 arm64e
GO_EASY_ON_ME = 1
include $(THEOS)/makefiles/common.mk
BUNDLE_NAME = ForwardNotifierCC
ForwardNotifierCC_BUNDLE_EXTENSION = bundle
ForwardNotifierCC_FILES = ForwardNotifierCC.m
ForwardNotifierCC_PRIVATE_FRAMEWORKS = ControlCenterUIKit
ForwardNotifierCC_INSTALL_PATH = /Library/ControlCenter/Bundles/
after-install::
install.exec "killall -9 SpringBoard"
include $(THEOS_MAKE_PATH)/bundle.mk
================================================
FILE: forwardnotifiercc/Resources/Info.plist
================================================
CFBundleName
ForwardNotifierCC
CFBundleExecutable
ForwardNotifierCC
CFBundleIdentifier
com.greg0109.forwardnotifiercc
CFBundleDevelopmentRegion
English
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
BNDL
CFBundleShortVersionString
1.0
CFBundleVersion
1
MinimumOSVersion
7.0
UIDeviceFamily
1
2
NSPrincipalClass
ForwardNotifierCC
CFBundleSupportedPlatforms
iPhoneOS
CCSGetModuleSizeAtRuntime
CCSModuleSize
Portrait
Height
1
Width
1
Landscape
Height
1
Width
1
================================================
FILE: forwardnotifiercc/control
================================================
Package: com.greg0109.forwardnotifiercc
Name: ForwardNotifierCC
Depends: mobilesubstrate
Version: 1.0
Architecture: iphoneos-arm
Description: CC Module for ForwardNotifier!
Maintainer: Greg0109
Author: Greg0109
Section: Control Center (Modules)
================================================
FILE: forwardnotifierreceiver/Makefile
================================================
ARCHS = arm64 arm64e
GO_EASY_ON_ME = 1
include $(THEOS)/makefiles/common.mk
TOOL_NAME = ForwardNotifierReceiver
ForwardNotifierReceiver_FILES = main.m
ForwardNotifierReceiver_CFLAGS = -fobjc-arc
include $(THEOS_MAKE_PATH)/tool.mk
================================================
FILE: forwardnotifierreceiver/main.m
================================================
#include
#import
@interface NSDistributedNotificationCenter : NSNotificationCenter
+ (instancetype)defaultCenter;
- (void)postNotificationName:(NSString *)name object:(NSString *)object userInfo:(NSDictionary *)userInfo;
@end
int main(int argc, char **argv, char **envp) {
NSString *title = [NSString stringWithUTF8String:argv[1]];
NSString *message = [NSString stringWithUTF8String:argv[2]];
if ([title isEqualToString:@"ActivateForwardNotifier"]) {
if ([message isEqualToString:@"true"]) {
printf("ForwardNotifier Activated!");
} else if ([message isEqualToString:@"false"]) {
printf("ForwardNotifier Deactivated!");
}
}
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"com.greg0109.forwardnotifierreceiver/notification" object:nil userInfo:@{@"title" : title, @"message" : message}];
return 0;
}