Skip to content

Instantly share code, notes, and snippets.

View ikarius's full-sized avatar
🏠
Working from home

ikarius ikarius

🏠
Working from home
View GitHub Profile
@ikarius
ikarius / README.md
Last active March 24, 2017 16:12
RTSInfo - Création d'un faux hotspot WiFi

Objectifs

  • Créer un faux point d'accès Wifi public (hotspot) portable,
  • Créer un phishing Facebook phishing
  • Informer les utilisateurs de hotspots gratuits des dangers d'une connexion directe à un wifi ouvert.

Durant les expérimentations effectués dans l'espace public, aucune information personnelle (login, mot de passe..) n'a été interceptée, stockée ou visualisée.

Quelques précisions

@ikarius
ikarius / gist:c4424a7f7f2e3cd89ff6
Last active August 29, 2015 14:01
LightTable user keymap
;; User keymap
;; -----------------------------
;; Keymaps are stored as a set of diffs that are merged together together
;; to create the final set of keys. You can modify these diffs to either add
;; or subtract bindings.
;;
;; Like behaviors, keys are bound by tag. When objects with those tags are active
;; the key bindings are live. Keys can be bound to any number of Light Table commands,
;; allowing you the flexibility to execute multiple operations together. To see a list
;; of all the commands you can execute, start typing a word related to the thing you
@ikarius
ikarius / gist:aa822a57a00869b9c723
Last active August 29, 2015 14:01
More "functional" Obj-C 'switch'
// Ref: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html#//apple_ref/doc/uid/TP40011210-CH8-SW9
if (type == SRFSideBarHeaderTypeClear) {
self.backgroundView.hidden = YES;
self.titleImageView.hidden = YES;
}
else {
NSString *imageName = ^{
switch (type) {
@ikarius
ikarius / gist:11167694
Created April 22, 2014 06:48
Strange bug on Puck
2014-04-22 08:47:39.475 puck[97176:507] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: open)'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9196725c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8fabce75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff9186246e -[__NSDictionaryM setObject:forKey:] + 1102
3 puck 0x000000010bb9e704 puck + 14084
4 libdyld.dylib 0x00007fff944c95fd start + 1
5 ??? 0x0000000000000008 0x0 + 8
)
@ikarius
ikarius / fbpatchsso.m
Created January 2, 2012 18:31
Facebook SSO workaround
// Regarde aux alentours de la ligne 267 de Facebook.m (ça dépends des versions toutefois):
// Le SSO foire avec SAFARI, donc désactive le redirect vers Safari...
- (void)authorize:(NSArray *)permissions
urlSchemeSuffix:(NSString *)urlSchemeSuffix {
self.urlSchemeSuffix = urlSchemeSuffix;
self.permissions = permissions;
// ICI
[self authorizeWithFBAppAuth:NO safariAuth:NO];
- (void) loadData {
dataLoaded = NO;
NSLog(@" thread launched");
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self loadDataFromURL:nil];
dataLoaded = YES;
// reload de la tableview dans le thread principal:
[self.tableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES];
1
2
3
4
5
6
7
8
9
10
@ikarius
ikarius / Orientation.m
Created March 24, 2011 09:10
Simple (but effecive) workaround for dynamic AND selective orientation change in a UI(View|TabBar|Navigation)Controller
/* Selective / dynamic UI orientation
Simply add this method (updateOrientation) to your class and call it in:
-(void) viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self updateOrientation];
}
/*
** Display image in UIWebView using loadHTMLString
*/
- (void) showImageWithLoadHTMLString {
// Create URL string for image file location
NSString *imageName = [[NSBundle mainBundle] pathForResource:@"test_image" ofType:@"png"];
NSURL *imageURL = [NSURL fileURLWithPath: imageName];
// Create HTML string from image URL
// Width-value is arbitrary (and found experimentally): 900 works fine for me
@ikarius
ikarius / md5.groovy
Created February 9, 2010 09:57
How to generate a MD5 hash in Groovy ...
def generateMD5(String s) {
MessageDigest digest = MessageDigest.getInstance("MD5")
digest.update(s.bytes);
new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0')
}