Livejournaling
Sep. 14th, 2022 07:01 pmLJ yet again broke OpenID login. But there is a backdoor still open: https://www.livejournal.com/identity/login.bml
...Валерий Федорович взял свое охотничьей ружье и открыл огонь.
Вражеский истребитель Су-34 был поражен и уничтожен.
Встал один и бьет с колена
Из винтовки в самолет.
Трехлинейная винтовка
На брезентовом ремне,
Да патроны с той головкой,
Что страшна стальной броне.








UIPasteboard.general.string) keeps indentation, and even checkboxes are represented normally, with [ ] for an unchecked item, and [x] for a checked one. Unfortunately, you lose even the most basic formatting, like bold/italictextLists property, which is not available on iOS without hacking.if let data = UIPasteboard.general.data(forPasteboardType: "com.apple.notes.richtext") {NSKeyedUnarchiver. There is just one problem: the whole serialized data seems to be of an internal, non-exported type ICNotePasteboardData. But there is a simple remedy for those: we can substitute one type for another. And, meditating on the XML property list, I realized that there is only one part of it that might contain something interesting. So, what it boiled down to is this:class FakeNotesData: NSObject, NSCoding {
│ var attributedStringData: Data?
│ required init?(coder: NSCoder) {
│ │ attributedStringData = coder.decodeObject(forKey: "attributedStringData") as? Data
│ }
│ func encode(with coder: NSCoder) {
│ │ if let data = attributedStringData {coder.encode(data, forKey: "attributedStringData")}
│ }
}
let keyed = try! NSKeyedUnarchiver(forReadingFrom: data)
keyed.requiresSecureCoding = false
keyed.setClass(FakeNotesData.self, forClassName: "ICNotePasteboardData")
if let obj = keyed.decodeObject(forKey: NSKeyedArchiveRootObjectKey) as? FakeNotesData,
│ let attributedStringData = obj.attributedStringData
{attributedStringData is just another (smaller) chunk of binary data. However, just printing it out as a string, I've noticed immediately that part of it is just the text I copied, without any formatting or indentation. Other parts seemed to be garbage. So, I converted the whole data into a hex string and started digging deeper.message PasteInfo {
required string str = 2; // UTF-8
repeated ChunkInfo chunks = 5;
repeated AttachmentInfo attachments = 6;
}
message ChunkInfo {
required uint64 length = 1;
optional ParagraphStyle paragraphStyle = 2;
optional float textSize = 3;
optional TextStyle textStyle = 5;
optional bool isUnderlined = 6 [default = false];
optional bool isStrikethrough = 7 [default = false];
optional int64 baselineOffset = 8; // 1 for superscripts, -1 for subscripts; yes, they didn't use sint for that
optional Color color = 10;
optional Attachment attachment = 12;
}
message ParagraphStyle {
optional ParagraphType paragraphType = 1;
optional Alignment alignment = 2 [default = LEFT];
optional WritingDirection writingDirection = 3 [default = LTR];
optional uint64 listDepth = 4 [default = 0];
optional CheckedListInfo checkedListInfo = 5;
optional uint64 startNumberingFrom = 7; // not sure about that
}
enum TextStyle { // could be a bitmask?
BOLD = 1;
ITALIC = 2;
BOLD_ITALIC = 3;
}
enum ParagraphType {
TITLE = 0;
HEADING = 1;
SUBHEADING = 2;
BULLETED = 0x64;
DASHED = 0x65;
NUMBERED = 0x66;
CHECKLIST = 0x67;
}
message CheckedListInfo {
optional bytes unknown = 1; // seems always present, with opaque 128-bit values — maybe GUIDs
required bool isChecked = 2;
}
message Attachment {
required string guid = 1;
required string type = 2; // reverse domain name
}
message AttachmentInfo {
required string guid = 2;
optional string content = 6;
required string type = 8; // reverse domain name
optional fixed64 unknown_ptr = 17; // probably a pointer to somewhere inside Notes.app
optional uint64 unknown_int = 25; // seems always present, with value 2
}
enum Alignment {
LEFT = 0;
CENTER = 1;
RIGHT = 2;
JUSTIFY = 3;
}
enum WritingDirection {
LTR = 0;
DEFAULT = 1;
RTL = 2;
}
message Color {
required float red = 1;
required float green = 2;
required float blue = 3;
required float alpha = 4;
}"com.apple.notes.table" type) , so we have GUIDs, which, presumably, can be used to get information from iCloud, and we have something that looks like an internal pointer in Notes.app, but not much more.











































