forked from The404Hacking/EggShell-RAT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheshelper.m
More file actions
42 lines (36 loc) · 1.11 KB
/
Copy patheshelper.m
File metadata and controls
42 lines (36 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// eshelper.m
// esplosx
//
// Created by Lucas Jackson on 3/13/17.
// Copyright © 2017 lucas.py. All rights reserved.
//
#import "eshelper.h"
@implementation eshelper
+(NSDictionary *)stringToJSON:(NSString*)inputstr :(NSError*)error {
return [NSJSONSerialization JSONObjectWithData: [inputstr dataUsingEncoding:NSUTF8StringEncoding]
options: NSJSONReadingAllowFragments
error: &error];
}
+(NSString *)reverseString:(NSString *)str {
NSMutableString *reversed = [NSMutableString string];
NSInteger charIndex = [str length];
while (charIndex > 0) {
charIndex--;
NSRange subRange = NSMakeRange(charIndex, 1);
[reversed appendString:[str substringWithRange:subRange]];
}
return reversed;
}
+(NSString *)forgetFirst:(NSArray *)args {
int x = 1;
NSString *path = @"";
for (NSString *tpath in args) {
if (x != 1) {
path = [NSString stringWithFormat:@"%@%@ ",path,tpath];
}
x++;
}
return [path substringToIndex:[path length] - 1];
}
@end