Wicked Cool Ruby Scripts is a compendium of scripts that will make your life easier by saving you time and solving problems. If you find yourself wasting effort and time on a task a trained monkey could do, it's time for Ruby to come to the rescue. Wicked Cool Ruby Scripts provides carefully selecte
Wicked cool Ruby scripts: useful scripts that solve difficult problems
โ Scribed by Steve Pugh
- Publisher
- No Starch Press
- Year
- 2008
- Tongue
- English
- Leaves
- 438
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Wicked Cool Ruby Scripts is a compendium of scripts that will make your life easier by saving you time and solving problems. If you find yourself wasting effort and time on a task a trained monkey could do, it's time for Ruby to come to the rescue. Wicked Cool Ruby Scripts provides carefully selected Ruby scripts that are immediately useful. Learn how to streamline administrative tasks like renaming files, disabling processes, and changing permissions. After you get your feet wet creating basic scripts, author Steve Pugh will show you how to create powerful Web crawlers, security scripts, full-fledged libraries and applications, and much more. With each script you'll get the raw code followed by an explanation of how it really works, as well as instructions for how to run the script and suggestions for customizing it. Wicked Cool Ruby Scripts will save you from the tedium of repetitive tasks and give you back the time it would take to write scripts from scratch.
โฆ Table of Contents
Cover
......Page 1
FOREWORD ......Page 2
ACKNOWLEDGMENTS ......Page 3
INTRODUCTION ......Page 4
Wicked Cool Ruby Scripts ......Page 5
You Need Ruby Basics ......Page 6
Documentation ......Page 7
Organization and Approach ......Page 8
The Website ......Page 10
1. GENERAL PURPOSE UTILITIES ......Page 11
Check for Changed Files ......Page 12
Check for Changed Files ......Page 13
The Code ......Page 14
Running the Code ......Page 16
The Results ......Page 17
How It Works ......Page 18
Hacking the Script ......Page 19
Encrypt a File ......Page 20
Encrypt a File ......Page 21
The Code ......Page 22
Running the Code ......Page 23
The Results ......Page 24
How It Works ......Page 25
Hacking the Script ......Page 26
Decrypt a File ......Page 27
Decrypt a File ......Page 28
The Code ......Page 29
Running the Code ......Page 30
The Results ......Page 31
How It Works ......Page 32
File Splitting ......Page 33
File Splitting ......Page 34
The Code ......Page 35
Running the Code ......Page 36
The Results ......Page 37
How It Works ......Page 38
Hacking the Script ......Page 39
File Joining ......Page 40
File Joining ......Page 41
The Code ......Page 42
Running the Code ......Page 43
The Results ......Page 44
How It Works ......Page 45
Hacking the Script ......Page 46
Windows Process Viewer ......Page 47
Windows Process Viewer ......Page 48
The Code ......Page 49
Running the Code ......Page 50
The Results ......Page 51
How It Works ......Page 52
Hacking the Script ......Page 53
File Compressor ......Page 54
File Compressor ......Page 55
The Code ......Page 56
Running the Code ......Page 57
The Results ......Page 58
How It Works ......Page 59
File Decompression ......Page 60
File Decompression ......Page 61
The Code ......Page 62
Running the Code ......Page 63
The Results ......Page 64
How It Works ......Page 65
Mortgage Calculator ......Page 66
Mortgage Calculator ......Page 67
The Code ......Page 68
Running the Code ......Page 69
The Results ......Page 70
How It Works ......Page 71
Hacking the Script ......Page 72
2. WEBSITE SCRIPTING ......Page 73
Web Page Link Validator ......Page 74
Web Page Link Validator ......Page 75
The Code ......Page 76
Running the Code ......Page 77
The Results ......Page 78
How It Works ......Page 79
Hacking the Script ......Page 80
Orphan File Checker ......Page 81
Orphan File Checker ......Page 82
The Code ......Page 83
Running the Script ......Page 84
The Results ......Page 85
How It Works ......Page 86
Form Generator ......Page 87
Form Generator ......Page 88
The Code ......Page 89
Running the Code ......Page 90
The Results ......Page 91
How It Works ......Page 92
Hacking the Script ......Page 93
RSS Parsing ......Page 94
RSS Parsing ......Page 95
The Code ......Page 96
Running the Code ......Page 97
The Results ......Page 98
How It Works ......Page 99
Hacking the Script ......Page 100
Stock Exchange Grep ......Page 101
Stock Exchange Grep ......Page 102
The Code ......Page 103
Running the Code ......Page 104
The Results ......Page 105
How It Works ......Page 106
Hacking the Script ......Page 107
IP Address Generation ......Page 108
IP Address Generation ......Page 109
The Code ......Page 110
Running the Code ......Page 111
The Results ......Page 112
How It Works ......Page 113
Subnet Calculator ......Page 114
Subnet Calculator ......Page 115
The Code ......Page 116
Running the Code ......Page 117
The Results ......Page 118
How It Works ......Page 119
Hacking the Script ......Page 120
3. LI(U)NIX SYSTEM ADMINISTRATION ......Page 121
Fixing Bad Filenames ......Page 122
Fixing Bad Filenames ......Page 123
The Code ......Page 124
Running the Code ......Page 125
The Results ......Page 126
How It Works ......Page 127
Hacking the Script ......Page 128
Adding a User ......Page 129
Adding a User ......Page 130
The Code ......Page 131
Running the Code ......Page 132
The Results ......Page 133
How It Works ......Page 134
Hacking the Script ......Page 135
Modifying a User ......Page 136
Modifying a User ......Page 137
The Code ......Page 138
Running the Code ......Page 140
The Results ......Page 141
How It Works ......Page 142
Hacking the Script ......Page 143
Killing a Stuck Process ......Page 144
Killing a Stuck Process ......Page 145
The Code ......Page 146
Running the Code ......Page 147
The Results ......Page 148
How It Works ......Page 149
Validating Symlinks ......Page 151
Validating Symlinks ......Page 152
The Code ......Page 153
Running the Code ......Page 154
The Results ......Page 155
How It Works ......Page 156
Hacking the Script ......Page 157
4. PICTURE UTILITIES ......Page 158
Mass Editing ......Page 159
Mass Editing ......Page 160
The Code ......Page 161
Running the Code ......Page 162
The Results ......Page 163
How It Works ......Page 164
Image Information Extraction ......Page 165
Image Information Extraction ......Page 166
The Code ......Page 167
Running the Code ......Page 168
The Results ......Page 169
How It Works ......Page 170
Hacking the Script ......Page 171
Creating a Thumbnail ......Page 172
Creating a Thumbnail ......Page 173
The Code ......Page 174
Running the Code ......Page 175
The Results ......Page 176
How It Works ......Page 177
Hacking the Script ......Page 178
Resize a Picture ......Page 179
Resize a Picture ......Page 180
The Code ......Page 181
Running the Code ......Page 182
The Results ......Page 183
How It Works ......Page 184
Hacking the Script ......Page 185
Adding a Watermark to Pictures ......Page 186
Adding a Watermark to Pictures ......Page 187
The Code ......Page 188
Running the Code ......Page 189
The Results ......Page 190
How It Works ......Page 191
Convert to Black and White ......Page 192
Convert to Black and White ......Page 193
The Code ......Page 194
Running the Code ......Page 195
The Results ......Page 196
How It Works ......Page 197
Creating a Photo Gallery ......Page 198
Creating a Photo Gallery ......Page 199
The Code ......Page 200
Running the Code ......Page 202
Results ......Page 203
How It Works ......Page 204
Hacking the Script ......Page 206
5. GAMES AND LEARNING TOOLS ......Page 207
Sudoku Solver ......Page 208
Sudoku Solver ......Page 209
The Code ......Page 210
Running the Code ......Page 212
The Results ......Page 213
How It Works ......Page 214
Flash Cards ......Page 215
Flash Cards ......Page 216
The Code ......Page 217
Running the Code ......Page 218
The Results ......Page 219
How It Works ......Page 220
Hacking the Script ......Page 221
Number-Guessing Game ......Page 222
Number-Guessing Game ......Page 223
The Code ......Page 224
Running the Code ......Page 225
The Results ......Page 226
How It Works ......Page 227
Rock, Paper, Scissors ......Page 228
Rock, Paper, Scissors ......Page 229
The Code ......Page 230
Running the Code ......Page 231
The Results ......Page 232
How It Works ......Page 233
Hacking the Script ......Page 234
Word Scramble ......Page 235
Word Scramble ......Page 236
The Code ......Page 237
Running the Code ......Page 238
The Results ......Page 239
How It Works ......Page 240
Hangman ......Page 241
Hangman ......Page 242
The Code ......Page 243
Running the Code ......Page 244
The Results ......Page 245
How It Works ......Page 246
Pig ......Page 247
Pig ......Page 248
The Code ......Page 249
Running the Code ......Page 251
The Results ......Page 252
How It Works ......Page 254
Hacking the Script ......Page 255
6. STRING UTILITIES ......Page 256
PDF Generator ......Page 257
PDF Generator ......Page 258
The Code ......Page 259
Running the Code ......Page 261
The Results ......Page 262
How It Works ......Page 263
Word Frequency ......Page 264
Word Frequency ......Page 265
The Code ......Page 266
Running the Code ......Page 267
The Results ......Page 268
How It Works ......Page 269
Hacking the Script ......Page 270
Comma-Separated Value Parser ......Page 271
Comma-Separated Value Parser ......Page 272
The Code ......Page 273
Running the Code ......Page 274
The Results ......Page 275
How It Works ......Page 276
Hacking the Script ......Page 277
CSV to XML ......Page 278
CSV to XML ......Page 279
The Code ......Page 280
Running the Code ......Page 281
The Results ......Page 282
How It Works ......Page 283
Hacking the Script ......Page 284
Ruby Grep ......Page 285
Ruby Grep ......Page 286
The Code ......Page 287
Running the Code ......Page 288
The Results ......Page 289
How It Works ......Page 290
Hacking the Script ......Page 291
Password Check ......Page 292
Password Check ......Page 293
The Code ......Page 294
Running the Code ......Page 295
The Results ......Page 296
How It Works ......Page 297
Hacking the Script ......Page 299
7. SERVERS AND SCRAPERS ......Page 300
Define ......Page 301
Define ......Page 302
The Code ......Page 303
Running the Code ......Page 304
The Results ......Page 305
How It Works ......Page 306
Hacking the Script ......Page 307
Automated SMS ......Page 308
Automated SMS ......Page 309
The Code ......Page 310
Running the Code ......Page 311
The Results ......Page 312
How It Works ......Page 313
Link Scrape ......Page 314
Link Scrape ......Page 315
The Code ......Page 316
Running the Code ......Page 317
The Results ......Page 318
How It Works ......Page 321
Hacking the Script ......Page 322
Image Scrape ......Page 323
Image Scrape ......Page 324
The Code ......Page 325
Running the Code ......Page 326
The Results ......Page 327
How It Works ......Page 328
Hacking the Script ......Page 329
Scraper ......Page 330
Scraper ......Page 331
The Code ......Page 332
Running the Code ......Page 333
The Results ......Page 334
How It Works ......Page 335
Encrypted Client ......Page 336
Encrypted Client ......Page 337
The Code ......Page 338
Running the Code ......Page 339
The Results ......Page 340
How It Works ......Page 341
Encrypted Server ......Page 342
Encrypted Server ......Page 343
The Code ......Page 344
Running the Code ......Page 345
The Results ......Page 346
How It Works ......Page 347
8. ARGUMENTS AND DOCUMENTATION ......Page 348
File Security ......Page 349
File Security ......Page 350
The Code ......Page 351
Running the Code ......Page 353
The Results ......Page 354
How It Works ......Page 355
Web Scraper ......Page 356
Web Scraper ......Page 357
The Code ......Page 358
Running the Code ......Page 360
The Results ......Page 361
How It Works ......Page 362
Photo Utilities ......Page 363
Photo Utilities ......Page 364
The Code ......Page 365
Running the Code ......Page 369
The Results ......Page 370
How It Works ......Page 371
Conclusion ......Page 372
9. SORTING ALGORITHMS ......Page 373
Bubble Sort ......Page 374
Bubble Sort ......Page 375
The Code ......Page 376
Running the Code ......Page 377
The Results ......Page 378
How It Works ......Page 379
Selection Sort ......Page 380
Selection Sort ......Page 381
The Code ......Page 382
Running the Code ......Page 383
The Results ......Page 384
How It Works ......Page 385
Shell Sort ......Page 386
Shell Sort ......Page 387
The Code ......Page 388
Running the Code ......Page 389
The Results ......Page 390
How It Works ......Page 391
Merge Sort ......Page 392
Merge Sort ......Page 393
The Code ......Page 394
Running the Code ......Page 395
The Results ......Page 396
How It Works ......Page 397
Heap Sort ......Page 398
Heap Sort ......Page 399
The Code ......Page 400
Running the Code ......Page 401
The Results ......Page 402
How It Works ......Page 403
Quick Sort ......Page 404
Quick Sort ......Page 405
The Code ......Page 406
Running the Code ......Page 407
The Results ......Page 408
How It Works ......Page 409
Shear Sort ......Page 410
Shear Sort ......Page 411
The Code ......Page 412
Running the Code ......Page 414
The Results ......Page 415
How It Works ......Page 416
A Note About Efficiencies ......Page 418
10. WRITING A METASPLOIT 3.1 MODULE WITH RUBY ......Page 419
Introduction to Metasploit ......Page 420
Installation ......Page 421
Writing a Module ......Page 423
Building the Exploit ......Page 424
Watching in Real Time ......Page 425
Explanation of Metasploit Module Shell ......Page 427
Finding the Payload Space ......Page 429
A. AFTERWORD ......Page 438
๐ SIMILAR VOLUMES
Wicked Cool Ruby Scripts is a compendium of scripts that will make your life easier by saving you time and solving problems. If you find yourself wasting effort and time on a task a trained monkey could do, it's time for Ruby to come to the rescue. Wicked Cool Ruby Scripts provides carefully selecte
<p><i>Wicked Cool Ruby Scripts</i> is a compendium of scripts that will make your life easier by saving you time and solving problems. If you find yourself wasting effort and time on a task a trained monkey could do, it's time for Ruby to come to the rescue.</p> <p><i>Wicked Cool Ruby Scripts</i> p
<p><i>Wicked Cool Ruby Scripts</i> is a compendium of scripts that will make your life easier by saving you time and solving problems. If you find yourself wasting effort and time on a task a trained monkey could do, it's time for Ruby to come to the rescue. </p><p> <i>Wicked Cool Ruby Scripts</i> p
Most Perl programmers have been frustrated at one time or another because the system just wouldn't do what they wanted it to do. There was that one simple and obvious utility that was missing that would make life so much easier: A tool to get a stock quote, show off a photograph collection, or even
p>Most Perl programmers have been frustrated at one time or another because the system just wouldn't do what they wanted it to do. There was that one simple and obvious utility that was missing that would make life so much easier: A tool to get a stock quote, show off a photograph collection, or eve