Skip to content

Commit 4e6bc4e

Browse files
committed
Fixed a lot in web interface, added new build script
1 parent 6d696bd commit 4e6bc4e

File tree

23 files changed

+573
-317
lines changed

23 files changed

+573
-317
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
*.deb
66
tests.md
77
implement.md
8+
9+
src/SMServer/IdentityPass.swift
10+
src/SMServer/identity.pfx

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77

88
## Features
99
- Viewing all texts & iMessages from another device
10-
- HTTPS
10+
- TLS
1111
- Desktop Notifications upon new text arrival
1212
- Sending iMessages remotely, without on-device interaction
13-
- Sending all types of attachments from desktop
13+
- Sending all types of attachments from desktop
14+
- Ability to browse and send attachments from host device camera roll
1415
- Authentication to protect against spying eyes
1516
- Background operation of server for unlimited time, with screen on or off
1617
- Easy and accessible customization options
@@ -27,7 +28,7 @@
2728

2829
### Dependencies
2930
- libsmserver, the tweak which allows sending texts with this app. You can get it from [here](https://github.com/iandwelker/libsmserver).
30-
- To install the ipa (NOT the deb): some signing service/bypass — Whether this be signing via Xcode, AltServer, etc. or using AppSync Unified to bypass signing checks, any works. I'd recommend AppSync since you won't have to manually sign it, but if that doesn't work for you, then feel free to sign & install the .ipa. The .deb does not require signing or any sort of bypass, since it install as a system application.
31+
- To install the ipa (NOT the deb): some signing service/bypass — Whether this be signing via Xcode, AltServer, etc. or using AppSync Unified to bypass signing checks, any works. I'd recommend AppSync since you won't have to manually sign it, but if that doesn't work for you, then feel free to sign & install the .ipa. The .deb does not require signing or any sort of bypass, since it installs as a system application.
3132

3233
## To Install
3334
Use the provided .ipa or .deb package under the Releases, or read `docs/INSTALL.md` for information on how to build from source.
@@ -68,10 +69,9 @@ The source code may be updated past the latest released version, so don't be sur
6869
- [ ] Ability to delete conversations from the web interface-->
6970

7071
## Issues
71-
If there are any issues, questions, or feature requests at all, don't hesitate to create an issue or pull request here, or email me at [email protected]. I may not run into all issues that could possibly come up, so I would really appreciate any issues you let me know about.
72+
If there are any issues, questions, or feature requests at all, don't hesitate to create an issue or pull request here, or email me at [email protected]. I will not run into all issues that could possibly come up, so I would really appreciate any issues you let me know about.
7273

7374
### Acknowledged issues:
74-
- Creating new conversations does not work on iOS 14+. This is being worked on.
7575
- Although typing indicators do appear when the other party starts typing, they don't always disappear when they stop typing. This is also being worked on.
7676

7777
### To file an issue:

deb_make.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/API.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ All requests to `/requests` return JSON information.
1212

1313
## `person`, `num`, `offset`, `read`
1414

15-
Retrieves the most recent $num messages to or from $person, offset by $offset.
15+
Retrieves the most recent \$num messages to or from \$person, offset by \$offset.
1616

17-
- person: parameter is necessary, and value is consequential; must be chat_identifier of conversation. chat_identifier will be the email address or phone number of an individual, or 'chat' + $arbitrary_number for a group chat. chat_identifiers for group chats and email addresses must be exact, and phone numbers must be in the form of '+\<country code>\<area code>\<number>'. e.g. "+16378269173". Using parentheses or dashes will mess it up and return nothing.
17+
- person: parameter is necessary, and value is consequential; must be chat_identifier of conversation. chat_identifier will be the email address or phone number of an individual, or the chat_identifier for a group chat (normally the string 'chat' followed by 16-20 numerical digits). chat_identifiers for group chats and email addresses must be exact, and phone numbers must include the entire phone number (including country codes, area codes, and other identifiers where necessary), with a plus sign at the beginning, e.g. "+16378269173". Using parentheses or dashes will mess it up and return nothing. \
1818
$\qquad$ As of version 0.5.4, you may also send multiple addresses to this parameter, separated by single commas, and it will return a merged text list with all of the texts from the listed addresses included. This can be useful if you'd like to treat multiple conversations as one, such as if you have multiple conversations for talking with one person.
1919

2020
- num: Parameter is not necessary, but value is consequential. The value of this parameter must be an integer, and will be the number of most recent messages that are returned from the app. If it is 0, it will return all the messages to or from this person, and if it is not specified, it will use the default number of messages on the app, which is currently 100 at the time of writing this.
@@ -32,7 +32,7 @@ Example queries:
3232

3333
## `chat`, `num_chats`, `chats_offset`
3434

35-
Retrieves the latest $num_chats conversations
35+
Retrieves the latest \$num_chats conversations
3636

3737
- chat: Parameter is necessary, and value is inconsequential. Calling the parameter 'chat' simply specifies that you are asking for a list of the conversations on the device.
3838

@@ -47,7 +47,7 @@ Example queries:
4747

4848
## `name`
4949

50-
Retrieves the contact name that accompanies chat_identifier $name
50+
Retrieves the contact name that accompanies chat_identifier \$name
5151

5252
- name: Parameter is necessary, and value is consequential. Value must be the chat_identifier for the contact whose name you want. It can get the name if given an email address or phone number of an individual, or the chat_identifier of a group chat. Email must be given in the regular format, and phone number must be given in the format that the above 'person' section specifies. If there is no name for the email address, phone number, or chat_identifier given, then it will return the given address (in the case of a phone number or email address) or list of recipients (in the case of a group chat chat_identifier)
5353

@@ -58,7 +58,7 @@ Example queries:
5858

5959
## `search`, `case_sensitive`, `bridge_gaps`, `group_by`
6060

61-
This searches for the term $search in all your texts. `case_sensitive`, `bridge_gaps`, and `group_by` are customization options.
61+
This searches for the term \$search in all your texts. `case_sensitive`, `bridge_gaps`, and `group_by` are customization options.
6262

6363
- search: Parameter is necessary, and value is consequential. This must be the term you want to search for. Does not have to be surrounded by quotes. Case sensitivity is determined by the `case_sensitive` parameter.
6464
- case_sensitive: Parameter is not necessary, and value is consequential; default is false. This determines whether or not you want the search to be case sensitive; a value of `true` make it sensitive, and `false` makes it insensitive
@@ -71,9 +71,9 @@ Example queries:
7171

7272
## `photos`, `offset`, `most_recent`
7373

74-
if most_recent == "true", this retrieves a list of information about the most recent $photos ($photos is an integer) photos, offset by \$offset ($offset is also an integer). If most_recent != "true", this retrieves a list of the oldest $photos photos, offset by $offset.
74+
if most_recent == "true", this retrieves a list of information about the most recent \$photos (\$photos is an integer) photos, offset by \\$offset (\$offset is also an integer). If most_recent != "true", this retrieves a list of the oldest \$photos photos, offset by \$offset.
7575

76-
- photos: Parameter is necessary, and value is consequential. This must be the number of photos that you want to receive information about, and if it is not an integer, it will be changed to the default number of photos (which is available to set in the settings of the app). Setting this to 0 will retrieve 0 photos, and the only way to retrieve all photos would be to set to $photos to an absurdly large number, such as 999999999.
76+
- photos: Parameter is necessary, and value is consequential. This must be the number of photos that you want to receive information about, and if it is not an integer, it will be changed to the default number of photos (which is available to set in the settings of the app). Setting this to 0 will retrieve 0 photos, and the only way to retrieve all photos would be to set to \$photos to an absurdly large number, such as 999999999.
7777
- offset: Parameter is not necessary, and value is consequential. This must be the offset for the list of photos that you want to retrieve. For example, if you already retrieved the most recent 100 photos, but want to retrieve info about the next 100 images, you would set offset to 100, and photos to 100 as well. This must be an integer, or else it will default to 0.
7878
- most_recent: Parameter is not necessary, and value is consequential. This must be either "true" or "false". If it is neither, it will default to true. Setting this to false will query the oldest pictures first, and setting it to true or not settings it at all will retrieve the most recent images first.
7979

docs/Changelog.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
# Changelog
2+
0.5.4 &rightarrow; Unreleased
3+
- Made a new build script which makes it __much__ easier to build SMServer from scratch
4+
- Added experimental option to combine conversations that belong to the same contact
5+
- Changed cert and hid new password to prevent people from stealing private key
6+
- Changed some glyphs in the web interface to look prettier
7+
- Web interface now checks to make sure there are more texts to be loaded before adding a 'more texts' button
8+
- Rewrote text-receiving backend to prevent race condition from duplicating texts in web interface
9+
- Fixed issue with duplicate typing indicators appearing in web interface
10+
- Fixed issue with profile picture displays getting cut off
11+
- Fixed issue with sender names in group chats appearing above time displays
12+
- Fixed issues with unread indicator displays
13+
- Fixed many issues with sender and time display placement in group chats
14+
- Fixed issue with links redirecting to the wrong site if they didn't have `http(s)://` prefix
15+
216
0.5.3 &rightarrow; 0.5.4
317
- Texts now have prettier bubble tails and no tails when sent close after each other
418
- Texts also have proper spacing when sent far from each other to indicate the gaps in conversation

docs/INSTALL.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
11
# To Install
22

3-
### To build from source and install as regular app:
3+
### To build from source:
44

5-
1. Make sure you have xcode commandline tools installed
65
1. Clone this repository
7-
1. cd into the directory where the podfile is installed
8-
1. Edit the podfile so that the git url of pod 'Criollo' is `https://github.com/iandwelker/Criollo.git`. This is my custom fork which allows for uploading of multiple files in one input tag
9-
1. If cocoapods are not installed, run `sudo gem install cocoapods`
10-
1. Run `pod install`
11-
1. Open the .xcworkspace file in Xcode
12-
1. Connect your device
13-
1. Build and install the project!
14-
15-
### To build from source and install as .deb (system app):
16-
17-
1. Make sure you have xcode commandline tools installed
18-
1. Clone this repository
19-
1. cd into the directory where the podfile is installed
20-
1. Edit the podfile so that the git url of pod 'Criollo' is `https://github.com/iandwelker/Criollo.git`. This is my custom fork which allows for uploading of multiple files in one input tag
21-
1. If cocoapods are not installed, run `sudo gem install cocoapods`
22-
1. Run `pod install`
23-
1. Open the .xcworkspace file in Xcode
24-
1. In the 'product' section of the menu bar, run 'clean build folder', then 'build for > running', then 'archive'
25-
1. When the archive window appears, right click on the archive and select 'show in finder'
26-
1. Right click on the .xcarchive file, and select 'show package contents'.
27-
1. Navigate to 'products' > 'Applications', and copy 'SMServer.app'
28-
1. Place the 'SMServer.app' package in the 'package/deb/Applications/' subdirectory of this cloned repository
29-
1. Copy the entire 'deb' folder over to an iDevice that is jailbroken
30-
1. SSH into the idevice (or open a terminal app), and cd into the directory where the 'deb' folder is located
31-
1. Run `dpkg -b deb`, assuming that the 'deb' folder is still named 'deb'. This will produce a package named 'deb.deb'. You can rename it to whatever you want.
32-
1. Install the package that the last step created (`deb.deb`) just as you would install a tweak.
6+
1. `cd` into the directory where the `make.sh` script is located
7+
1. Run `./make.sh` with the following flags: \
8+
`-n` if this is your first time running \
9+
`-i` if you'd like to make a `.ipa` package \
10+
`-d` if you'd like to make a `.deb` package \
11+
`-v` if you'd like verbose output \
12+
13+
For example, if you'd like to make a `.deb` package and you've never run this before, run `./make.sh -dn`

docs/WebSocket.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
# WebSocket (API)
22

3-
As of 0.2.0+debug2, the server supports websockets. This is, as of 0.5.0, used to send messages from client to the host, and from host to client. It supports sending/receiving 5 messages as of right now, all plain text. They are all in the format of `$context:$content`, e.g. `text:+15202583393`
3+
As of 0.2.0+debug2, the server supports websockets. This is, as of 0.5.0, used to send messages from client to the host, and from host to client. It supports sending/receiving 5 messages as of right now, all plain text. They are all in the format of `$prefix:$content`, e.g. `battery:34`. The default port for the websocket on the host device is 8740.
44

55
## Messages to client from host
66

77
### `text`
8-
Every time that the host receives a new text, a message with the context of `text` is sent to all connected clients with the content of the chat_id that send the message. For example: `text:[email protected]` or `text:+11231231234`
8+
Every time that the host reeives a new text, a message with the prefix `text` is sent to all connected devices. The content of this message is a JSON message with a key of `text` that describes all the necessary parameters of the most recent text that you just received. For example, if you just got sent a text that simply said 'Hello!' from the number '+11231231234', this message would look something like:
9+
```json
10+
text:{ "text": { "ROWID" : "150000", "subject" : "", "chat_identifier" : "+11231231234", "balloon_bundle_id" : "", "is_from_me" : "0", "service" : "iMessage", "guid" : "3FCF9CC7-FFF3-4172-82FD-773F9A3CC89A", "text" : "Hello!", "date_read" : "0", "date" : "626981115265999744", "cache_has_attachments" : "0", "handle_id" : "100", "associated_message_type" : "0", "associated_message_guid" : ""}}
11+
```
912

1013
### `battery`
11-
A message with this context is sent every time the battery level or battery state of the host device changes, and will either be sent as an Int between 0 - 100 (to show the battery level), or a string that is either `charging` or `unplugged`. For example, to show that the battery level is now 89, it would send: `battery:89`. And to show that the phone is now charging when it previously wasn't, it would send `battery:charging`.
14+
A message with this prefix is sent every time the battery level or battery state of the host device changes, and will either be sent as an Int between 0 - 100 (to show the battery level), or a string that is either `charging` or `unplugged`. For example, to show that the battery level is now 89, it would send: `battery:89`. And to show that the phone is now charging when it previously wasn't, it would send `battery:charging`.
1215

1316
### `typing`
14-
A message with this context is sent every time that someone in one of their conversations starts typing. The content of this message is a string which is the chat_identifier of the conversation where the other party started typing. It will look something like `typing:+11231231234`.
17+
A message with this prefix is sent every time that someone in one of their conversations starts typing. The content of this message is a string which is the chat_identifier of the conversation where the other party started typing. It will look something like `typing:+11231231234`.
1518

1619
## Messages sent to host from client
1720

1821
### `typing`
19-
A message with this context is sent every time you start typing on the web interface, and its content contains a string which is the converation in which you started typing. If you have the 'Send typing indicator when you type' setting enabled on the host device, your device will then notify the other party in that conversation that you are typing (just like if you started typing in the iMessages app)
22+
A message with this prefix is sent every time you start typing on the web interface, and its content contains a string which is the converation in which you started typing. If you have the 'Send typing indicator when you type' setting enabled on the host device, your device will then notify the other party in that conversation that you are typing (just like if you started typing in the iMessages app)
2023

2124
### `idle`
22-
A message with this context is sent every time the length of the text you are composing goes down to 0, or you stop typing for 10 straight seconds. The content of this message is a string which is the conversation in which you stopped typing. This will then notify the other party that you stopped typing (just as if you stopped typing in the iMessages app)
25+
A message with this prefix is sent every time the length of the text you are composing goes down to 0, or you stop typing for 10 straight seconds. The content of this message is a string which is the conversation in which you stopped typing. This will then notify the other party that you stopped typing (just as if you stopped typing in the iMessages app)

ipa_make.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)