• Stars
    star
    272
  • Rank 146,111 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

find hardcoded strings from source code


hardcodes
hardcodes

extract strings from source code

hardcodes is a utility for searching strings hardcoded by developers in programs. It uses a modular tokenizer that can handle comments, any number of backslashes & nearly any syntax you throw at it.

Yes, it is designed to process any syntax and following languages are officially supported:

ada, applescript, c, c#, c++, coldfusion, golang, haskell, html, java, javascript,
jsp, lua, pascal, perl, php, powershell, python, ruby, scala, sql, swift, xml

Installation

with pip
pip3 install hardcodes
or build from source
git clone https://github.com/s0md3v/hardcodes && cd hardcodes && python3 setup.py install

Documentation

hardcodes is available as both a library as well as a command line program. The relevant documentation can be found below:

For Developers

The sample program below demonstrates usage of hardcodes library

from hardcodes import search

string = "console.log('hello there')"
result = search(string, lang="common", comments="parse")
print(result)
Output: ['hello there']

The arguments lang and comments are optional. Their use is explained below in the user documentation section.


For Users

cli.py provides a grep-like command line interface to hardcodes library. You will need to install the library first to use it.

Find strings in a file

python cli.py /path/to/file.ext

Find strings in a directory, recursively

python cli.py -r /path/to/dir

Hide paths from output

python cli.py -o /path/to/file.ext

Specify programming language

Specifying a language is optional and should be used only when the programming language of source is already known.

python cli.py -l 'golang' /path/to/file.go

Specify comment behaviour

With -c option, you can specify

  • ignore ignore the comments completely
  • parse parse the comments like code
  • string add comments to list of hardcoded strings

python cli.py -o /path/to/file.ext

More Repositories

1

roop

one-click face swap
Python
24,347
star
2

XSStrike

Most advanced XSS scanner.
Python
12,523
star
3

Photon

Incredibly fast crawler designed for OSINT.
Python
10,404
star
4

Arjun

HTTP parameter discovery suite.
Python
4,747
star
5

AwesomeXSS

Awesome XSS stuff
JavaScript
4,605
star
6

sd-webui-roop

roop extension for StableDiffusion web-ui
Python
3,125
star
7

Smap

a drop-in replacement for Nmap powered by shodan.io
Go
2,708
star
8

Striker

Striker is an offensive information and vulnerability scanner.
Python
2,163
star
9

be-a-hacker

roadmap for a self-taught hacker
1,694
star
10

ReconDog

Reconnaissance Swiss Army Knife
Python
1,685
star
11

Hash-Buster

Crack hashes in seconds.
Python
1,639
star
12

huepy

Print awesomely in terminals.
Python
1,460
star
13

Corsy

CORS Misconfiguration Scanner
Python
1,213
star
14

Silver

Mass scan IPs for vulnerable services
Python
993
star
15

uro

declutters url lists for crawling/pentesting
Python
966
star
16

Diggy

Extract endpoints from apk files.
Shell
847
star
17

Decodify

Detect and decode encoded strings, recursively.
Python
841
star
18

Blazy

Blazy is a modern login bruteforcer which also tests for CSRF, Clickjacking, Cloudflare and WAF .
Python
800
star
19

Breacher

An advanced multithreaded admin panel finder written in python.
Python
679
star
20

goop

Google Search Scraper
Python
561
star
21

ote

Generate Email, Register for anything, Get the OTP/Link
Python
561
star
22

Zen

Find emails of Github users
Python
522
star
23

Parth

Heuristic Vulnerable Parameter Scanner
Python
512
star
24

Orbit

Blockchain Transactions Investigation Tool
Python
506
star
25

JShell

JShell - Get a JavaScript shell with XSS.
Python
498
star
26

MyPapers

Repository for hosting my research papers
Python
492
star
27

Bolt

CSRF Scanner
Python
490
star
28

Cloak

Cloak can backdoor any python script with some tricks.
Python
475
star
29

nano

Nano is a family of PHP web shells which are code golfed for stealth.
PHP
427
star
30

sqlmate

A friend of SQLmap which will do what you always expected from SQLmap.
Python
406
star
31

SubGPT

Find subdomains with GPT, for free
Python
315
star
32

dump

Stuff that doesn't deserves its own repository.
Python
293
star
33

Quark

Quark is a data visualization framework.
JavaScript
211
star
34

proxify

A python module for dumping usable proxies.
Python
150
star
35

Predator

Anti-Automation System
CSS
118
star
36

Shiva

Improved DOS exploit for wordpress websites (CVE-2018-6389)
Python
109
star
37

velocity

DNS caching for humans
Python
86
star
38

rewise

Google auto-complete wrapper
Python
74
star
39

zetanize

HTML form parser for humans.
Python
72
star
40

ifnude

nudity detector that works
Python
67
star
41

Locky

Locky generates "really" strong yet easy to remember passwords.
Python
59
star
42

Entropy

Entropy is a (prototype) WAF driven by maths.
Python
53
star
43

fonetic-go

golang implementation of fonetic (https://github.com/s0md3v/fonetic)
Go
38
star
44

meta

Explains and tests HTTP response headers
Python
38
star
45

fonetic

assess pronounciblity of text
Python
32
star
46

shades

Shell
27
star
47

wl

convert case style of words
Go
19
star
48

s0md3v.github.io

my personal blog
SCSS
12
star
49

s0md3v

8
star
50

.github

my default .github files
5
star
51

BG3-Mutant

Mod for Baldur's Gate 3 that adds a Mutant class to the game.
2
star