mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fix dependencies building, looks like i cant use the sim bc libs are compiled for ios
This commit is contained in:
18
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/ConfigHelper.h
vendored
Normal file
18
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/ConfigHelper.h
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface ConfigHelper : NSObject
|
||||
|
||||
/**
|
||||
* Helper method to get a value from the configuration YAML.
|
||||
*
|
||||
* Assuming the values in the YAML file can be represented as NSDictionary, you
|
||||
* can create a chain to get a deep value.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* NSString *host = [ConfigHelper valueForKey:
|
||||
* @"valid_password_protected_server.host"];
|
||||
*/
|
||||
+ (id)valueForKey:(NSString *)key;
|
||||
|
||||
@end
|
||||
28
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/ConfigHelper.m
vendored
Normal file
28
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/ConfigHelper.m
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
#import "ConfigHelper.h"
|
||||
#import <YAML/YAMLSerialization.h>
|
||||
|
||||
@implementation ConfigHelper
|
||||
|
||||
+ (id)valueForKey:(NSString *)key {
|
||||
static id yaml;
|
||||
|
||||
if (!yaml) {
|
||||
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
|
||||
NSString *path = [bundle pathForResource:@"config" ofType:@"yml"];
|
||||
|
||||
NSInputStream *stream = [[NSInputStream alloc] initWithFileAtPath:path];
|
||||
yaml = [YAMLSerialization YAMLWithStream:stream
|
||||
options:kYAMLReadOptionStringScalars
|
||||
error:nil];
|
||||
}
|
||||
|
||||
id data = [yaml objectAtIndex:0];
|
||||
NSArray *keyList = [key componentsSeparatedByString:@"."];
|
||||
for (NSString *keyPart in keyList) {
|
||||
data = [data objectForKey:keyPart];
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@end
|
||||
47
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/config.sample.yml
vendored
Normal file
47
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/config.sample.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# Defines a valid, password protected server, and options for testing both
|
||||
# valid and invalid user/password combinations as well as SCP to both a
|
||||
# writable directory and one that is not writable by the user
|
||||
valid_password_protected_server:
|
||||
host: "127.0.0.1:22"
|
||||
|
||||
# User config
|
||||
user: "user"
|
||||
password: "password"
|
||||
|
||||
# Shell execution config
|
||||
execute_command: "ls -1 /var/www/nmssh-tests/"
|
||||
execute_expected_response: "invalid\nvalid\n"
|
||||
|
||||
# Directory config
|
||||
writable_dir: "/var/www/nmssh-tests/valid/"
|
||||
non_writable_dir: "/var/www/nmssh-tests/invalid/"
|
||||
|
||||
# Defines a valid, public key protected server, and options for testing both
|
||||
# valid and invalid user/password combinations as well as SCP to both a
|
||||
# writable directory and one that is not writable by the user
|
||||
valid_public_key_protected_server:
|
||||
host: "127.0.0.1:22"
|
||||
|
||||
# User config
|
||||
user: "user"
|
||||
|
||||
# Public key path
|
||||
valid_public_key: "~/.ssh/id_rsa.pub"
|
||||
invalid_public_key: "~/.ssh/github_rsa.pub"
|
||||
|
||||
# Public key password
|
||||
password: "password"
|
||||
|
||||
# Defines a valid server, that this computer can connect to via an agent.
|
||||
valid_agent_server:
|
||||
host: "127.0.0.1:22"
|
||||
|
||||
# User config
|
||||
user: "user"
|
||||
|
||||
# Defines an invalid server and authentication credentials that are invalid for
|
||||
# all defined test servers
|
||||
invalid_server:
|
||||
host: "0.0.0.0:22"
|
||||
user: "user"
|
||||
password: "pass"
|
||||
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Headers
vendored
Symbolic link
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Headers
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
Versions/Current/Headers
|
||||
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Resources
vendored
Symbolic link
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Resources
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
Versions/Current/Resources
|
||||
58
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/Headers/YAMLSerialization.h
vendored
Executable file
58
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/Headers/YAMLSerialization.h
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// YAMLSerialization.h
|
||||
// YAML Serialization support by Mirek Rusin based on C library LibYAML by Kirill Simonov
|
||||
// Released under MIT License
|
||||
//
|
||||
// Copyright 2010 Mirek Rusin
|
||||
// Copyright 2010 Stanislav Yudin
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "yaml.h"
|
||||
|
||||
// Mimics NSPropertyListMutabilityOptions
|
||||
typedef enum {
|
||||
kYAMLReadOptionImmutable = 0x0000000000000001,
|
||||
kYAMLReadOptionMutableContainers = 0x0000000000000010,
|
||||
kYAMLReadOptionMutableContainersAndLeaves = 0x0000000000000110,
|
||||
kYAMLReadOptionStringScalars = 0x0000000000001000
|
||||
} YAMLReadOptions;
|
||||
|
||||
typedef enum {
|
||||
kYAMLErrorNoErrors,
|
||||
kYAMLErrorCodeParserInitializationFailed,
|
||||
kYAMLErrorCodeParseError,
|
||||
kYAMLErrorCodeEmitterError,
|
||||
kYAMLErrorInvalidOptions,
|
||||
kYAMLErrorCodeOutOfMemory,
|
||||
kYAMLErrorInvalidYamlObject,
|
||||
} YAMLErrorCode;
|
||||
|
||||
typedef enum {
|
||||
kYAMLWriteOptionSingleDocument = 0x0000000000000001,
|
||||
kYAMLWriteOptionMultipleDocuments = 0x0000000000000010,
|
||||
} YAMLWriteOptions;
|
||||
|
||||
extern NSString *const YAMLErrorDomain;
|
||||
|
||||
@interface YAMLSerialization : NSObject {
|
||||
}
|
||||
|
||||
+ (void) writeYAML: (id) yaml
|
||||
toStream: (NSOutputStream *) stream
|
||||
options: (YAMLWriteOptions) opt
|
||||
error: (NSError **) error;
|
||||
|
||||
+ (NSData *) dataFromYAML: (id) yaml
|
||||
options: (YAMLWriteOptions) opt
|
||||
error: (NSError **) error;
|
||||
|
||||
+ (NSMutableArray *) YAMLWithStream: (NSInputStream *) stream
|
||||
options: (YAMLReadOptions) opt
|
||||
error: (NSError **) error;
|
||||
|
||||
+ (NSMutableArray *) YAMLWithData: (NSData *) data
|
||||
options: (YAMLReadOptions) opt
|
||||
error: (NSError **) error;
|
||||
|
||||
@end
|
||||
1976
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/Headers/yaml.h
vendored
Normal file
1976
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/Headers/yaml.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
40
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/Resources/Info.plist
vendored
Normal file
40
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/Resources/Info.plist
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>11E53</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>YAML</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.YAML</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>YAML</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string></string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>4E3002</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>11E53</string>
|
||||
<key>DTSDKName</key>
|
||||
<string></string>
|
||||
<key>DTXcode</key>
|
||||
<string>0433</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>4E3002</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/YAML
vendored
Executable file
BIN
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/A/YAML
vendored
Executable file
Binary file not shown.
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/Current
vendored
Symbolic link
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/Versions/Current
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
A
|
||||
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/YAML
vendored
Symbolic link
1
Carthage/Checkouts/NMSSH/NMSSHTests/Settings/lib/YAML.framework/YAML
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
Versions/Current/YAML
|
||||
Reference in New Issue
Block a user