opnsrcint 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1b36d32aaf0f6f5c02ead116c0883913d734ce92799a51b19c6a13718509d7fe
4
+ data.tar.gz: 591dfb499f1de39c11868f680d9acfb984ad25194a11752e9aaf03bcf6ad3747
5
+ SHA512:
6
+ metadata.gz: 92f69fc57a9b70052c0e89ca08390c67d065ebf9881979f3b34cb1cbb1aa694f737197bc77e9cf98847959f74db3b05b3d0e598f08096a66b0f919dc0bc0fd0b
7
+ data.tar.gz: d2984df3f8ad4adc285fcf228c87b1f063fa2da539cc0dd64ba1993f03497505c7e4f51d9b4a68bbce19fe24018de400ff1a67fdaafa7166f3b993ffca5bb9a7
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in opnsrcint.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Opnsrcint
2
+
3
+ OSINT tool for searching username
4
+ written in ruby
5
+
6
+ ## Installation
7
+
8
+ ```ruby
9
+ gem 'opnsrcint'
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ $ bundle install
15
+
16
+ Or install it yourself as:
17
+
18
+ $ gem install opnsrcint
19
+
20
+ ## Usage
21
+
22
+ $ opnsrcint [cmd] [argv]
23
+
24
+ ## Contributing
25
+
26
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Madhava-mng/opnsrcint.
27
+
28
+ ## License
29
+
30
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/data/data/com.termux/files/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "opnsrcint"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/opnsrcint ADDED
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'opnsrcint'
4
+
5
+ HELP = "
6
+ Usage: opnsrcint [cmd] [argv]
7
+ OSINT tool for username deduction.
8
+
9
+ cmd: scan4user, help
10
+
11
+ argv/scan4user:
12
+ scan for username
13
+ -v verbose output
14
+ -p search username from 18+ sites
15
+
16
+ argv/help:
17
+ show this message
18
+
19
+ example/scan4user:
20
+ opnsrcint scan4user -v user1,user2,user3
21
+ "
22
+
23
+ def main
24
+
25
+ verbose = false
26
+ prono = false
27
+ users = ''
28
+
29
+ case ARGV[0]
30
+ when 'scan4user'
31
+ ARGV.map do |arg|
32
+ if arg.start_with? '-'
33
+ case arg
34
+ when '-v'
35
+ verbose = true
36
+ when '-p'
37
+ prono = true
38
+ else
39
+ puts "opnsrcint: #{arg} flag not found.\nrun 'opnsrcint help'.";exit
40
+ end
41
+ elsif arg != 'scan4user'
42
+ users = arg.split(",")
43
+ end
44
+ end
45
+
46
+ if users != ''
47
+ Opnsrcint::search_for_username(users, verbose, prono)
48
+ else
49
+ puts "opnsrcint: User name need.\nrun 'opnsrcint help'."
50
+ end
51
+
52
+ when 'help'
53
+ puts HELP
54
+ else
55
+ puts "opnsrcint: #{ARGV[0]} command not found.\nrun 'opnsrcint help'."
56
+ end
57
+
58
+ end
59
+ main
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/data/data/com.termux/files/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,92 @@
1
+ require 'net/http'
2
+ require 'open-uri'
3
+ require 'json'
4
+
5
+ class Script
6
+ attr_accessor :url, :script_name, :list,:user, :tmp_list, :mini_logo, :verbose
7
+ def initialize(url, script_name, user, mini_logo=true, verbose=false)
8
+ @min_logo = mini_logo
9
+ @url = url
10
+ @verbose = verbose
11
+ @script_name = script_name
12
+ @list = ['github', 'pypi']
13
+ @user = user
14
+ @tmp_list = []
15
+ end
16
+
17
+ def print_(s, w, c=':')
18
+ if true and @mini_logo
19
+ c = ':'
20
+ end
21
+ print "\e[32;1m•>\e[0m \e[31m#{s.to_s}\e[33;1m#{c}\e[0m #{w}\n"
22
+ end
23
+
24
+ def git_hub
25
+ html = Net::HTTP::get_response(URI(@url+'?tab=repositories'))
26
+ json_repos = JSON::parse(Net::HTTP::get_response(URI("https://api.github.com/users/#{@user}/repos")).body)
27
+ result = ''
28
+ html.body.split("\n").map do |line|
29
+ if line.include? '<title>'
30
+ line = line.strip
31
+ line = line[7, line.length-38]
32
+ result += ("(Github.com name ) ~> "+line+"\n")
33
+ end
34
+ end
35
+
36
+ URI::extract(html.body) do |line|
37
+ if !@tmp_list.include? line
38
+ if line.include? "https://avatars.githubusercontent.com/"
39
+ result += " | Profile: \e[35;1m#{line}\e[0m\n"
40
+ @tmp_list.append(line)
41
+ end
42
+ end
43
+ end
44
+
45
+ json_repos.length.times do |r|
46
+ result += (" | "+ json_repos[r]['svn_url']+"\n")
47
+ end
48
+
49
+ json_repos.length.times do |r|
50
+ url = json_repos[r]['svn_url']
51
+ sleep 0.1
52
+ begin
53
+ Thread::new do |e|
54
+ html = Net::HTTP::get_response(URI(url))
55
+ URI::extract(html.body) do |line|
56
+ if line.include? 'https://gist.github.com' and line != 'https://gist.github.com'
57
+ print_("gist", line )
58
+ elsif line.include? 'https://facebook.com' and line != 'https://facebook.com'
59
+ print_("facebook", line)
60
+ elsif line.include? 'https://twiter.com' and line != 'https://twiter.com'
61
+ print_("twiter", line)
62
+ elsif line.include? 'https://yahoo.com' and line != 'https://yahoo.com'
63
+ print_("yahoo", line)
64
+ elsif line.include? 'https://t.me/' and line != 'https://t.me/'
65
+ print_("telegram", line, "\e[m34;1m➣" )
66
+ elsif line.include? 'mail.com'
67
+ print_("Mail", line, ':📨:')
68
+ elsif line.include? 'https://www.instagram.com/' and line != 'https://www.instagram.com/'
69
+ print_("instagram", line)
70
+ elsif line.include? 'https://linkedin.com/' and line != 'https://linkedin.com/'
71
+ print_("linkedin", line)
72
+ elsif line.include? "#{@user}" and @verbose and !line.start_with? 'https://github.com/'
73
+ print_(URI(line).hostname, "\e[2m#{line}\e[0m")
74
+ end
75
+ end
76
+ end
77
+ rescue => e
78
+ puts "\e[2mError: #{e}\e[0m"
79
+ end
80
+ end
81
+ puts result
82
+ end
83
+ def run
84
+ if @list.include? @script_name
85
+ case @script_name
86
+ when 'github'
87
+ git_hub
88
+ end
89
+ end
90
+ end
91
+
92
+ end
@@ -0,0 +1,60 @@
1
+ require 'net/http';
2
+
3
+ class Site
4
+ attr_accessor :site
5
+ def initialize(site)
6
+ @site = site
7
+ @tmp_list = []
8
+ end
9
+
10
+ def print_(c, n='', cl="\e[2m", a='')
11
+ if !@tmp_list.include? c
12
+ @tmp_list.append(c)
13
+ #puts "\e[32;1m•>\e[0m #{n} \e[33;1m#{a}\e[0m #{cl}#{c}\e[0m"
14
+ end
15
+ end
16
+
17
+ def esculate_page(line, url)
18
+ if line.start_with? "http"
19
+ if !@tmp_list.include? line
20
+ @tmp_list.append(line)
21
+ if line.include? @site
22
+ puts "•> \e[2m#{line}\e[0m"
23
+ begin
24
+ enum(url)
25
+ rescue => e
26
+ puts "#{url}:#{e}"
27
+ end
28
+ else
29
+ puts "•> \e[32m#{line}\e[0m"
30
+ end
31
+ end
32
+ elsif line.include? 'mail.com'
33
+ if !@tmp_list.include? line
34
+ @tmp_list.append(line)
35
+ puts "•> Mail \e[33;1m~> \e[0m\e[36m#{line}\e[0m"
36
+ end
37
+ end
38
+ end
39
+
40
+ def enum(url)
41
+ res = Net::HTTP::get_response(URI(url))
42
+ if !['404', '403'].include? res.code
43
+ URI::extract(res.body) do |line|
44
+ Thread::new do
45
+ esculate_page(line, url)
46
+ end
47
+ sleep 0.1
48
+ end
49
+ end
50
+ end
51
+
52
+ def scan
53
+ enum(@site)
54
+ while Thread::list.length > 1;end
55
+ end
56
+ end
57
+
58
+ a = Site::new("https://red5cracker.wordpress.com")
59
+ #a = Site::new("https://hsploit.com")
60
+ a.scan
@@ -0,0 +1,102 @@
1
+ require 'net/http';
2
+ require_relative 'script'
3
+
4
+ class User
5
+ attr_accessor :user, :url_list, :tmp_list, :verbose
6
+ def initialize(user, verbose=false, prono=false)
7
+ @user = user
8
+ @verbose = verbose
9
+ puts "\e[36;1mTarget\e[0m :#{user} :collecting info by username"
10
+ @tmp_list = []
11
+ @url_list = {
12
+ "github": [URI("https://github.com/"+@user), '200', 'github'],
13
+ "pypi": [URI("https://pypi.org/user/#{@user}/"), '200', 'pypi'],
14
+ "pypi*C": [URI("https://pypi.org/user/#{@user.capitalize}/"), '200', 'pypi'],
15
+ "udemy": [URI("https://www.udemy.com/user/#{@user}/"), '200', ''],
16
+ "linode": [URI("https://www.linode.com/blog/linode/#{@user}/"), '200', ''],
17
+ "packtpub":[URI("https://www.packtpub.com/authors/#{@user}"), '200', ''],
18
+ "patreon":[URI("https://www.patreon.com/#{@user}"), '200', ''],
19
+ "vimeo":[URI("https://vimeo.com/#{@user}"), '200', ''],
20
+ "soundcloud":[URI("https://soundcloud.com/#{@user}"), '200', ''],
21
+ "academia":[URI("https://independent.academia.edu/#{@user}"), '200', ''],
22
+ "picuki":[URI("https://www.picuki.com/profile/#{@user}"), '200'],
23
+ "networkcomputing":[URI("https://www.networkcomputing.com/author/#{@user}"), '200', ''],
24
+ "m.facebook":[URI("https://m.facebook.com/#{@user}"), '200', ''],
25
+ "credly":[URI("https://www.credly.com/users/#{@user}"), '302', ''],
26
+ "similarchannels":[URI("https://similarchannels.com/c/#{@user}"), '200', ''],
27
+ "pinterest":[URI("https://za.pinterest.com/#{@user}/"), '200', ''],
28
+ "republic":[URI("https://republic.co/#{@user}"), '200', ''],
29
+ "voices":[URI("https://www.voices.com/profile/#{@user}/"), '200', ''],
30
+ "texascyber":[URI("https://texascyber.com/speaker/#{@user}/"), '200', ''],
31
+ "skynettools":[URI("https://skynettools.com/tag/#{@user}/"), '200', ''],
32
+ "twitch":[URI("https://m.twitch.tv/#{@user}"), '200', ''],
33
+ "cbtnuggets":[URI("https://www.cbtnuggets.com/trainers/#{@user}"), '200', ''],
34
+ "gravatar":[URI("http://en.gravatar.com/#{@user}"), '200', '']
35
+ }
36
+ plus_18 ={
37
+ "xcamsters":[URI("https://www.xcamsters.com/chat/#{@user}"), '200', ''],
38
+ "camster":[URI("https://www.camster.com/?model=#{@user}"), '200', ''],
39
+ "freecam..":[URI("https://www.freecamsters.com/chat/#{@user}"), '200', ''],
40
+ "stripchat":[URI("https://stripchat.com/#{@user}"), '200', ''],
41
+ "teencam..":[URI("https://www.teencamsters.com/chat/#{@user}"), '200', ''],
42
+ "xhamster..":[URI("https://xhamsterlive.com/#{@user}"), '200', ''],
43
+ }
44
+
45
+ if prono
46
+ @url_list.update(plus_18)
47
+ end
48
+ end
49
+
50
+ def print_(s, w, c=':')
51
+ if !@tmp_list.include? w
52
+ @tmp_list.append(w)
53
+ puts "\e[32;1m•>\e[0m \e[31m#{s.to_s}\e[33;1m#{c}\e[0m #{w}"
54
+ end
55
+ end
56
+
57
+
58
+ def scan_user
59
+ @url_list.keys.map do |key|
60
+ sleep 0.1
61
+ Thread::new do
62
+ begin
63
+ res = Net::HTTP::get_response(@url_list[key][0])
64
+ if res.code != '404'
65
+ if res.code == @url_list[key][1]
66
+ print_(key, @url_list[key][0])
67
+ URI.extract(res.body).uniq do |line|
68
+ if !tmp_list.include? line
69
+ if line.include? 'mail.com'
70
+ print_("Mail", line, ':📨:')
71
+ elsif line.include? 'https://twiter.com' and line != 'https://twiter.com'
72
+ print_("twiter", line)
73
+ elsif line.include? 'https://facebook.com' and line != 'https://facebook.com'
74
+ elsif line.include? 'https://yahoo.com' and line != 'https://yahoo.com'
75
+ print_("yahoo", line)
76
+ print_("facebook", line)
77
+ elsif line.include? 'https://t.me/'
78
+ print_("telegram", line)
79
+ elsif line.include? 'https://www.instagram.com/' and line != 'https://www.instagram.com/'
80
+ print_("instagram", line)
81
+ elsif line.include? 'https://linkedin.com/' and line != 'https://linkedin.com/'
82
+ print_("linkedin", line)
83
+ elsif line.include? "#{@user}" and @verbose
84
+ print_(URI(line).hostname, "\e[2m#{line}\e[0m")
85
+ end
86
+ end
87
+ end
88
+ Script::new(@url_list[key][0], @url_list[key][2], @user, @mini_logo, @verbose).run
89
+ end
90
+ end
91
+ rescue => e
92
+ puts "\e[2mError: #{e}\e[0m"
93
+ end
94
+ while Thread::list.length > 50;end
95
+ end
96
+ end
97
+
98
+ # wait untill the thread complete
99
+ while Thread::list.length > 1
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Opnsrcint
4
+ VERSION = "0.1.1"
5
+ end
data/lib/opnsrcint.rb ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "opnsrcint/version"
4
+ require_relative "opnsrcint/user"
5
+
6
+
7
+ module Opnsrcint
8
+ def search_for_username(usernames, verbose, plus_18)
9
+ usernames.map do |user_name|
10
+ user = User::new(user_name, verbose, plus_18)
11
+ user.scan_user
12
+ end
13
+ end
14
+ end
15
+
16
+ include Opnsrcint
data/opnsrcint.gemspec ADDED
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/opnsrcint/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "opnsrcint"
7
+ spec.version = '0.1.2'
8
+ spec.authors = ["Madhava-mng"]
9
+ spec.email = ["newmob@hotmail.com"]
10
+
11
+ spec.summary = "OSINT tool"
12
+ spec.description = "OSINT tool for username,.."
13
+ spec.homepage = "https://github.com/Madhava-mng/opnsrcint"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ #spec.metadata["source_code_uri"] = "https://github.com/Madhava-mng/opnsrcint/opnsrcint-0.1.0.gem"
21
+ #spec.metadata["changelog_uri"] = "https://github.com/Madhava-mng/opnsrcint/README.md"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ #spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ # `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
+ #end
28
+ #spec.bindir = ""
29
+ spec.require_path = %w{lib}
30
+ spec.files = [
31
+ "Gemfile", "lib/opnsrcint.rb", "lib/opnsrcint/version.rb", "lib/opnsrcint/user.rb", "lib/opnsrcint/script.rb", "lib/opnsrcint/site.rb",
32
+ "opnsrcint.gemspec", "Rakefile",
33
+ "README.md", "bin/console",
34
+ "bin/setup", "bin/opnsrcint",
35
+ ]
36
+
37
+ spec.executables = ['opnsrcint']
38
+ spec.require_paths = ["lib"]
39
+
40
+ # Uncomment to register a new dependency of your gem
41
+ # spec.add_dependency "example-gem", "~> 1.0"
42
+
43
+ # For more information and examples about making a new gem, checkout our
44
+ # guide at: https://bundler.io/guides/creating_gem.html
45
+ end
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: opnsrcint
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Madhava-mng
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-06-14 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: OSINT tool for username,..
14
+ email:
15
+ - newmob@hotmail.com
16
+ executables:
17
+ - opnsrcint
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - Gemfile
22
+ - README.md
23
+ - Rakefile
24
+ - bin/console
25
+ - bin/opnsrcint
26
+ - bin/setup
27
+ - lib/opnsrcint.rb
28
+ - lib/opnsrcint/script.rb
29
+ - lib/opnsrcint/site.rb
30
+ - lib/opnsrcint/user.rb
31
+ - lib/opnsrcint/version.rb
32
+ - opnsrcint.gemspec
33
+ homepage: https://github.com/Madhava-mng/opnsrcint
34
+ licenses:
35
+ - MIT
36
+ metadata:
37
+ allowed_push_host: https://rubygems.org
38
+ homepage_uri: https://github.com/Madhava-mng/opnsrcint
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 2.4.0
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubygems_version: 3.2.15
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: OSINT tool
58
+ test_files: []