superswan / Pirate-VPS

VNC scanner and screenshot tool using Censys API
The Unlicense
8 stars 3 forks source link

Censys - no module named censys.ipv4 #2

Open ToshaNyam opened 9 months ago

ToshaNyam commented 9 months ago

Traceback (most recent call last): File "/workspaces/Pirate-VPS/ahoy.py", line 2, in import censys.ipv4 ModuleNotFoundError: No module named 'censys.ipv4' изображение

superswan commented 9 months ago

Sorry, I have not used this script in a long time and I now use Shodan due to changes to free API access on censys.

Anyway, pip install censys==1.1.1 will fix this

ToshaNyam commented 9 months ago
                                            .ed"""" """$$$$be.
                                           -"           ^""**$$$e.
                                         ."                   '$$$c
                                        /                      "4$$b
                                       d  3                     $$$$
                                       $  *                   .$$$$$$
                                      .$  ^c           $$$$$e$$$$$$$$.
                                      d$L  4.         4$$$$$$$$$$$$$$b
                                      $$$$b ^ceeeee.  4$Reject3d*$$$$$
                          e$""=.      $$$$P d$$$$F $ $$$$$$$$$- $$$$$$
                         z$$b. ^c     3$$$F "$$$$b   $"$$$$$$$  $$$$*"      .=""$c
                        4$$$$L   \     $$P"  "$$b   .$ $$$$$...e$$        .=  e$$$.
                        ^*$$$$$c  %..   *c    ..    $$ 3$$$$$$$$$$eF     zP  d$$$$$
                          "**$$$ec   "\   %ce""    $$$  $$$$$$$$$$*    .r" =$$$$P""
                                "*$b.  "c  *$e.    *** d$$$$$"L$$    .d"  e$$***"
                                  ^*$$c ^$c $$$      4J$$$$$% $$$ .e*".eeP"
                                     "$$$$$$"'$=e....$*$$**$cz$$" "..d$*"
                                       "*$$$  *=%4.$ L L$ P3$$$F $$$P"
                                          "$   "%*ebJLzb$e$$$$$b $P"
                                            %..      4$$$$$$$$$$ "
                                             $$$e   z$$$$$$$$$$%
                                              "*$c  "$$$$$$$P"
                                               ."""*$$$$$$$$bc
                                            .-"    .$***$$$"""*e.
                                         .-"    .e$"     "*$c  ^*b.
                                  .=*""""    .e$*"          "*bc  "*$e..
                                .$"        .z*"               ^*$e.   "*****e.
                                $$ee$c   .d"                     "*$.        3.
                                ^*$E")$..$"                         *   .ee==d%
                                   $.d$$$*                           *  J$$$e*
                                    """""                             "$$$"
                 .                                  s                     _                          .x+=:.      
                @88>                               :8                    u                          z`    ^%     
 .d``           %8P      .u    .                  .88                   88Nu.   u.   .d``              .   <k    
 @8Ne.   .u      .     .d88B :@8c        u       :888ooo      .u       '88888.o888c  @8Ne.   .u      .@8Ned8"    
 %8888:u@88N   .@88u  ="8888f8888r    us888u.  -*8888888   ud8888.      ^8888  8888  %8888:u@88N   .@^%8888"     
  `888I  888. ''888E`   4888>'88"  .@88 "8888"   8888    :888'8888.      8888  8888   `888I  888. x88:  `)8b.    
   888I  888I   888E    4888> '    9888  9888    8888    d888 '88%"      8888  8888    888I  888I 8888N=*8888    
   888I  888I   888E    4888>      9888  9888    8888    8888.+"         8888  8888    888I  888I  %8"    R88    
 uW888L  888'   888E   .d888L .+   9888  9888   .8888Lu= 8888L          .8888b.888P  uW888L  888'   @8Wou 9%     
'*88888Nu88P    888&   ^"8888*"    9888  9888   ^%888*   '8888c. .+      ^Y8888*""  '*88888Nu88P  .888888P`      
~ '88888F`      R888"     "Y"      "888*""888"    'Y"     "88888%          `Y"      ~ '88888F`    `   ^"F        
   888 ^         ""                 ^Y"   ^Y'               "YP'                       888 ^                     
   *8E                                                                                 *8E                       
   '8>                                                                                 '8>                       
    "                                                                                   "    

Traceback (most recent call last): File "/home/codespace/.local/lib/python3.10/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) File "/home/codespace/.python/current/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/home/codespace/.python/current/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/codespace/.python/current/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/codespace/.python/current/lib/python3.10/site-packages/censys/base.py", line 164, in _make_call json_data = res.json() File "/home/codespace/.local/lib/python3.10/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/workspaces/Pirate-VPS/ahoy.py", line 10, in c = censys.ipv4.CensysIPv4() File "/home/codespace/.python/current/lib/python3.10/site-packages/censys/api.py", line 63, in init self.account() File "/home/codespace/.python/current/lib/python3.10/site-packages/censys/api.py", line 80, in account return self._get("account") File "/home/codespace/.python/current/lib/python3.10/site-packages/censys/base.py", line 196, in _get return self._make_call(self._session.get, endpoint, args) File "/home/codespace/.python/current/lib/python3.10/site-packages/censys/base.py", line 43, in _wrapper return _impl() File "/home/codespace/.python/current/lib/python3.10/site-packages/backoff/_sync.py", line 105, in retry ret = target(*args, *kwargs) File "/home/codespace/.python/current/lib/python3.10/site-packages/censys/base.py", line 41, in _impl return method(self, args, *kwargs) File "/home/codespace/.python/current/lib/python3.10/site-packages/censys/base.py", line 173, in _make_call raise CensysJSONDecodeException( censys.exceptions.CensysJSONDecodeException: 403 (badjson): Response from https://censys.io/api/v1/account is not valid JSON and cannot be decoded.

ToshaNyam commented 9 months ago

Please upgrade Pirate VPS 2.0. This is gonna be awesome.