Skip to content

Commit

Permalink
[V1.0.4] Update version and changelog
Browse files Browse the repository at this point in the history
[V1.0.4] Update version and changelog
  • Loading branch information
marco-lancini authored May 22, 2017
2 parents eb973c6 + 1590a61 commit ad7c716
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 37 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ All notable changes to this project will be documented in this file.



## [1.0.4] - 2017-05-22
#### Added
- Show device's IP address in the main screen



## [1.0.3] - 2017-05-05
#### Added
- Move `list_apps` to `Utils`
Expand Down
2 changes: 1 addition & 1 deletion needle-agent/needleAgent/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef Constants_h
#define Constants_h

#define AGENT_VERSION @"1.0.3"
#define AGENT_VERSION @"1.0.4"
#define DEFAULT_PORT @"4444"

#define AGENT_NAME @"Needle Agent"
Expand Down
2 changes: 1 addition & 1 deletion needle-agent/needleAgent/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.3</string>
<string>1.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
1 change: 1 addition & 0 deletions needle-agent/needleAgent/MWRServerViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@interface MWRServerViewController : UIViewController <GCDAsyncSocketDelegate>{}

@property (strong, nonatomic) IBOutlet UILabel *versionLabel;
@property (strong, nonatomic) IBOutlet UILabel *IPLabel;
@property (weak, nonatomic) IBOutlet UILabel *responsesLabel;
@property (weak, nonatomic) IBOutlet UITextField *portTextField;
@property NSMutableString *responsesString;
Expand Down
7 changes: 7 additions & 0 deletions needle-agent/needleAgent/MWRServerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#import "MWRServerViewController.h"
#import "Constants.h"
#import "Utils.h"

@implementation MWRServerViewController

Expand Down Expand Up @@ -37,6 +38,9 @@ - (void)viewDidLoad
// Update versionLabel
self.versionLabel.text = [NSString stringWithFormat:@"v.%@", AGENT_VERSION];

// Update IP label
self.IPLabel.text = [NSString stringWithFormat:@"(IP: %@)", [Utils getIPAddress]];

// Allow number keyboard to be dismissed by tapping outside the keyboard
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
initWithTarget:self
Expand All @@ -57,6 +61,9 @@ -(void)updateLogs:(NSString *)message

// Update UILabel with new responses
self.responsesLabel.text = self.responsesString;

// Update IP label
self.IPLabel.text = [NSString stringWithFormat:@"(IP: %@)", [Utils getIPAddress]];
});
}

Expand Down
27 changes: 18 additions & 9 deletions needle-agent/needleAgent/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="EVn-Gp-ziU">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="EVn-Gp-ziU">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<capability name="Navigation items with more than one left or right bar item" minToolsVersion="7.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -42,30 +42,38 @@
</constraints>
</scrollView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="rXT-aP-YA0">
<rect key="frame" x="147.5" y="74" width="80" height="50"/>
<rect key="frame" x="148" y="74" width="80" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="7Zl-mX-DOU"/>
<constraint firstAttribute="height" constant="50" id="nMs-mF-Kbv"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CaD-AD-7dg">
<rect key="frame" x="166.5" y="134" width="42" height="21"/>
<rect key="frame" x="239" y="94" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<color key="textColor" red="0.15960407257080078" green="0.34700363874435425" blue="0.4677003026008606" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UBN-5M-Tky">
<rect key="frame" x="167" y="124" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="CaD-AD-7dg" firstAttribute="top" secondItem="3kg-k2-ICG" secondAttribute="bottom" constant="30" id="1ci-5j-edM"/>
<constraint firstItem="EDV-80-NQp" firstAttribute="top" secondItem="UBN-5M-Tky" secondAttribute="bottom" constant="20" id="23M-iR-B3e"/>
<constraint firstItem="EDV-80-NQp" firstAttribute="leading" secondItem="ue0-Jf-hdt" secondAttribute="leading" constant="20" id="2Qs-Qb-IB3"/>
<constraint firstItem="rXT-aP-YA0" firstAttribute="top" secondItem="3kg-k2-ICG" secondAttribute="bottom" constant="10" id="3JR-oY-dwU"/>
<constraint firstItem="rXT-aP-YA0" firstAttribute="centerX" secondItem="ue0-Jf-hdt" secondAttribute="centerX" id="77N-ON-aj2"/>
<constraint firstItem="sVa-jO-wqZ" firstAttribute="top" secondItem="EDV-80-NQp" secondAttribute="bottom" id="8fr-ZQ-Mlc"/>
<constraint firstItem="EDV-80-NQp" firstAttribute="top" secondItem="CaD-AD-7dg" secondAttribute="bottom" constant="10" id="Sit-Ua-9us"/>
<constraint firstItem="EDV-80-NQp" firstAttribute="top" secondItem="CaD-AD-7dg" secondAttribute="bottom" constant="50" id="Aha-jW-5hY"/>
<constraint firstItem="sVa-jO-wqZ" firstAttribute="top" secondItem="EDV-80-NQp" secondAttribute="bottom" id="XZx-Tf-nLK"/>
<constraint firstItem="CaD-AD-7dg" firstAttribute="leading" secondItem="rXT-aP-YA0" secondAttribute="trailing" constant="11" id="Yn0-kY-uOv"/>
<constraint firstItem="UBN-5M-Tky" firstAttribute="centerX" secondItem="rXT-aP-YA0" secondAttribute="centerX" id="Zp0-wA-SqU"/>
<constraint firstAttribute="trailing" secondItem="EDV-80-NQp" secondAttribute="trailing" constant="20" id="cSD-LD-U6g"/>
<constraint firstItem="CaD-AD-7dg" firstAttribute="centerX" secondItem="ue0-Jf-hdt" secondAttribute="centerX" id="cVC-eK-jcM"/>
<constraint firstItem="CaD-AD-7dg" firstAttribute="top" secondItem="rXT-aP-YA0" secondAttribute="bottom" constant="10" id="efA-Ke-kNk"/>
</constraints>
<variation key="default">
<mask key="constraints">
Expand Down Expand Up @@ -103,6 +111,7 @@
</rightBarButtonItems>
</navigationItem>
<connections>
<outlet property="IPLabel" destination="UBN-5M-Tky" id="daR-yj-uie"/>
<outlet property="portTextField" destination="IZP-1H-KEJ" id="Fl5-wC-a03"/>
<outlet property="responsesLabel" destination="dU5-Ac-gi0" id="O5Z-hy-fWC"/>
<outlet property="versionLabel" destination="CaD-AD-7dg" id="cH6-QJ-TzS"/>
Expand All @@ -117,7 +126,7 @@
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="EVn-Gp-ziU" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="3Cn-9a-bWp">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="3Cn-9a-bWp">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
Expand Down
4 changes: 2 additions & 2 deletions needle-agent/needleAgent/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
@interface Utils : NSObject

+ (NSData *)listApplications;

+(BOOL)copyFile:(NSString *)infile into:(NSString *)outfile;
+ (BOOL)copyFile:(NSString *)infile into:(NSString *)outfile;
+ (NSString *)getIPAddress;

@end

Expand Down
29 changes: 29 additions & 0 deletions needle-agent/needleAgent/Utils.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#import "FBApplicationInfo.h"
#import "LSApplicationProxy.h"

// IP ADDRESS
#include <ifaddrs.h>
#include <arpa/inet.h>

@implementation Utils


Expand Down Expand Up @@ -78,4 +82,29 @@ +(BOOL)copyFile:(NSString *)infile into:(NSString *)outfile;
return YES;
}

+ (NSString *)getIPAddress {
NSString *address = @"error";
struct ifaddrs *interfaces = NULL;
struct ifaddrs *temp_addr = NULL;
int success = 0;
// retrieve the current interfaces - returns 0 on success
success = getifaddrs(&interfaces);
if (success == 0) {
// Loop through linked list of interfaces
temp_addr = interfaces;
while(temp_addr != NULL) {
if(temp_addr->ifa_addr->sa_family == AF_INET) {
// Check if interface is en0 which is the wifi connection on the iPhone
if([[NSString stringWithUTF8String:temp_addr->ifa_name] isEqualToString:@"en0"]) {
// Get NSString from C String
address = [NSString stringWithUTF8String:inet_ntoa(((struct sockaddr_in *)temp_addr->ifa_addr)->sin_addr)];
}
}
temp_addr = temp_addr->ifa_next;
}
}
// Free memory
freeifaddrs(interfaces);
return address;
}
@end
Binary file modified release/NeedleAgent.deb
Binary file not shown.
Binary file modified release/NeedleAgent/Applications/needleAgent.app/Assets.car
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified release/NeedleAgent/Applications/needleAgent.app/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
</data>
<key>Assets.car</key>
<data>
U20TBXV02DBRqRLx8qpPew4azY4=
VtqTPqbqm4OyTD258/zF/8RGMBQ=
</data>
<key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
<data>
6IiUDq7obzSHcUp8RqmwNnR8Uq4=
skicZjnUutU1Qv5zubxYrRdC2ws=
</data>
<key>Base.lproj/LaunchScreen.storyboardc/Info.plist</key>
<data>
n2t8gsDpfE6XkhG31p7IQJRxTxU=
</data>
<key>Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib</key>
<data>
ss7iuh5BrFg7LzG9JyinXwI/ueQ=
P9HzClKvNq2DCMKIhBJr3dIZrb0=
</data>
<key>Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket</key>
<data>
50YEdTaXm6kT8DhJlxn4dF6hdz4=
ydGi+FptEKvWum6Qk59QnK6QPtA=
</data>
<key>Frameworks/CocoaAsyncSocket.framework/Info.plist</key>
<data>
Expand All @@ -62,19 +62,19 @@
</data>
<key>Info.plist</key>
<data>
HT1PxqlfcYKnyShDl/9FezXEA2c=
Boeo0ugvXt/ITQE+M0nY9TJvlNs=
</data>
<key>Main.storyboardc/BF7-WO-YOG-view-ue0-Jf-hdt.nib</key>
<data>
M6w/T6T9tw5fi6/dLcHe/9VKFuM=
ao+CVj9SKm+K8MRtpX6Bd8ElVL8=
</data>
<key>Main.storyboardc/Info.plist</key>
<data>
ZS37Y9v7m+LMZu/RwxHyx/OvsiY=
</data>
<key>Main.storyboardc/UINavigationController-EVn-Gp-ziU.nib</key>
<data>
3LL911VA1IEj0Yx9rQ9L4EEwYKc=
9C4Qu9mRMTlVTV8fDKyODXAVSv4=
</data>
<key>PkgInfo</key>
<data>
Expand Down Expand Up @@ -172,22 +172,22 @@
<dict>
<key>hash</key>
<data>
U20TBXV02DBRqRLx8qpPew4azY4=
VtqTPqbqm4OyTD258/zF/8RGMBQ=
</data>
<key>hash2</key>
<data>
QgDfXnUJpVjXmm1IrzzDjta3et8bHaFoMNEqqC/hQYo=
ALJky5CNY9Rg0neHOYGq6qq5muXkivEfyqXn/3faqTk=
</data>
</dict>
<key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
<dict>
<key>hash</key>
<data>
6IiUDq7obzSHcUp8RqmwNnR8Uq4=
skicZjnUutU1Qv5zubxYrRdC2ws=
</data>
<key>hash2</key>
<data>
KNewCZVJY+ZQZvUG44m748JX8APkHSC6qjUJTJC03Ac=
4rqIVK17Ru/ekKGd5n8M7wiDfd+vRfpkPC2QCaSJUU0=
</data>
</dict>
<key>Base.lproj/LaunchScreen.storyboardc/Info.plist</key>
Expand All @@ -205,22 +205,22 @@
<dict>
<key>hash</key>
<data>
ss7iuh5BrFg7LzG9JyinXwI/ueQ=
P9HzClKvNq2DCMKIhBJr3dIZrb0=
</data>
<key>hash2</key>
<data>
pfGwlWQiyrupKweDPDuBzcp3NuJmLN88x1gztSFLgmg=
MLERHGH+XxF+t2P+k8Wx4UKg//3pajHWeEF2stK5Ce0=
</data>
</dict>
<key>Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket</key>
<dict>
<key>hash</key>
<data>
50YEdTaXm6kT8DhJlxn4dF6hdz4=
ydGi+FptEKvWum6Qk59QnK6QPtA=
</data>
<key>hash2</key>
<data>
7l4R1U4mi7o6LVx34V5PIHPAt+m30ndF4pE3nSja0FQ=
MzJPBjX0IykSbL/B8Zea/QID9fwb/7RiWSnsXHsNQgY=
</data>
</dict>
<key>Frameworks/CocoaAsyncSocket.framework/Info.plist</key>
Expand Down Expand Up @@ -249,11 +249,11 @@
<dict>
<key>hash</key>
<data>
M6w/T6T9tw5fi6/dLcHe/9VKFuM=
ao+CVj9SKm+K8MRtpX6Bd8ElVL8=
</data>
<key>hash2</key>
<data>
sr+c+k24bz5e1X12LqxyFkKS0TXtmGTPJ4sZhfzQLqg=
UWt4OEW2PjrCkt7m9LuAzOQvQCvFofrxVHDnBVI4qOk=
</data>
</dict>
<key>Main.storyboardc/Info.plist</key>
Expand All @@ -271,11 +271,11 @@
<dict>
<key>hash</key>
<data>
3LL911VA1IEj0Yx9rQ9L4EEwYKc=
9C4Qu9mRMTlVTV8fDKyODXAVSv4=
</data>
<key>hash2</key>
<data>
B+iMktk2VnoZ7Sidz5O2Z66n75b+Iiw9Ph6urUFHl1k=
2Sc/DtMOrv4Wp8oua1OORMhyndlVd5ym0hD+76+SLzQ=
</data>
</dict>
<key>archived-expanded-entitlements.xcent</key>
Expand Down
Binary file modified release/NeedleAgent/Applications/needleAgent.app/needleAgent
Binary file not shown.
2 changes: 1 addition & 1 deletion release/NeedleAgent/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mwr.needle.agent
Name: NeedleAgent
Version: 1.0.3
Version: 1.0.4
Architecture: iphoneos-arm
Description: Needle Agent
Homepage: http://mobiletools.mwrinfosecurity.com
Expand Down
6 changes: 3 additions & 3 deletions release/Packages
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: mwr.needle.agent
Version: 1.0.3
Version: 1.0.4
Section: Develpment
Maintainer: Marco Lancini
Architecture: iphoneos-arm
Filename: ./NeedleAgent.deb
Size: 1351400
MD5sum: 205963e7de22da3dd8dba1d4fb61aef4
Size: 1357288
MD5sum: 251b1ea0e42e30be40b026c198ea334f
Description: Needle Agent
Name: NeedleAgent
Author: Marco Lancini
Expand Down
Binary file modified release/Packages.bz2
Binary file not shown.
Binary file modified release/Packages.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion release/Release
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Origin: Needle Agent
Label: Needle Agent
Suite: stable
Version: 1.0.3
Version: 1.0.4
Codename: agent
Architectures: iphoneos-arm
Components: main
Expand Down

0 comments on commit ad7c716

Please sign in to comment.